/* =====================================================
   9UNIVERSE INFRACON — SERVICES PAGE STYLES (UNIFIED)
===================================================== */

/* ========= BASE VARIABLES (Unified from Index/About) ========= */
:root {
  --brand-red: #e63946;
  --brand-blue: #142854;
  --brand-blue-2: #0f2a57;
  --bg-soft: #fbfcff;
  --glass: rgba(255, 255, 255, .96);
  --white: #ffffff;
  --muted: #6b7280;
  --text-dark: #0f172a;
  --card-bg: rgba(255, 255, 255, .98);
  --radius: 12px;
  --shadow-1: 0 8px 28px rgba(20, 40, 84, .08);
  --shadow-2: 0 14px 40px rgba(20, 40, 84, .12);
  --transition: 0.35s ease;
  --font-main: 'Poppins', sans-serif;
  --max-width: 1400px;
  
  /* Services Specific Variables */
  --primary-color: var(--brand-red);
  --secondary-color: var(--brand-blue);
  --bg-light: var(--bg-soft); 
}

/* =======================================
   DARK THEME VARIABLES AND STYLES (UNIVERSALIZED)
   ======================================= */
body.dark-theme {
  --bg-soft: #1c1c1c;
  --glass: rgba(28, 28, 28, .96);
  --white: #fff;
  --muted: #a0a0a0;
  --text-dark: #f0f0f0; 
  --card-bg: #2d2d2d; 
  --shadow-1: 0 8px 28px rgba(0, 0, 0, .4);
  --shadow-2: 0 14px 40px rgba(0, 0, 0, .6);
  background: #121212; 
  transition: background-color 0.5s ease;
  color: var(--text-dark);
}

body.dark-theme img {
    filter: contrast(1.1);
}

body.dark-theme header {
  background: var(--card-bg);
  box-shadow: var(--shadow-2);
}

body.dark-theme nav ul li a {
  color: var(--text-dark);
}

body.dark-theme .header-actions button {
    color: var(--text-dark) !important; 
}

body.dark-theme nav ul.show {
    background: var(--card-bg);
    box-shadow: var(--shadow-2);
}

body.dark-theme .hamburger span {
  background: var(--text-dark); 
}

/* Service Section Dark Mode Fixes */
body.dark-theme .services-modern {
    background: var(--bg-soft) !important;
}
body.dark-theme .services-modern::before,
body.dark-theme .services-modern::after {
    filter: blur(80px) brightness(0.6);
}
body.dark-theme .service-card-modern {
    background: var(--card-bg);
    box-shadow: var(--shadow-1);
}
body.dark-theme .service-number {
    color: var(--text-dark); /* Ensure number is visible */
    background: rgba(20, 40, 84, 0.4);
}
body.dark-theme .service-info h3 {
    color: var(--text-dark);
}
body.dark-theme .service-info p {
    color: var(--muted);
}
body.dark-theme .service-btn {
    background: var(--brand-red); 
    color: var(--white);
}
body.dark-theme .service-btn:hover {
    background: var(--brand-blue);
}
body.dark-theme .vm-section {
    background: var(--card-bg); 
}
body.dark-theme .vm-card {
    background: var(--bg-soft); 
    box-shadow: var(--shadow-1);
}
body.dark-theme .vm-card h3 {
    color: var(--text-dark);
}
body.dark-theme .vm-card p {
    color: var(--muted);
}
body.dark-theme .support-section {
    background: linear-gradient(135deg, rgba(20, 40, 84, 0.05), rgba(230, 57, 70, 0.05));
}
body.dark-theme .support-content {
    background: var(--card-bg);
    box-shadow: var(--shadow-2);
}
body.dark-theme .support-content h3 {
    color: var(--text-dark);
}
body.dark-theme .support-content i {
    color: var(--brand-red);
}
body.dark-theme .support-content .journey-item {
    color: var(--text-dark);
    border-left-color: var(--brand-blue);
}

body.dark-theme .start-project-cta {
    background: linear-gradient(135deg, rgba(20, 40, 84, 0.4), rgba(230, 57, 70, 0.2));
    box-shadow: var(--shadow-2);
}
body.dark-theme .start-project-cta h2 {
    color: var(--text-dark);
}


/* Footer Dark Theme Styling (Universal) */
body.dark-theme footer {
  background: linear-gradient(135deg, #0e1e3b, var(--brand-blue)) !important; 
  color: var(--white);
}
body.dark-theme .footer-section h3 {
    color: var(--white) !important; 
}

/* FIX: Section Title Dark Mode */
body.dark-theme .section-title h2 {
    background: none !important;
    -webkit-background-clip: unset !important;
    color: var(--text-dark) !important;
    -webkit-text-fill-color: var(--text-dark) !important;
}


/* =======================================
   END DARK THEME STYLES
   ======================================= */


/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-main);
}

body {
  background: #fff;
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h2 {
  display: inline-block;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 2rem;
  font-weight: 700;
}

/* =====================
     HEADER (UNIFIED)
  ====================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.5rem;
  background: var(--glass);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 30px rgba(2, 6, 23, .12)
}

.logo img {
  height: 52px
}

nav ul {
  display: flex;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0
}

nav ul li a {
  color: var(--brand-blue);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: color var(--transition)
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--brand-red)
}

/* New: Header Actions container */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px; 
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer
}

.hamburger span {
  width: 26px;
  height: 3px;
  background: var(--brand-blue);
  border-radius: 3px;
  transition: .3s;
}

/* Hamburger animations */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media(max-width:920px) {
    .hamburger { display: flex; }

    nav ul {
        position: fixed;
        top: 72px;
        right: 12px;
        background: linear-gradient(180deg, var(--white), var(--bg-soft));
        flex-direction: column;
        color: var(--text-dark);
        padding: 1rem;
        border-radius: var(--radius);
        box-shadow: var(--shadow-2);
        display: none;
        width: 220px;
    }

    nav ul.show { display: flex; }
}

/* ==========================
   GLOBAL SCROLL FADE-IN ANIMATION
========================== */
.fade-in-section:not(.services-modern) {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 0.8s ease-out;
}

/* Services section should start visible, let the cards fade in */
.services-modern {
    opacity: 1; 
    transition: none; 
}
.fade-in-section.show {
    opacity: 1;
    transform: translateY(0);
}


/* ==========================
   SERVICES SECTION (MODERN)
========================== */
.services-modern {
    padding: 6rem 1rem;
    background: var(--bg-light);
    margin-top: 72px;
    position: relative;
    overflow: hidden;
}

.services-modern .section-title h2 {
  font-size: 2.2rem;
  font-weight: 800;
}

.subtitle {
    max-width: 800px;
    margin: 0.5rem auto 2.5rem;
    color: var(--muted);
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: auto;
}

.service-card-modern {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 1s ease-out, transform 0.8s ease-out; /* Combined transitions */
    border-bottom: 4px solid var(--primary-color);
    opacity: 0;
    transform: translateY(30px);
    position: relative; /* Needed for absolute positioning of service-number */
}
.service-card-modern.show {
    opacity: 1;
    transform: translateY(0);
}

/* Service Card Numbering */
.service-number {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--brand-blue);
    opacity: 0.15;
    z-index: 2;
    transition: opacity 0.4s ease, color 0.4s ease;
    line-height: 1;
    pointer-events: none;
}

.service-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2);
    border-color: var(--secondary-color);
}
.service-card-modern:hover .service-number {
    opacity: 0.4;
    color: var(--brand-red);
}


.service-img {
    position: relative;
    height: 200px; 
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-img img {
    width: 100%;
    max-height: 200px;
    height: auto;
    object-fit: cover; /* FIX: Image containment */
    transition: transform 3s ease;
}

.service-card-modern:hover .service-img img {
    transform: scale(1.05);
}

/* Red line top */
.service-card-modern::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 4px;
  background: linear-gradient(45deg, #1c0068, #e63946);
  box-shadow: 0 0 10px rgba(230, 57, 70, 0.5);  
  transition: all 0.4s ease;
  transform: translateX(-50%);
  z-index: 5;
  border-radius: 0 0 3px 3px;
}

.service-card-modern:hover::before {
  width: 100%;
}

.service-info {
    padding: 1.8rem 1.4rem;
    text-align: center;
}

.service-info h3 {
    font-size: 1.4rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.service-info p {
    color: var(--muted);
    margin-bottom: 1rem;
    min-height: 4.8em; 
}

.service-btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    padding: 0.6rem 1.4rem;
    border-radius: 30px;
    transition: all 0.4s ease;
    font-size: 0.9rem;
}

.service-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(20, 40, 84, 0.2);
}

/* Subtle Gradient Background */
.services-modern::before,
.services-modern::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  z-index: 0;
}
.services-modern::before {
  width: 300px;
  height: 300px;
  top: 80px;
  left: -100px;
  background: var(--brand-blue);
}
.services-modern::after {
  width: 350px;
  height: 350px;
  bottom: 60px;
  right: -120px;
  background: var(--brand-red);
}


/* Vision Mission Section */
.vm-section {
    padding: 4rem 1rem;
    background: var(--card-bg);
}

.vm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.vm-card {
    background: var(--bg-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    text-align: center;
    padding: 2rem 1.5rem;
    transition: var(--transition), opacity 1s ease-out 0.2s, transform 0.8s ease-out 0.2s; /* Added scroll animation */
    opacity: 0;
    transform: translateY(30px);
}

.vm-card.show {
    opacity: 1;
    transform: translateY(0);
}

.vm-card:nth-child(1) { transition-delay: 0s; } /* Staggering for visual effect */
.vm-card:nth-child(2) { transition-delay: 0.15s; }
.vm-card:nth-child(3) { transition-delay: 0.3s; }

.vm-card i {
    font-size: 2.2rem;
    color: var(--brand-red);
    margin-bottom: 1rem;
}

.vm-card h3 {
    color: var(--brand-blue);
    margin-bottom: 0.6rem;
    font-weight: 700;
}

.vm-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-2);
}

/* --- Dedicated Support Section --- */
.support-section {
    padding: 4rem 1rem;
    background: linear-gradient(135deg, rgba(20, 40, 84, 0.05), rgba(230, 57, 70, 0.05));
    text-align: center;
}

.support-content {
    max-width: 850px;
    margin: 0 auto;
    padding: 3rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
}

.support-content i {
    font-size: 3.5rem;
    color: var(--brand-red);
    margin-bottom: 1rem;
}

.support-content h3 {
    font-size: 2rem;
    color: var(--brand-blue);
    margin-bottom: 1rem;
    font-weight: 800;
}

.support-content .journey-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
    font-weight: 600;
    color: var(--text-dark);
}

.support-content .journey-item {
    padding: 0.5rem;
    border-left: 3px solid var(--brand-blue);
    padding-left: 10px;
}
/* Ensure links use the button style */
.support-content .btn {
    margin-top: 2rem;
}


/* Start Project CTA */
.start-project-cta {
    padding: 3rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(20, 40, 84, 0.05), rgba(230, 57, 70, 0.05));
    border-radius: var(--radius);
    margin: 4rem auto;
    max-width: 90%;
    box-shadow: var(--shadow-1);
}
.start-project-cta h2 {
    font-size: 2rem;
    color: var(--brand-blue);
    margin-bottom: 0.5rem;
}
.start-project-cta p {
    color: var(--muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}
.start-project-cta .btn {
    margin-top: 0;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.start-project-cta .btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 50px;
  right: 22px;
  width: 50px;
  height: 50px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  z-index: 1200;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  transition: transform .3s ease;
  animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background: #1ebe57;
}

/* Nice pulse animation */
@keyframes whatsappPulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
  70% { box-shadow: 0 0 0 20px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* Hide on small phones if needed */
@media(max-width:600px) {
  .whatsapp-float {
    bottom: 18px;
    right: 18px;
    width: 52px;
    height: 52px;
    font-size: 1.7rem;
  }
}



/* FOOTER */
footer {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
  color: var(--white);
  padding: 3rem 1rem 1rem;
  margin-top: 1.5rem
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto
}

.footer-section h3 {
  color: #fff;
  margin-bottom: 1rem;
  font-weight: 700;
  border-bottom: 2px solid rgba(255, 255, 255, .08);
  padding-bottom: .5rem
}

.footer-section p,
.footer-section ul {
  font-size: .95rem;
  color: rgba(255, 255, 255, .9)
}

.footer-section ul {
  list-style: none;
  padding: 0
}

.footer-section ul li {
  margin-bottom: .5rem
}

.footer-section a {
  color: rgba(255, 255, 255, .9);
  transition: color .3s
}

.footer-section a:hover {
  color: var(--brand-red)
}

.footer-social a {
  font-size: 1.4rem;
  margin-right: 1.2rem;
  transition: color .3s, transform .3s
}

.footer-social a:hover {
  color: var(--brand-red);
  transform: scale(1.08)
}


.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .12)
}

.footer-bottom p {
  font-size: .85rem;
  margin: 0;
  color: rgba(255, 255, 255, .75)
}
/* Footer Map Responsive Fix */
.footer .map-section iframe {
  width: 100% !important;
  height: 220px;
  border-radius: 10px;
  border: 0;
  display: block;
}

/* Focus */
a:focus,
button:focus,
input:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 6px rgba(20, 40, 84, .06);
  border-radius: 8px
}

/* RESPONSIVE */
@media(max-width:1100px) {
  .hero-text h1 {
    font-size: 2.05rem
  }

  .project-card img {
    height: 220px
  }

  .gallery-swiper .swiper-slide img {
    height: 340px
  }
}

@media(max-width:920px) {
  .about-container {
    grid-template-columns: 1fr
  }

  .usp-grid {
    grid-template-columns: 1fr
  }

  nav ul {
    display: none
  }

  .hamburger {
    display: flex
  }

  nav ul.show {
    display: flex;
    position: fixed;
    top: 72px;
    right: 12px;
    background: var(--card-bg);
    flex-direction: column;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-2);
    width: 220px
  }

  .search-bar input,
  .search-bar select {
    width: 100%
  }

  .search-card {
    flex-direction: column;
    text-align: center
  }

  .search-card img {
    max-height: 220px;
    width: 100%
  }

  .search-card-actions {
    justify-content: center
  }
}

@media(max-width:600px) {
  .logo img {
    height: 40px
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center
  }

  .footer-bottom p:first-child {
    order: 2
  }

  .masonry-grid {
    column-count: 1
  }

  .hero {
    min-height: 62vh
  }
}