/* 9UNIVERSE INFRACON — Optimized Theme v4 (MODIFIED) */
:root {
  --brand-red: #e63946;
  --brand-blue: #142854;
  --brand-blue-2: #0f2a57;
  --accent-grad: linear-gradient(135deg, var(--brand-blue), #1e3a8a 45%, var(--brand-red));
  --bg-soft: #fbfcff;
  --panel-grad: linear-gradient(180deg, rgba(20, 40, 84, .03), rgba(230, 57, 70, .02));
  --glass: rgba(255, 255, 255, .96);
  --glass-2: rgba(255, 255, 255, .9);
  --white: #fff;
  --muted: #6b7280;
  --text-dark: #0f172a;
  --card-bg: rgba(255, 255, 255, .98);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-1: 0 8px 28px rgba(20, 40, 84, .08);
  --shadow-2: 0 14px 40px rgba(20, 40, 84, .12);
  --glow: 0 8px 28px rgba(230, 57, 70, .08);
  --transition: .32s cubic-bezier(.2, .9, .2, 1);
  --font-sans: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  --h1: 2.6rem;
  --h2: 1.8rem;
  --base: 16px;
  --max-width: 1400px; /* fixed container width */}

/* =======================================
   DARK THEME VARIABLES AND STYLES (UNIVERSALIZED)
   ======================================= */
body.dark-theme {
  --bg-soft: #1c1c1c; 
  --panel-grad: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .01));
  --glass: rgba(28, 28, 28, .96);
  --glass-2: rgba(28, 28, 28, .9);
  --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 {
  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); 
}

/* Contact Specific Dark Mode Fixes */
body.dark-theme .contact-section,
body.dark-theme .map {
    background: var(--bg-soft);
}

body.dark-theme .contact-info h2 {
    color: var(--text-dark);
}

body.dark-theme .contact-info a {
    color: var(--text-dark);
}

body.dark-theme .contact-form {
    background: var(--card-bg); 
    box-shadow: var(--shadow-2);
}

body.dark-theme .contact-form h2 {
    color: var(--text-dark);
}

body.dark-theme .contact-form input,
body.dark-theme .contact-form textarea {
    background: var(--bg-soft);
    border-color: rgba(255, 255, 255, .2);
    color: var(--text-dark);
}

body.dark-theme .site-footer {
    background: linear-gradient(135deg, #0e1e3b, var(--brand-blue)); 
}


/* =======================================
   END DARK THEME STYLES
   ======================================= */


* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  font-size: var(--base);
  overflow-x: hidden
}

img {
  max-width: 100%;
  display: block;
  height: auto
}

a {
  text-decoration: none;
  color: inherit
}

button {
  font-family: inherit
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem
}

/* HEADER */
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; /* Space between button and hamburger */
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer
}

.hamburger span {
  width: 26px;
  height: 3px;
  background: var(--brand-blue);
  border-radius: 3px
}

#theme-toggle-btn:hover {
  color: var(--brand-red) !important; 
  transform: scale(1.1);
}

@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: 12px;
    box-shadow: var(--shadow-2);
    display: none;
    width: 220px
  }

  nav ul.show {
    display: flex
  }
}


/* Hero */
.contact-hero { 
  background: linear-gradient(135deg, #1e3c72, #2a5298, #e63946);
  background-size: 300% 300%;
  animation: gradientMove 8s infinite alternate;
  color: #fff;
  text-align: center;
  padding: 6rem 2rem;
  margin-top: 72px; /* Add header offset */
}

.contact-hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  padding-top: 5%;
  animation: fadeDown 1.2s ease;
}

.contact-hero p {
  font-size: 1.2rem;
}

/* Contact Section */
.contact-section {
  padding: 5rem 2rem;
  background: var(--bg-soft);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
  align-items: start;
}

/* Contact Info */
.contact-info h2 {
  margin-bottom: 1.5rem;
  color: var(--brand-blue);
  position: relative;
  
}

.contact-info h2::after {
  content: "";
  width: 50px;
  height: 3px;
  background: var(--brand-red);
  position: absolute;
  left: 0;
  bottom: -8px;
}

.contact-info p {
  margin: 1rem 0;
  font-size: 1rem;
}

.contact-info i {
  color: var(--brand-red);
  margin-right: 0.6rem;
}

.contact-info a {
  color: var(--text-dark);
  transition: color 0.3s;
}

.contact-info a:hover {
  color: var(--brand-red);
}

/* Social Icons for Contact Info */
.contact-info .social-icons {
    margin-top: 1rem;
    display: flex;
    gap: 1.2rem;
}

.contact-info .social-icons a {
    font-size: 1.4rem;
    color: var(--muted);
    transition: transform 0.3s, color 0.3s;
}

.contact-info .social-icons a:hover {
    color: var(--brand-red);
    transform: scale(1.2);
}


/* Form */
.contact-form {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: var(--shadow-1);
  transition: transform 0.3s;
  opacity: 1; 
}

.contact-form:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2);
}

.contact-form h2 {
  margin-bottom: 1.5rem;
  color: var(--brand-blue);
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  transition: border 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 8px rgba(20, 40, 84, 0.2);
  outline: none;
}

.contact-form button {
  padding: 1rem;
  border: none;
  border-radius: 30px;
  background: linear-gradient(45deg, var(--brand-red), #d62828);
  color: var(--white);
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.contact-form button:hover {
  transform: scale(1.02);
  box-shadow: 0 5px 15px rgba(230, 57, 70, 0.4);
}

/* Map */
.map {
    padding: 0 1rem 3rem;
    background: var(--bg-soft);
}
.map iframe {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}


/* 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;
  }
}



a:focus,
button:focus,
input:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 6px rgba(20, 40, 84, .06);
  border-radius: 8px
}

.btn:active {
  transform: translateY(-2px)
}

input::placeholder {
  color: rgba(15, 23, 42, .35)
}

/* RESPONSIVE */
@media(max-width:1100px) {
  .hero-text h1 {
    font-size: 2.05rem
  }

  .project-card img {
    height: 200px
  }

  .gallery-swiper .swiper-slide img {
    height: 340px
  }
}

@media(max-width:920px) {
  .about-container {
    grid-template-columns: 1fr
  }

  .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
  }

  .search-card h4 {
    margin-top: .5rem
  }
}

@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; /* Put copyright below email */
    }
}


/* Animations */
@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll animations */
[data-animate] {
  opacity: 0;
  transition: all 1s ease;
}

[data-animate].animated {
  opacity: 1;
  transform: translate(0, 0);
}

[data-animate="fade-left"] {
  transform: translateX(-50px);
}

[data-animate="fade-right"] {
  transform: translateX(50px);
}

[data-animate="fade-up"] {
  transform: translateY(50px);
}

/* Responsive */
@media(max-width: 768px) {
  .contact-hero h1 {
    font-size: 2.5rem;
  }

  .contact-hero p {
    font-size: 1.1rem;
  }
  .map iframe {
      height: 300px;
  }
}
@media(max-width: 600px) {
    .contact-hero h1 {
    font-size: 2rem;
  }
    .contact-grid {
        gap: 2rem;
    }
}