/* Font imports */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');

/* Variables */
:root {
  --primary: #000000;       /* Black */
  --secondary: #CCCCCC;     /* Light gray for secondary text */
  --accent: #FFFFFF;        /* White */
  --gold: #D4AF37;          /* Classic gold color */
  --gold-dark: #B7950B;     /* Darker gold for hover states */
  --transition: all 0.3s ease;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--accent);
  background-color: var(--primary);
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Mobile image fixes - ensure images fit properly on mobile */
@media (max-width: 768px) {
  img {
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
  }
  
  /* Keep aspect ratios for images with fixed containers */
  img[style*="object-fit"] {
    object-fit: cover;
  }
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--gold);
  color: var(--primary);
  border: none;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover {
  background-color: var(--gold-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

/* Section Styles */
.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  color: var(--accent);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--gold);
  margin: 15px auto;
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--secondary);
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
}

/* Navbar Styles */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  padding: 15px 0;
  z-index: 1000;
  transition: var(--transition);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.navbar.scrolled {
  padding: 10px 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar-logo {
  display: flex;
  align-items: center;
}

.logo-svg {
  width: 180px;
  height: 50px;
}

.navbar-menu {
  display: flex;
  align-items: center;
}

.navbar-item {
  margin-left: 30px;
  position: relative;
}

.navbar-link {
  color: var(--accent);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.navbar-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--gold);
  transition: var(--transition);
}

.navbar-link:hover {
  color: var(--gold);
}

.navbar-link:hover::after {
  width: 100%;
}

.navbar-toggle {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
}

.bar {
  height: 3px;
  width: 100%;
  background-color: var(--accent);
  transition: var(--transition);
}

/* Contact */
.contact-info {
  display: grid;
  gap: 20px;
}

.contact-item {
  display: flex;
  gap: 12px;
  color: var(--secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.contact-item i {
  color: var(--gold);
  margin-top: 3px;
}

.contact-item a {
  color: var(--secondary);
  transition: var(--transition);
}

.contact-item a:hover {
  color: var(--gold);
}

/* Footer Social */
.footer-social {
  margin-top: 30px;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(212, 175, 55, 0.1);
  border-radius: 50%;
  transition: var(--transition);
  color: var(--gold);
  font-size: 1rem;
}

.social-icon:hover {
  background-color: var(--gold);
  color: var(--primary);
  transform: translateY(-3px);
}

/* Footer Newsletter */
.footer-newsletter {
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 50px;
  text-align: center;
}

.footer-newsletter h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.footer-newsletter p {
  color: var(--secondary);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.newsletter-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 20px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(0, 0, 0, 0.5);
  color: var(--accent);
  border-radius: 4px 0 0 4px;
  font-family: 'Poppins', sans-serif;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--gold);
}

.btn-subscribe {
  padding: 12px 25px;
  background-color: var(--gold);
  color: var(--primary);
  border: none;
  border-radius: 0 4px 4px 0;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
}

.btn-subscribe:hover {
  background-color: var(--gold-dark);
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--gold);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--gold-dark);
  transform: translateY(-5px);
}

/* Responsive Styles */
@media (max-width: 992px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: span 2;
    text-align: center;
    align-items: center;
  }

  .footer-title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-certifications {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input,
  .btn-subscribe {
    border-radius: 4px;
    width: 100%;
  }

  .btn-subscribe {
    margin-top: 10px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 15px;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .footer {
    padding-top: 60px;
  }

  .footer-container {
    padding: 0 20px;
  }

  .footer-newsletter {
    padding: 25px 20px;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
  }
}

/* Prevent zoom on mobile input */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px; /* Prevents zoom on focus in iOS */
  }

  body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }
}

/* Improve touch targets for mobile */
@media (max-width: 768px) {
  .btn, .navbar-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* =========================================
   ✅ CLEAN MOBILE NAV (single source of truth)
   Fixes:
   - ghost overlay blocking page taps
   - overextending menu height
   - conflicting z-index rules
   - risky body fixed scroll lock
========================================= */
@media (max-width: 768px) {
  .navbar-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1002;
  }

  .navbar-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100dvh - 70px);
    background-color: rgba(0, 0, 0, 0.98);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 30px 0;
    transition: left 0.3s ease;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    z-index: 1001;

    /* ✅ critical: do NOT block page taps when closed */
    pointer-events: none;
  }

  .navbar-menu.active {
    left: 0;
    pointer-events: auto;
  }

  .navbar-item {
    margin: 0;
    width: 100%;
    text-align: center;
    opacity: 1;
    transform: none;
  }

  .navbar-link {
    display: block;
    padding: 18px 20px;
    font-size: 1.15rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    width: 100%;
  }

  /* Hamburger animation */
  .navbar-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .navbar-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .navbar-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
}

/* ✅ Safe scroll lock (no fixed body) */
body.menu-open {
  overflow: hidden;
}
