/* ==========================================================================
   Esthetic Work - Global Stylesheet (style.css)
   Fidelity: Pixel-Perfect to Figma Design (Width: 1280px, responsive adaptation)
   ========================================================================== */

/* 1. Imports */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

/* 2. Design System Tokens */
:root {
  /* Brand / Primary colors */
  --color-primary: #00436F;         /* Dark blue for text & primary buttons */
  --color-secondary: #1E5B8C;       /* Accent blue for Hero in Nosotros */
  --color-dark-navy: #001D34;       /* Deep navy blue for headings */
  --color-light-blue: #A9D2FF;      /* Light highlights */
  --color-soft-blue: #CFE4FF;       /* Soft blue backgrounds/text */

  /* Neutral colors */
  --color-white: #FFFFFF;
  --color-bg-navbar: #FFFFFF; /* TopNavBar solid white */
  --color-bg-light: #F6F3F2;        /* Sections background */
  --color-bg-footer: #F0EDED;       /* Footer background */
  --color-border-gray: #EAE7E7;     /* Borders & backgrounds */
  --color-border-nav: #C1C7D0;      /* TopNavBar border */
  --color-border-divider: #727780;  /* Footer horizontal border */
  --color-text-near-black: #1B1B1C;  /* Principal body text */
  --color-text-dark: #41474F;        /* Secondary body text */
  --color-text-muted: #5C5F61;       /* Gray body text */
  --color-text-placeholder: #6B7280;  /* Form placeholders */
  --color-black: #000000;

  /* Service Card Overlay Accents & Shadows */
  --color-whatsapp: #25D366;        /* Official WhatsApp green */
  --color-green-solid: #2E7D32;
  --color-green-overlay: rgba(76, 175, 80, 0.1);
  --color-orange-solid: #E65100;
  --color-orange-overlay: rgba(255, 112, 67, 0.1);
  --color-rust-solid: #BF360C;
  --color-yellow-overlay: rgba(255, 183, 77, 0.1);
  --color-blue-solid: #0D47A1;
  --color-blue-overlay: rgba(33, 150, 243, 0.2);
  --color-purple-solid: #4527A0;
  --color-purple-overlay: rgba(126, 87, 194, 0.1);

  /* Elevation Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-premium: 0 20px 40px rgba(0, 0, 0, 0.08);

  /* Fonts Settings */
  --font-family: 'Montserrat', sans-serif;
}

/* 3. Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
}

body {
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: var(--color-text-near-black);
  background-color: var(--color-white);
  overflow-x: hidden;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  color: var(--color-dark-navy);
  font-weight: 700;
  line-height: 1.35; /* Prevent line overlapping for larger headings */
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

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

/* Base Border-Radius for Content Images */
img:not(.logo-icon):not(.hero-logo-main):not(.tech-detail-img-icon):not(.whatsapp-icon-img) {
  border-radius: 16px;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* 4. Global Layout Components */
.container {
  width: 100%;
  max-width: 1200px; /* Centered layout matching 1200px frames inside 1280px */
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* 5. Header / Navigation Bar */
header {
  position: sticky;
  top: 0;
  width: 100%;
  height: 81px;
  background-color: var(--color-bg-navbar);
  border-bottom: 1px solid var(--color-border-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
}

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

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 32px;
  height: 32px;
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  color: #00436F;
  letter-spacing: 0.5px;
}

nav.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav.desktop-nav a {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #00436F;
  padding: 8px 0;
  position: relative;
}

nav.desktop-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width 0.3s ease;
}

nav.desktop-nav a:hover,
nav.desktop-nav a.active {
  color: var(--color-primary);
}

nav.desktop-nav a:hover::after,
nav.desktop-nav a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--color-dark-navy);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Mobile Nav Styles */
.mobile-nav-overlay {
  position: fixed;
  top: 81px;
  left: 0;
  width: 100%;
  height: calc(100vh - 81px);
  background-color: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 998;
}

.mobile-nav {
  position: fixed;
  top: 81px;
  right: -280px;
  width: 280px;
  height: calc(100vh - 81px);
  background-color: var(--color-white);
  box-shadow: -4px 0 15px rgba(0,0,0,0.1);
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: right 0.3s cubic-bezier(0.77, 0.2, 0.05, 1.0);
  z-index: 999;
}

.mobile-nav a {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: #00436F;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-gray);
}

.mobile-nav a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

body.nav-open {
  overflow: hidden;
}

body.nav-open .mobile-nav-overlay {
  opacity: 1;
  visibility: visible;
}

body.nav-open .mobile-nav {
  right: 0;
}

body.nav-open .menu-toggle span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

body.nav-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .menu-toggle span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* 6. Footer Styles */
footer {
  position: relative;
  padding: 60px 0 30px;
  border-top: 1px solid var(--color-border-gray);
  background-color: var(--color-white);
  overflow: hidden;
  margin-top: auto;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/images/footer-bg.png') no-repeat center center;
  background-size: cover;
  opacity: 0.2; /* 20% opacity for background pattern */
  z-index: 1;
  pointer-events: none;
}

.footer-top, .footer-bottom {
  position: relative;
  z-index: 2;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #00436F; /* Blue color for logo text */
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 20px;
  max-width: 320px;
}

.footer-column h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  color: #00436F; /* Blue color for headings */
}

.footer-column ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-column ul a {
  font-size: 13px;
  color: var(--color-text-dark);
}

.footer-column ul a:hover {
  color: var(--color-primary);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--color-border-divider);
  padding-top: 24px;
  text-align: center;
}

.footer-bottom p {
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 0.3px;
}

/* 7. WhatsApp FAB */
.whatsapp-fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  background-color: var(--color-whatsapp);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
  z-index: 999;
  cursor: pointer;
  animation: pulse-whatsapp 2s infinite;
  transition: transform 0.2s ease;
}

.whatsapp-fab:hover {
  transform: scale(1.1);
}

.whatsapp-fab svg {
  width: 30px;
  height: 30px;
  fill: var(--color-white);
}

/* Animations */
@keyframes pulse-whatsapp {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Button & Card Micro-Animations */
.premium-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-primary);
  color: var(--color-white);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 28px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
}

.premium-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.premium-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background-color: #002d4b;
}

.premium-btn:hover::after {
  opacity: 1;
}

.premium-btn:active {
  transform: translateY(0);
}

.secondary-btn {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  box-shadow: none;
}

.secondary-btn:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* 8. Media Queries for Responsive Adaptability */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  header {
    height: 70px;
  }
  .header-container {
    height: 100%;
  }
  nav.desktop-nav {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .mobile-nav-overlay {
    top: 70px;
    height: calc(100vh - 70px);
  }
  .mobile-nav {
    top: 70px;
    height: calc(100vh - 70px);
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .whatsapp-fab {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
  }
  .whatsapp-fab svg {
    width: 24px;
    height: 24px;
  }
}
