:root {
  /* Ultra-Premium Luxury Palette */
  --primary-color: #CBA153; /* Refined Champagne Gold */
  --bg-color: #0A0A0B; /* Deep Rich Warm Black */
  --bg-light: #121214; /* Elevated Surface Black */
  --text-main: #F4F4F5; /* Pearl White */
  --text-muted: #A1A1AA; /* Warm Zinc Grey */
  --font-family: 'Outfit', 'Cairo', sans-serif;
  --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  --glass-bg: rgba(18, 18, 20, 0.65);
  --glass-border: rgba(203, 161, 83, 0.15); /* Subtle gold tint in glass borders */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}



.text-center { text-align: center; }
.text-start { text-align: start; }
.relative { position: relative; }
.z-10 { z-index: 10; }

/* Navbar */


.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 600;
  font-size: 1.1rem;
  position: relative;
  transition: var(--transition);
}

.nav-links a.current,
.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  bottom: -4px;
  right: 0;
  transition: var(--transition);
}
html[dir="ltr"] .nav-links a::after {
  right: auto;
  left: 0;
}

.nav-links a.current::after,
.nav-links a:hover::after {
  width: 100%;
}

.lang-switcher a {
  display: inline-block;
  background: linear-gradient(to bottom, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 60%, rgba(0,0,0,0) 100%); padding-bottom: 2rem;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-weight: 600;
  transition: var(--transition);
  margin: 0 0.2rem;
}

.lang-switcher a.active,
.lang-switcher a:hover {
  background: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: start;
  padding: 100px 5% 0;
  position: relative;
  background-attachment: fixed;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10, 10, 11, 0.9) 0%, rgba(10, 10, 11, 0.4) 100%);
}
html[dir="rtl"] .hero-overlay {
  background: linear-gradient(to left, rgba(10, 10, 11, 0.9) 0%, rgba(10, 10, 11, 0.4) 100%);
}

.hero-content {
  
  z-index: 2;
  animation: fadeIn 1.5s ease-out;
  background: var(--glass-bg);
  padding: 3rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(15px);
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fff, #aaa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: #ddd;
  margin-bottom: 2rem;
}

.cta-btn {
  display: inline-block;
  background: var(--primary-color);
  color: #000;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 30px;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(247, 169, 0, 0.3);
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(247, 169, 0, 0.5);
}

/* Page Header (Inner Pages) */
.page-header {
  padding: 12rem 5% 6rem;
  text-align: center;
  background-size: cover;
  background-position: center;
  position: relative;
}

.page-header h1 {
  font-size: 3rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1.2rem;
  color: var(--primary-color);
  font-weight: 600;
}

/* Sections */
.services, .features, .about-section {
  padding: 6rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 4rem;
  color: var(--primary-color);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 0 5%;
  
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 0 5%;
  
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.service-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-bottom: 1px solid var(--glass-border);
  transition: transform 0.5s ease;
}

.service-card:hover .service-img {
  transform: scale(1.05);
}

.service-card h3 {
  font-size: 1.5rem;
  margin: 1.5rem 0 0.5rem;
  color: #fff;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

.service-card p {
  color: var(--text-muted);
  padding: 0 1.5rem 2rem;
  flex-grow: 1;
  position: relative;
  z-index: 2;
}

/* Home Accordion Gallery */
.accordion-gallery {
  display: flex;
  width: 100%;
  height: 60vh;
  min-height: 400px;
  
  margin: 4rem auto;
  padding: 0 5%;
  gap: 1rem;
}

.accordion-item {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
  border: 1px solid var(--glass-border);
}

.accordion-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  filter: grayscale(40%) brightness(0.7);
}

.accordion-item:hover {
  flex: 4;
}

.accordion-item:hover img {
  transform: scale(1.05);
  filter: grayscale(0%) brightness(1);
}

.accordion-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
}

.accordion-item:hover .overlay {
  opacity: 1;
}

.accordion-item .overlay h3 {
  color: #fff;
  font-size: 1.5rem;
  transform: translateY(20px);
  transition: transform 0.4s ease;
  white-space: nowrap;
}

.accordion-item:hover .overlay h3 {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .accordion-gallery {
    flex-direction: column;
    height: 80vh;
  }
}

.service-card h3 {
  font-size: 1.5rem;
  margin: 1.5rem 0 0.5rem;
  color: #fff;
  padding: 0 1.5rem;
}

.service-card p {
  color: var(--text-muted);
  padding: 0 1.5rem 2rem;
  flex-grow: 1;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Feature items (no image) */
.feature-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 3rem 2rem;
  border-radius: 16px;
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.feature-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.feature-item:hover::before {
  transform: scaleX(1);
}

.feature-item svg {
  width: 48px;
  height: 48px;
  margin-bottom: 1.5rem;
  fill: var(--primary-color);
}

.feature-item h3 {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 1rem;
}

.feature-item p {
  color: var(--text-muted);
}

.feature-item:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.about-image {
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  border: 1px solid var(--glass-border);
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.about-image:hover img {
  transform: scale(1.05);
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, #121214, #0A0A0B);
  padding: 5rem 0;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.cta-banner h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-banner p {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 4rem 5%;
  background: #000;
  border-top: 1px solid var(--glass-border);
}

.footer h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.footer p {
  color: var(--text-muted);
  
  margin: 0 auto 2rem;
}

.footer-logo {
  display: block;
  width: min(220px, 70vw);
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.social-links a {
  font-weight: 600;
  color: #fff;
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--primary-color);
}

.copyright {
  font-size: 0.9rem;
  color: var(--text-muted);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.5rem; }
}


/* Masonry Portfolio Gallery */
.masonry-gallery { column-count: 1; column-gap: 1.5rem; padding: 4rem 5%; }
@media (min-width: 768px) { .masonry-gallery { column-count: 2; } }
@media (min-width: 1024px) { .masonry-gallery { column-count: 3; } }
@media (min-width: 1440px) { .masonry-gallery { column-count: 4; } }
.masonry-item { break-inside: avoid; margin-bottom: 1.5rem; border-radius: 12px; overflow: hidden; position: relative; }
.masonry-item img { width: 100%; display: block; transition: transform 0.5s ease; }
.masonry-item:hover img { transform: scale(1.05); }

.premium-text-block { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--glass-border); border-radius: 20px; padding: 3rem; margin: 2rem auto;  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); backdrop-filter: blur(10px); }

/* Premium CTA Section */
.premium-cta-section {
  padding: 6rem 5%;
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.8) 0%, rgba(0, 0, 0, 0.9) 100%);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  margin-top: 4rem;
}
.premium-cta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  
  margin: 0 auto;
  align-items: center;
}
@media (min-width: 992px) {
  .premium-cta-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}
.cta-content {
  text-align: left;
}
html[dir='rtl'] .cta-content {
  text-align: right;
}
.cta-content h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  margin-bottom: 1.5rem;
  color: #fff;
  line-height: 1.2;
}
.cta-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}
.cta-trust-badges {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.trust-badge {
  background: rgba(255, 255, 255, 0.03);
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  transition: transform 0.3s ease, border-color 0.3s ease;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
}
html[dir='rtl'] .trust-badge {
  text-align: right;
}
.trust-badge:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
}
.trust-badge svg {
  width: 32px;
  height: 32px;
  color: var(--primary-color);
  margin-bottom: 0;
  flex-shrink: 0;
}
.trust-badge h4 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
  color: #fff;
}
.trust-badge p {
  font-size: 0.95rem;
  color: #aaa;
  margin-bottom: 0;
}

/* Global Container Rules */
.container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Ensure wide sections reset their inner items */
.services-grid, .features-grid, .accordion-gallery {
  width: 100%;
  max-width: none;
}

/* Navbar container fix */
.navbar {
  display: flex;
  justify-content: center;
}
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0; /* Padding handled by container */
}

/* Restore navbar absolute positioning */
.navbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
}
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.hero .container {
  width: 100%;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(10px);
  padding: 3rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
}

html[dir='rtl'] .hero-content {
  margin-right: 0;
  margin-left: auto;
}
html[dir='ltr'] .hero-content {
  margin-left: 0;
  margin-right: auto;
}

.mini-cta-banner { max-width: 1300px; margin: 4rem auto !important; }
/* Final Header Gradient Override */
.navbar {
  background: linear-gradient(to bottom, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0) 100%) !important;
  padding-bottom: 2rem;
}


/* Premium Footer Specifics */
.footer-links a:hover { color: var(--primary-color) !important; }
.social-icons a:hover { background: var(--primary-color) !important; color: #000 !important; transform: translateY(-3px); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-status {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.contact-form .cta-btn:disabled,
.contact-form .cta-btn[aria-disabled="true"] {
  cursor: not-allowed !important;
  opacity: 0.65;
  transform: none;
}

.hamburger {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0.25rem;
}


/* ==============================================================
   UI/UX MÓVIL REFINADO Y LIMPIO
   ============================================================== */

/* Hamburger Icon Base (Hidden on Desktop) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Desktop Controls Wrapper */
.header-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* -------------------------------------------------------------
   MOBILE MEDIA QUERY
   ------------------------------------------------------------- */
@media (max-width: 991px) {
  /* 1. Header & Logo (Espacio arriba y logo más pequeño) */
  .logo img {
    width: 90px !important;
    height: auto;
  }
  .hamburger {
    display: flex;
  }
  .navbar .container {
    padding-top: 1rem !important; /* Espacio arriba solicitado */
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    flex-wrap: nowrap; /* Evita que los controles salten de línea */
  }
  .header-controls {
    gap: 1rem;
  }

  /* Menu Desplegable */
  .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-light);
    border-right: 1px solid var(--glass-border);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: left 0.4s ease;
    z-index: 1000;
    box-shadow: 10px 0 30px rgba(0,0,0,0.5);
  }
  html[dir="ltr"] .nav-links {
    right: auto;
  }
  html[dir="rtl"] .nav-links {
    left: auto;
    right: -100%;
    border-right: none;
    border-left: 1px solid var(--glass-border);
    transition: right 0.4s ease;
  }
  .nav-links.active { left: 0; }
  html[dir="rtl"] .nav-links.active { left: auto; right: 0; }

  /* 2. Hero Heights & Text (Menos alto, textos proporcionados) */
  .hero-content h1 {
    font-size: 2rem !important;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  .hero-subtitle {
    font-size: 1.1rem !important;
  }
  .hero {
    min-height: 60vh !important;
    padding-top: 7rem !important;
    padding-bottom: 3rem !important;
  }

  /* 3. Split Sections (Sin huecos exagerados y fotos separadas) */
  .split-section {
    display: flex !important;
    flex-direction: column !important; /* Siempre apiladas */
    gap: 1.5rem !important; /* Espacio moderado entre foto y texto */
    padding: 2rem 0 !important;
  }
  .split-section.reverse {
    flex-direction: column-reverse !important; /* Forzar orden para que nunca choquen dos imágenes */
  }
  .split-content {
    padding: 1rem !important; /* Quitar márgenes gigantes de los lados */
  }
  .split-content h3 {
    font-size: 1.6rem !important;
  }

  /* 5. CTA Final (Arreglar el texto encajonado) */
  .premium-cta-content {
    padding: 3rem 1.5rem !important; /* Quita el asfixiante padding de 6rem de escritorio */
    border-radius: 16px !important;
    margin: 0 1rem !important; /* Evita que toque los bordes del móvil */
  }
  .premium-cta-content h2 {
    font-size: 1.6rem !important;
  }

  /* 6. Footer (Columnas compactas) */
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem 1rem !important;
    padding: 0 1rem;
  }
  .footer-brand {
    grid-column: 1 / -1 !important;
    text-align: center;
  }
  .footer-brand .social-icons {
    justify-content: center;
  }
  .footer-links { grid-column: 1 / 2 !important; }
  .footer-contact { grid-column: 2 / 3 !important; }

  /* CORRECCIONES DE EMERGENCIA MÓVIL */
  
  /* 1. Fondos invisibles en iOS/Safari Móvil (Evitar bug de background-attachment: fixed) */
  .hero, .premium-cta-section {
    background-attachment: scroll !important;
  }

  /* 2. Fotos pegadas al lado (Split Sections) - Forzar Grid de 1 columna */
  .split-section {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 3rem !important;
    padding: 2rem 0 !important;
  }
  .split-section .split-img-wrapper {
    margin: 0 auto;
    width: 100%;
  }
  .split-section .split-content {
    order: 2 !important; /* Si fallara algo, asegurarse que el texto vaya abajo */
  }

  /* 3. Slider de fotos (Efecto original, horizontal pero más alto) */
  .accordion-gallery {
    display: flex !important;
    flex-direction: column !important;
    height: 450px !important; /* Más altura */
    min-height: 450px !important;
    width: 100% !important;
    margin: 3rem auto !important;
    padding: 0 1rem !important;
  }
  .accordion-item {
    flex: 1 !important; /* Funcionalidad original */
    height: 100% !important;
  }
  .accordion-item:hover, .accordion-item:active {
    flex: 4 !important; /* Animación original al tocar */
  }


}


/* ==============================================================
   MASTER FIX MOBILE (HTML+CSS SYNCED)
   ============================================================== */

/* Features, Services, and Info Grids - Mobile First */
.features-grid, .services-grid, .info-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .features-grid { grid-template-columns: repeat(3, 1fr); }
    .services-grid { grid-template-columns: repeat(3, 1fr); }
    .info-grid { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); }
}

/* Split Sections Desktop/Mobile Sync */
.split-section {
    display: flex;
    align-items: center;
    gap: 4rem;
}
@media (min-width: 992px) {
    .split-section.reverse { flex-direction: row-reverse; }
}

.premium-cta-content {
    border-radius: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

/* -------------------------------------------------------------
   MOBILE MEDIA QUERY
   ------------------------------------------------------------- */
@media (max-width: 991px) {
    /* TYPOGRAPHY RESTORE */
    h1, .hero h1 { font-size: clamp(2rem, 8vw, 2.5rem) !important; }
    h2 { font-size: clamp(1.8rem, 6vw, 2.2rem) !important; }
    h3 { font-size: 1.4rem !important; }
    p { font-size: 1rem !important; }

    /* Header Spacing */
    .navbar .container {
        padding-top: 1rem !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Grids - PREVENT OVERFLOW */
    .services-grid, .features-grid, .info-grid {
        grid-template-columns: 1fr !important;
        padding: 0 1rem !important;
        width: 100% !important;
    }
    
    /* Split Sections */
    .split-section {
        flex-direction: column !important;
        gap: 1.5rem !important;
        padding: 1rem 0 !important;
        margin-bottom: 0 !important;
    }
    .split-section.reverse {
        flex-direction: column !important;
    }
    .split-img-wrapper {
        width: 100% !important;
    }
    .split-content {
        padding: 0 1rem !important;
    }

    /* CTA Spacing */
    .premium-cta-content {
        padding: 2rem 1.5rem !important;
        margin: 0 !important; 
    }
    .premium-cta-wrapper {
        margin: 2rem auto !important; 
        padding: 0 !important;
    }
    
    /* Vertical spacing */
    .intro-text { padding: 3rem 0 2rem !important; }
    .services { padding: 2rem 0 !important; }
    
    /* Accordion - let it fall back to default, just ensure padding */
    .accordion-gallery {
        padding: 0 1rem !important;
        margin: 2rem auto !important;
    }
}

/* ==============================================================
   ULTIMATE ACCORDION MOBILE FIX
   ============================================================== */
@media (max-width: 991px) {
    .accordion-gallery {
        display: flex !important;
        flex-direction: column !important; /* Vuelve a estar una encima de la otra */
        height: 70vh !important; /* Altura generosa en móvil */
        min-height: 500px !important;
        width: 100% !important;
        padding: 0 1rem !important;
        margin: 2rem auto !important;
        gap: 1rem !important;
    }
    .accordion-item {
        flex: 1 !important;
        height: auto !important; /* Altura flexible controlada por flex */
        width: 100% !important;
        transition: flex 0.4s ease !important; /* Transición suave */
    }
    .accordion-item:hover, .accordion-item:active {
        flex: 4 !important; /* ¡Se expande verticalmente al tocar! */
    }
    .accordion-item img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
}

.logo img {
  display: block;
  width: 180px;
  max-width: 22vw;
  height: auto;
}

@media (max-width: 991px) {
  .logo img {
    width: 90px !important;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
  }

  .footer-links,
  .footer-contact {
    grid-column: 1 / -1 !important;
    text-align: center;
  }

  .footer-contact ul {
    align-items: center;
  }

  .info-card {
    min-width: 0 !important;
    padding: 2rem 1.25rem !important;
    overflow-wrap: anywhere;
  }
}

/* Final home layout and French SEO corrections */

.services-grid {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
}

.service-img {
  width: 100%;
  height: 320px;
  aspect-ratio: auto;
  object-fit: cover;
}

@media (max-width: 991px) {
  .service-img {
    height: 270px;
  }

  html[lang="fr"] .features-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 767px) {
  .hero-content {
    width: min(88%, 340px);
    padding: 1.25rem 1rem !important;
  }

  html[lang="fr"] .hero-content h1 {
    font-size: 1.35rem !important;
    line-height: 1.08;
    margin-bottom: 0.65rem;
  }

  html[lang="ar"] .hero-content h1 {
    font-size: 1.5rem !important;
    line-height: 1.15;
    margin-bottom: 0.65rem;
  }

  .hero-content p,
  .hero-subtitle {
    font-size: 0.82rem !important;
    line-height: 1.4;
    margin-top: 0.65rem !important;
    margin-bottom: 1.25rem !important;
  }
}

@media (max-width: 480px) {
  .service-img {
    height: 230px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  html[lang="ar"] .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 992px) {
  html[lang="ar"] .features-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  html[lang="fr"] .features-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
