/* Import Google Fonts: Playfair Display, Montserrat, and Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* Color Variables & Reset */
:root {
  --primary-color: #000000;
  --accent-color: #6d28d9; /* Elegant Purple */
  --bg-main: #ffffff;
  --bg-header: #f3f4f6;    /* Light Gray */
  --bg-footer: #111111;    /* Black */
  --text-dark: #1f2937;    /* Charcoal */
  --text-light: #ffffff;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography styles */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: 0.5px;
}

h2.section-title {
  text-align: center;
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  margin: clamp(2rem, 6vw, 3rem) auto 1.5rem auto;
  position: relative;
  width: fit-content;
  max-width: 90%;
  color: var(--primary-color);
}


/* Header Styles */
header {
  background-color: var(--bg-header);
  width: 100%;
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
}

.logo-header {
  height: clamp(64px, 11vw, 130px); /* Fluidly scales from mobile to desktop */
  width: auto;
  object-fit: contain;
  transition: transform var(--transition-smooth);
}

.logo-header:hover {
  transform: scale(1.02);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

/* Hamburger toggle - hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 46px;
  height: 46px;
  padding: 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  z-index: 1100;
  transition: background-color var(--transition-smooth);
}

.nav-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px;
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

/* Animate to an "X" when the menu is open */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Navigation Links */
nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav ul li a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 1px;
  transition: color var(--transition-smooth);
  position: relative;
  padding: 0.5rem 0;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width var(--transition-smooth);
}

nav ul li a:hover {
  color: var(--accent-color);
  cursor: pointer;
}

nav ul li a:hover::after {
  width: 100%;
}

nav ul li.active a {
  color: var(--accent-color);
}

nav ul li.active a::after {
  width: 100%;
}

/* Social Media Buttons Header */
.social-header {
  display: flex;
  gap: 0.75rem;
}

.social-header a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: var(--text-light);
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.2rem;
  transition: background-color var(--transition-smooth), transform var(--transition-smooth);
  cursor: pointer;
}

.social-header a:hover {
  background-color: var(--accent-color);
  transform: translateY(-3px);
}

/* Main Section Base */
main {
  background-color: var(--bg-main);
  min-height: 60vh;
  min-height: 60dvh; /* dvh accounts for mobile browser chrome */
}

/* HOME PAGE STYLES */
.hero-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.hero-img {
  width: 100%;
  height: clamp(220px, 45vw, 550px); /* Consistent hero band across screen sizes */
  object-fit: cover;
  display: block;
}

.about-text {
  max-width: 800px;
  margin: 0 auto 3rem auto;
  text-align: justify;
  font-size: 1.15rem;
  color: #4b5563;
  padding: 0 1.5rem;
}

.location-description {
  text-align: center;
  font-size: 1.15rem;
  color: #4b5563;
  margin-bottom: 1.5rem;
  padding: 0 1.5rem;
}

.map-container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto 4rem auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  border: none;
  margin-top: 0;
}

.map-container iframe {
  width: 100%;
  height: 460px;
  border: 0;
  display: block;
}


.differentials-container {
  max-width: 1248px;
  margin: 0 auto 6rem auto;
  padding: 0 1.5rem;
  text-align: center;
}

.differentials-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 52px;
  margin-bottom: 3.5rem;
}

.differential-card {
  font-family: 'Inter', sans-serif;
  background: #ffffff;
  border-radius: 14px;
  padding: 44px 28px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e2e8f0;
}

.differential-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
}

.differential-icon {
  font-size: 2.4rem;
  color: #7c3aed;
  margin-bottom: 22px;
}

.differential-card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.differential-card p {
  font-family: 'Inter', sans-serif;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Video Container styling */
.video-container {
  max-width: 900px;
  width: 90%;
  margin: 40px auto 5rem auto;
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* SERVICES PAGE STYLES */
.services-section {
  padding: 1rem 5% 1rem 5%;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  max-width: 1200px;
  margin: 3rem auto 0 auto;
}

.service-card {
  background: var(--bg-main);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.service-card-title {
  padding: 1.25rem;
  background-color: #fafafa;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}

.service-card-title h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  letter-spacing: 1px;
}

.service-img-wrapper {
  width: 100%;
  height: 220px; /* Increased height for a larger icon presentation */
  overflow: hidden;
  padding: 0.75rem; /* Reduced padding to allow the icons to grow larger */
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.service-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* Contain icon inside card without stretching or cropping */
  transition: transform 0.5s ease;
}

.service-card:hover .service-img {
  transform: scale(1.08);
}

.service-card-content {
  padding: 1.5rem;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.service-description {
  color: #6b7280;
  font-size: 0.95rem;
}

.service-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* CONTACT PAGE STYLES */
.contact-section {
  padding: 1rem 5% 0rem 5%;
  max-width: 900px;
  margin: 0 auto;
}

.contact-intro {
  text-align: justify;
  max-width: 750px;
  margin: 0 auto 3rem auto;
  font-size: 1.05rem;
  color: #4b5563;
  line-height: 1.7;
}

.contact-form {
  background: #fdfdfd;
  padding: 3rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #374151;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Contact Submit Button */
.btn-submit {
  width: 30%;
  align-self: center;
  margin-top: 1.5rem; /* Baja el botón agregando espacio arriba */
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 1rem 1.5rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1), background-color 1s cubic-bezier(0.25, 1, 0.5, 1), box-shadow var(--transition-smooth);
}

.btn-submit:hover {
  background-color: var(--accent-color);
  transform: scale(1.15); /* Becomes larger as requested */
  box-shadow: 0 10px 15px -3px rgba(109, 40, 217, 0.3);
}

/* Form Message Feedback */
.form-message {
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  display: none;
  margin-top: 1rem;
}

.form-message.success {
  display: block;
  background-color: #ecfdf5;
  color: #10b981; /* Green */
  border: 1px solid #a7f3d0;
}

.form-message.error {
  display: block;
  background-color: #fef2f2;
  color: #ef4444; /* Red */
  border: 1px solid #fca5a5;
}

/* Footer Styles */
.footer {
  margin-top: 5rem;
  background-color: #0b0a0d; /* Premium deep black with subtle dark purple tint */
  color: var(--text-light);
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.footer-bg {
  padding: 3.5rem 0 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.25rem;
}

.footer-logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.logo-footer {
  height: clamp(90px, 14vw, 130px);
  width: auto;
  object-fit: contain;
  transition: transform var(--transition-smooth), filter var(--transition-smooth);
}

.logo-footer:hover {
  transform: scale(1.04);
}

.footer-subtitle {
  font-size: 0.85rem;
  color: #a1a1aa; /* Zinc 400 */
  text-align: center;
  font-weight: 500;
  max-width: 320px;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  list-style: none;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-link {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  transition: color var(--transition-smooth);
}

.footer-link:hover {
  color: var(--accent-color);
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
}

.footer-social {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-light);
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color var(--transition-smooth), color var(--transition-smooth), transform var(--transition-smooth), border-color var(--transition-smooth);
}

.footer-social:hover {
  background-color: var(--accent-color);
  color: var(--text-light);
  border-color: var(--accent-color);
  transform: translateY(-4px);
}

.footer-copyright {
  text-align: center;
  font-size: 0.8rem;
  color: #71717a; /* Zinc 500 */
  margin-top: 3.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  width: 100%;
}

/* Floating WhatsApp Button */
.whatsapp-floater {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: var(--text-light);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.2rem;
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  z-index: 9999;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color var(--transition-smooth);
  animation: float-bounce 3s infinite ease-in-out;
}

.whatsapp-floater::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #25d366;
  z-index: -1;
  animation: whatsapp-pulse 2.8s infinite;
  transition: background-color 0.3s ease;
}

.whatsapp-floater:hover {
  animation: none;
  transform: scale(1.14) translateY(-4px);
  background-color: #128c7e;
  box-shadow: 0 12px 36px rgba(18, 140, 126, 0.7);
}

.whatsapp-floater:hover::before {
  background: #128c7e;
}

/* Keyframes for WhatsApp bouncing effect */
@keyframes float-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes whatsapp-pulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(1.5); opacity: 0;   }
  100% { transform: scale(1.5); opacity: 0;   }
}

/* RESPONSIVE DESIGN - Adaptability to different screen sizes */

/* Tablet: reduce grid columns */
@media (max-width: 1024px) {
  .differentials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* Mobile & small tablet: hamburger navigation + single-column layouts */
@media (max-width: 768px) {
  header {
    padding: 0.5rem 5%;
    position: sticky; /* establishes positioning context for the dropdown */
  }

  /* Show the hamburger button */
  .nav-toggle {
    display: flex;
  }

  /* Collapse the nav + socials into a dropdown panel */
  .header-right {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    background-color: var(--bg-header);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.1);
    padding: 0.25rem 5% 1.25rem;
    /* hidden by default */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: max-height var(--transition-smooth), opacity var(--transition-smooth),
                transform var(--transition-smooth), visibility var(--transition-smooth);
  }

  .header-right.open {
    max-height: 420px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  nav {
    width: 100%;
  }

  nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  nav ul li {
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  nav ul li a {
    display: block;
    width: 100%;
    padding: 0.95rem 0.25rem; /* comfortable touch target */
    font-size: 1.05rem;
  }

  .social-header {
    justify-content: center;
    gap: 1.25rem;
    width: 100%;
    padding-top: 1.1rem;
  }

  .social-header a {
    width: 44px;  /* min touch target */
    height: 44px;
  }

  /* Left-align long paragraphs (justify creates ugly gaps on narrow screens) */
  .about-text,
  .contact-intro {
    text-align: left;
  }

  .services-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
  }

  .form-group-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .contact-form {
    padding: 2rem 1.5rem;
  }

  .btn-submit {
    width: 50%;
  }

  .map-container iframe {
    height: 340px;
  }

  .differentials-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Small phones: fine-tuning */
@media (max-width: 480px) {
  .btn-submit {
    width: 80%;
  }

  .about-text,
  .location-description,
  .contact-intro {
    font-size: 1.02rem;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }

  .contact-form {
    padding: 1.5rem 1.1rem;
  }

  .map-container iframe {
    height: 280px;
  }

  .whatsapp-floater {
    width: 54px;
    height: 54px;
    font-size: 1.9rem;
    bottom: 20px;
    right: 20px;
  }
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for grids */
.differentials-grid .differential-card:nth-child(1),
.services-grid .service-card:nth-child(1) { transition-delay: 0s;    }
.differentials-grid .differential-card:nth-child(2),
.services-grid .service-card:nth-child(2) { transition-delay: 0.1s;  }
.differentials-grid .differential-card:nth-child(3),
.services-grid .service-card:nth-child(3) { transition-delay: 0.2s;  }
.differentials-grid .differential-card:nth-child(4) { transition-delay: 0.3s;  }

