/* 
  OCN Construction - Ultra Premium CSS Redesign
  Inspired by modern roofing & construction sites
*/

:root {
  /* Premium Colors */
  --clr-bg: #f5f7fa;
  --clr-bg-alt: #ffffff;
  
  /* Deep Navy and High-Contrast Orange */
  --clr-primary: #002244; 
  --clr-primary-light: #003366;
  --clr-accent: #f26b00; /* Vibrant Construction Orange */
  --clr-accent-hover: #d65f00;
  
  --clr-text: #333333;
  --clr-text-light: #666666;
  
  /* Typography */
  --ff-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --fs-h1: clamp(3rem, 6vw, 5.5rem);
  --fs-h2: clamp(2.5rem, 5vw, 3.5rem);
  --fs-h3: clamp(1.5rem, 3vw, 2rem);
  --fs-body: 1.125rem;
  
  /* Spacing */
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease-in-out;
  --transition-smooth: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  
  /* Shadows */
  --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-hover: 0 20px 40px rgba(0,34,68,0.15);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--ff-primary);
  color: var(--clr-text);
  background-color: var(--clr-bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4 {
  color: var(--clr-primary);
  line-height: 1.1;
}

h1 { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -1px; margin-block-end: var(--spacing-sm); }
h2 { font-size: var(--fs-h2); font-weight: 800; letter-spacing: -0.5px; margin-block-end: var(--spacing-sm); }
h3 { font-size: var(--fs-h3); font-weight: 700; margin-block-end: var(--spacing-sm); }
p { font-size: var(--fs-body); color: var(--clr-text-light); margin-block-end: var(--spacing-md); }

.text-center { text-align: center; }
.text-accent { color: var(--clr-accent) !important; }
.text-white { color: #fff !important; }

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.container {
  width: 90%;
  max-width: 1300px;
  margin-inline: auto;
}

.section {
  padding-block: var(--spacing-xl);
}

.section-bg-alt {
  background-color: var(--clr-bg-alt);
}

.section-image-bg {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 1;
}

.section-image-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(245, 247, 250, 0.95); /* 95% opacity to make it very subtle */
  z-index: -1;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */
/* Buttons */
.btn {
  display: inline-block;
  padding: 1.2rem 2.5rem;
  background-color: var(--clr-accent);
  color: #fff !important;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 15px rgba(242, 107, 0, 0.3);
}

.btn:hover {
  background-color: var(--clr-accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(242, 107, 0, 0.4);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid #fff;
  color: #fff !important;
  box-shadow: none;
}

.btn-outline:hover {
  background-color: #fff;
  color: var(--clr-primary) !important;
  transform: translateY(-3px);
}

/* Navbar (Solid Premium White) */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: padding var(--transition-fast);
  padding-block: 0.5rem;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar .logo img {
  height: 60px; /* Made logo slightly larger and crisp */
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a:not(.btn) {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--clr-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-links a:not(.btn):hover {
  color: var(--clr-accent);
}

/* Hover underline effect */
.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: -5px;
  left: 0;
  background-color: var(--clr-accent);
  transition: width var(--transition-fast);
}

.nav-links a:not(.btn):hover::after {
  width: 100%;
}

.nav-links .btn {
  padding: 0.8rem 1.8rem;
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.social-links a {
  color: var(--clr-primary);
  display: flex;
  align-items: center;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.social-links a:hover {
  color: var(--clr-accent);
  transform: translateY(-2px);
}

/* Floating SMS Button */
.floating-sms {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: var(--clr-accent);
  color: white !important;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(242, 107, 0, 0.4);
  z-index: 9999;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.floating-sms:hover {
  background-color: var(--clr-accent-hover);
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(242, 107, 0, 0.5);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  background: url('../assets/gallery/Gerais/OCN%20Construction%20-%20%20(129).webp') center/cover no-repeat;
}

/* Dark cinematic overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 34, 68, 0.9) 0%, rgba(0, 34, 68, 0.6) 50%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero h1 {
  color: #fff;
  text-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  max-width: 700px;
  text-shadow: 0 2px 5px rgba(0,0,0,0.5);
  margin-block-end: 3rem;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Page Headers for Subpages */
.page-header {
  position: relative;
  padding-top: 160px;
  padding-bottom: 80px;
  background-color: var(--clr-primary);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
  text-align: center;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 34, 68, 0.85); /* 85% opacity overlay over the background image */
  z-index: 1;
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  color: #fff;
  font-size: clamp(3rem, 6vw, 4.5rem);
  text-shadow: 0 4px 15px rgba(0,0,0,0.5);
  margin-bottom: 1rem;
}

.page-header p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  max-width: 800px;
  margin-inline: auto;
}

/* Service Cards */
.card {
  background: var(--clr-bg-alt);
  border-radius: 8px;
  padding: 3rem 2rem;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  border-top: 4px solid transparent;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
  border-top-color: var(--clr-accent);
}

.card-icon {
  width: 70px;
  height: 70px;
  background-color: rgba(242, 107, 0, 0.1);
  color: var(--clr-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-block-end: 2rem;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.card:hover .card-icon {
  background-color: var(--clr-accent);
  color: #fff;
}

.card-icon svg {
  width: 35px;
  height: 35px;
  stroke: currentColor;
  fill: none;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--clr-primary);
  margin-top: 1rem;
  text-transform: uppercase;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.card:hover .card-link {
  color: var(--clr-accent);
}

/* Gallery Styling */
.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-block-end: 4rem;
}

.tab-btn {
  padding: 0.8rem 2rem;
  background: var(--clr-bg-alt);
  border: 2px solid transparent;
  color: var(--clr-text);
  border-radius: 50px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.tab-btn.active, .tab-btn:hover {
  background: var(--clr-primary);
  color: #fff;
  box-shadow: 0 5px 15px rgba(0, 34, 68, 0.3);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  display: none;
  box-shadow: var(--shadow-md);
}

.gallery-item.show {
  display: block;
  animation: fadeIn 0.6s ease forwards;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,34,68,0.9), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h4 {
  color: #fff;
  margin: 0;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay h4 {
  transform: translateY(0);
}

/* Footer / Contact Section */
.site-footer {
  background: var(--clr-primary);
  color: white;
  padding-block: var(--spacing-xl) var(--spacing-md);
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--clr-accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: center;
}

.footer-info h2 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-block-end: 1rem;
}

.footer-info > p {
  color: rgba(255,255,255,0.8);
  font-size: 1.2rem;
  margin-block-end: 2rem;
}

.contact-details {
  background: rgba(255,255,255,0.05);
  padding: 2rem;
  border-radius: 8px;
  border-left: 4px solid var(--clr-accent);
}

.contact-details p {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
  margin-block-end: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-details p:last-child {
  margin-block-end: 0;
}

.contact-details a {
  color: var(--clr-accent);
  font-weight: 700;
  transition: color var(--transition-fast);
}

.contact-details a:hover {
  color: #fff;
}

.footer-logo-section {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}

.footer-logo-section img {
  filter: brightness(0) invert(1);
  opacity: 0.9;
  max-width: 280px;
  margin-bottom: 2rem;
}

.footer-logo-section p {
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-logo-section {
    text-align: left;
    align-items: flex-start;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
}

/* ==========================================================================
   ANIMATIONS & UTILITIES
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger, .hamburger::before, .hamburger::after {
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--clr-primary);
  transition: all 0.3s ease-in-out;
}

.hamburger::before, .hamburger::after {
  content: '';
  position: absolute;
}

.hamburger::before { transform: translateY(-8px); }
.hamburger::after { transform: translateY(8px); }

.menu-toggle.active .hamburger { background-color: transparent; }
.menu-toggle.active .hamburger::before { transform: translateY(0) rotate(45deg); }
.menu-toggle.active .hamburger::after { transform: translateY(0) rotate(-45deg); }


/* Responsive */
@media (max-width: 992px) {
  .hero h1 { font-size: 3rem; }
}

@media (max-width: 768px) {
  /* Header & Menu */
  .navbar .logo img { height: 40px; }
  
  .menu-toggle {
    display: block;
    position: relative;
    z-index: 1001;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.4s ease;
  }
  
  .nav-links.active { right: 0; }
  
  .social-links {
    justify-content: center;
    margin-block: 2rem;
    width: 100%;
  }
  
  /* Buttons */
  .btn {
    padding: 1rem 1.2rem;
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  /* Text Alignment */
  p, h1, h2, h3, h4, .card {
    text-align: center;
  }
  
  .card-icon { margin-inline: auto; }
  .card-link { justify-content: center; width: 100%; }
  
  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .contact-details {
    padding: 1.5rem 1rem;
    border-left: none;
    border-top: 4px solid var(--clr-accent);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .contact-details p { 
    justify-content: center;
    flex-direction: column;
    gap: 0.2rem;
    width: 100%;
  }
  
  .footer-logo-section {
    align-items: center;
    text-align: center;
    margin-top: 1rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
}
.lightbox {
  padding: 0;
  border: none;
  background: transparent;
  max-width: 95vw;
  max-height: 95vh;
  margin: auto;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(0, 34, 68, 0.95);
  backdrop-filter: blur(8px);
}

.lightbox-content {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-img {
  max-height: 90vh;
  max-width: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.lightbox-close:hover { color: var(--clr-accent); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--clr-primary);
  color: white;
  border: 2px solid rgba(255,255,255,0.2);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.lightbox-nav:hover {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: -30px; }
.lightbox-next { right: -30px; }
