/* ========== GLOBAL VARIABLES & RESET ========== */
:root {
  /* Core Colors - Sophisticated Combo */
  --primary-color: #3047cb;
  --secondary-color: #25D366;
  --accent-color: #f39c12;
  
  /* Light Theme Defaults */
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --text-primary: #212529;
  --text-secondary: #9e9e9e;
  --border-color: #dee2e6;
  --section-bg: #2d2d2d;
  --footer-bg: #262324;
  --hero-bg: #3047cb;
  --hero-text: #ffffff;

  /* Typography */
  --font-body: 'Inter', Arial, sans-serif;
  --fs-base: 18px;
  --fs-sm: 0.875rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.5rem;

  /* Spacing */
  --space-unit: 1rem;
  --space-xs: calc(var(--space-unit) * 0.5);
  --space-sm: calc(var(--space-unit) * 0.75);
  --space-md: calc(var(--space-unit) * 1.5);
  --space-lg: calc(var(--space-unit) * 2);
  --space-xl: calc(var(--space-unit) * 3);

  /* Border Radius */
  --border-radius: 8px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
}

/* Dark Theme */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #90caf9;
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --text-primary: #e0e0e0;
    --text-secondary: #9e9e9e;
    --border-color: #333333;
    --section-bg: #1a1a1a;
    --footer-bg: #121212;
    --hero-bg: #3047cb;
  }
}

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.8;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accessibility */
.btn:focus, .form-control:focus, a:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ========== HEADER & NAVIGATION ========== */
header {
  background-color: var(--hero-bg);
  padding: 0.4rem 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 50px;
}

.logo {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  height: 100%;
}

/* Logo image styles */
.logo-img {
  height: 35px;
  width: auto;
  display: block;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  display: flex;
  align-items: center;
  height: 100%;
}

/* Fallback: Show text if image fails to load */
.logo-img:not([src]) + .logo-text,
.logo-img[src=""] + .logo-text,
.logo-img[src*="undefined"] + .logo-text {
  display: flex !important;
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  margin-left: auto;
  margin-top: 0.1rem;
  padding: 0;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  font-size: 1rem;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius);
  transition: background-color 0.2s ease;
  line-height: 1.2;
}

.nav-links a:hover,
.nav-links a:focus {
  background-color: rgba(255, 255, 255, 0.2);
  outline: 2px solid white;
  outline-offset: 2px;
}

.whatsapp-btn {
  background-color: var(--secondary-color) !important;
  color: white !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 1rem;
  line-height: 1.2;
  border: none !important;
}

.whatsapp-btn:hover {
  background-color: #128C7E !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  color: white !important;
}

/* ========== FLOATING WHATSAPP BUTTON ========== */
.floating-whatsapp {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 1rem;
  background-color: var(--secondary-color);
  color: white;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: all 0.3s ease;
}

.floating-whatsapp:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

.floating-whatsapp:hover {
  background-color: #128C7E;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* ========== HERO SECTION ========== */
.hero {
  background: linear-gradient(135deg, var(--hero-bg) 0%, #2539a1 100%);
  color: var(--hero-text);
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: var(--fs-3xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

.hero p {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-lg);
  opacity: 0.95;
}

/* ========== BUTTONS ========== */
.btn-primary {
  background-color: var(--secondary-color);
  color: white;
  font-size: var(--fs-lg);
  font-weight: 600;
  padding: var(--space-sm) var(--space-md);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: #128C7E;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* ========== MAIN CONTENT ========== */
main {
  flex: 1;
  padding: var(--space-xl) 0;
}

.section {
  padding: var(--space-xl) 0;
}

.bg-light {
  background-color: var(--bg-primary);
}

/* ========== SERVICES GRID ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.service-item {
  background: var(--bg-secondary);
  padding: var(--space-lg);
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}

.service-item:hover {
  transform: translateY(-5px);
}

/* ========== GOOGLE FORM STYLING ========== */
.form-container {
  max-width: 700px;
  margin: 0 auto;
}

.iframe {
  border-radius: var(--border-radius);
  border: none;
  width: 100%;
  height: 1330px;
}

/* ========== FOOTER ========== */
.extFooter {
  background: var(--footer-bg);
  color: var(--text-secondary);
  padding: 1rem 0 0.8rem;
  margin-top: auto;
  font-size: 0.75rem;
}

.license-info, .copyright, .footer-links a {
  line-height: 1.3;
  margin-bottom: 0.2rem;
  color: var(--text-secondary);
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #f8f9fa;
  text-decoration: none;
}

/* Mobile Footer */
.extFooter.d-md-none {
  padding: 1.5rem 0;
  text-align: center;
}

.extFooter.d-md-none .license-info {
  font-size: 0.9rem;
  line-height: 1.4;
}

.extFooter.d-md-none .footer-links a {
  display: inline-block;
  margin: 0 0.5rem;
}

footer:not(.extFooter) {
  display: none;
}

/* ========== HAMBURGER MENU ========== */
.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  gap: 4px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  overflow: hidden;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: white;
  transition: all 0.3s ease;
  border-radius: 2px;
  display: block;
  position: relative;
}

.hamburger::before,
.hamburger::after,
.hamburger span::before,
.hamburger span::after {
  content: none !important;
}

.hamburger:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* ========== RESPONSIVE ========== */

/* Desktop logo size */
@media (min-width: 1025px) {
  .logo-img {
    height: 45px;
  }
}

/* Tablet & Mobile: Up to 1024px - Hamburger menu */
@media (max-width: 1024px) {
  .logo-text {
    display: none;
  }
  
  .logo {
    gap: 0;
  }
  
  .hamburger {
    display: flex;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--hero-bg);
    flex-direction: column;
    padding: var(--space-md);
    box-shadow: var(--shadow-md);
    z-index: 99;
    gap: 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a:not(.whatsapp-btn) {
    display: block;
    padding: var(--space-sm);
    text-align: center;
    width: 100%;
    color: white;
  }

  .nav-links .whatsapp-btn {
    display: none;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
}

/* Mobile-only adjustments: Up to 768px */
@media (max-width: 768px) {
  :root {
    --fs-3xl: 2rem;
    --fs-2xl: 1.75rem;
  }
  
  .hero {
    padding: var(--space-lg) var(--space-sm);
    min-height: 50vh;
  }
  
  nav .container {
    flex-direction: row;
    gap: var(--space-sm);
  }
  
  .nav-links {
    display: none;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-links a,
  .whatsapp-btn {
    font-size: 1.125rem;
  }
  
  .floating-whatsapp {
    display: flex;
  }
}

/* ========== REDUCED MOTION SUPPORT ========== */
@media (prefers-reduced-motion: reduce) {
  .hamburger span,
  .whatsapp-btn,
  .floating-whatsapp,
  .service-item {
    transition: none;
  }
}
