/* ========================================
   CENTRO DE LLAVES ORTIZ - ESTILOS PRINCIPALES
   Mobile-first, variables CSS, responsive
   ======================================== */

/* --- VARIABLES --- */
:root {
  /* Colores */
  --color-primary: rgb(92, 32, 33);      /* Color corporativo */
  --color-primary-dark: rgb(70, 25, 26);
  --color-primary-light: rgb(120, 50, 51);
  --color-text: #2d3748;
  --color-text-light: #718096;
  --color-bg: #ffffff;
  --color-bg-light: #f7fafc;
  --color-bg-dark: #1a202c;
  --color-border: #e2e8f0;
  --color-success: #38a169;
  --color-error: #e53e3e;
  
  /* Tipografía */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Roboto Condensed', var(--font-main);
  
  /* Espaciado */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;
  
  /* Layout */
  --container-max: 1200px;
  --header-height: 97px;  /* ← Altura solicitada */
  --border-radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  
  /* Transiciones */
  --transition: all 0.3s ease;
}

/* --- RESET & BASE --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-primary-dark);
}

ul {
  list-style: none;
}

address {
  font-style: normal;
  line-height: 1.8;
}

/* --- UTILIDADES --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

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

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

.section-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-sm);
  color: var(--color-primary);
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto var(--spacing-lg);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
  border: 2px solid var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: white;
  transform: translateY(-2px);
}

/* --- HEADER --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

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

/* ⚠️ CORRECCIÓN 1: Logo más grande (ocupa casi todo el header) */
.logo img {
  height: 82px;  /* ← 97px - 15px de margen = 82px */
  width: auto;
  max-width: 250px;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.main-nav ul {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.main-nav a {
  font-weight: 500;
  padding: var(--spacing-sm);
  color: white;
  opacity: 0.9;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fbbf24;
  opacity: 1;
}

.main-nav .btn-cta {
  background-color: #fbbf24;
  color: var(--color-primary) !important;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
}

.main-nav .btn-cta:hover {
  background-color: #f59e0b;
}

.header-contact .phone-link {
  font-weight: 700;
  color: white;
  font-size: 1.1rem;
  opacity: 0.95;
}

.header-contact .phone-link:hover {
  opacity: 1;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-sm);
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 25px;
  height: 3px;
  background-color: white;
  position: relative;
  transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  /* ⚠️ CORRECCIÓN 2: Sin margin negativo, el hero comienza DEBAJO del header */
  background: linear-gradient(135deg, rgba(92, 32, 33, 0.85) 0%, rgba(70, 25, 26, 0.9) 100%);
  padding-top: var(--header-height);  /* ← Espacio para que el contenido no quede bajo el header */
}

.hero-overlay {
  position: absolute;
  inset: 0;
  /* Imagen de fondo difuminada */
  background: url('../img/hero-bg.jpg') center/cover no-repeat;
  filter: blur(4px);
  opacity: 0.25;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: var(--spacing-lg);
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
}

.hero .highlight {
  color: #fbbf24;
  display: block;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.95;
}

.hero-cta {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
  padding: 0.875rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-hero:hover {
  background-color: rgba(255, 255, 255, 0.25);
  border-color: white;
  transform: translateY(-2px);
}

/* --- SECCIONES GRID --- */
.section-grid {
  display: grid;
  gap: var(--spacing-lg);
  align-items: center;
}

@media (min-width: 768px) {
  .section-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- QUIÉNES SOMOS --- */
.features-list {
  margin-top: var(--spacing-md);
}

.features-list li {
  padding: var(--spacing-xs) 0;
  font-weight: 500;
  color: var(--color-text);
}

/* --- SERVICIOS --- */
.services-grid {
  display: grid;
  gap: var(--spacing-md);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.service-card {
  background: white;
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: center;
}

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

.service-icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
}

.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
  color: var(--color-primary);
}

.service-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* --- GALERÍA --- */
.gallery-grid {
  display: grid;
  gap: var(--spacing-sm);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.gallery-item {
  display: block;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: var(--transition);
}

/* --- UBICACIÓN --- */
.location-grid {
  display: grid;
  gap: var(--spacing-lg);
  align-items: start;
}

@media (min-width: 900px) {
  .location-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

.location-info address {
  margin: var(--spacing-md) 0;
  padding: var(--spacing-md);
  background: var(--color-bg-light);
  border-radius: var(--border-radius);
}

.opening-hours {
  margin: var(--spacing-lg) 0;
}

.opening-hours h3 {
  font-family: var(--font-heading);
  margin-bottom: var(--spacing-sm);
  color: var(--color-primary);
}

.opening-hours ul li {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-xs) 0;
  border-bottom: 1px dashed var(--color-border);
}

.opening-hours ul li:last-child {
  border-bottom: none;
}

.opening-hours span {
  font-weight: 600;
}

.hours-note {
  font-size: 0.875rem;
  color: var(--color-text-light);
  font-style: italic;
  margin-top: var(--spacing-sm);
}

.location-map {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

@media (min-width: 900px) {
  .location-map {
    position: sticky;
    top: calc(var(--header-height) + var(--spacing-lg));
    align-self: start;
  }
  
  .location-map iframe {
    min-height: calc(100vh - var(--header-height) - var(--spacing-xl));
  }
}

.location-facebook {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px dashed var(--color-border);
}

.facebook-title {
  font-family: var(--font-heading);
  margin: 0 0 var(--spacing-sm);
  color: var(--color-primary);
  font-size: 1.1rem;
}

/* --- FORMULARIO --- */
.contact-form {
  max-width: 700px;
  margin: 0 auto;
  background: white;
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.form-grid {
  display: grid;
  gap: var(--spacing-md);
  grid-template-columns: 1fr 1fr;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  font-size: 0.95rem;
  color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(92, 32, 33, 0.1);
}

.error-msg {
  display: none;
  color: var(--color-text-light);
  font-size: 0.875rem;
  margin-top: var(--spacing-xs);
  font-style: italic;
}

.form-group input:invalid:not(:placeholder-shown) + .error-msg,
.form-group textarea:invalid:not(:placeholder-shown) + .error-msg {
  display: block;
}

.form-actions {
  margin-top: var(--spacing-lg);
  text-align: center;
}

.btn-submit {
  min-width: 200px;
}

.form-note {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-top: var(--spacing-sm);
}

.form-note a {
  text-decoration: underline;
}

.form-response {
  margin-top: var(--spacing-md);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  text-align: center;
  font-weight: 500;
}

.form-response.success {
  background-color: #c6f6d5;
  color: #22543d;
}

.form-response.error {
  background-color: #fed7d7;
  color: #822727;
}

.honeypot {
  display: none !important;
}

/* --- FOOTER --- */
.site-footer {
  background-color: var(--color-bg-dark);
  color: white;
  padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-grid {
  display: grid;
  gap: var(--spacing-lg);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-bottom: var(--spacing-lg);
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
  color: white;
}

.footer-col p,
.footer-col address,
.footer-col a {
  color: #cbd5e0;
}

.footer-col ul li {
  margin-bottom: var(--spacing-xs);
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  padding-top: var(--spacing-md);
  border-top: 1px solid #4a5568;
  text-align: center;
  font-size: 0.875rem;
  color: #a0aec0;
}

.legal-links {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  justify-content: center;
}

.legal-links a {
  color: #a0aec0;
}

.legal-links a:hover {
  color: white;
}

/* --- WHATSAPP FLOTANTE --- */
.whatsapp-float {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  z-index: 999;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #128C7E;
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: white;
}

/* --- MODALES LEGALES --- */
.legal-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: auto;
  border: none;
  background: transparent;
  padding: 0;
  z-index: 3000;
  display: none;
}

.legal-modal[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.2s ease;
}

.modal-content {
  position: relative;
  background: white;
  border-radius: var(--border-radius);
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background: var(--color-primary);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--color-primary-dark);
  transform: scale(1.05);
}

#modal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-primary);
  padding-right: 2rem;
}

.modal-body {
  line-height: 1.7;
  color: var(--color-text);
}

.modal-body p {
  margin-bottom: var(--spacing-sm);
}

.modal-body ul {
  margin: var(--spacing-sm) 0;
  padding-left: 1.5rem;
  list-style: disc;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.legal-modal:focus {
  outline: none;
}

.modal-content:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* --- ANIMACIONES DE ENTRADA AL SCROLL --- */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.scroll-reveal.from-left {
  transform: translateX(-40px);
}

.scroll-reveal.from-right {
  transform: translateX(40px);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translate(0, 0);
}

/* Para móviles: animación más sutil */
@media (max-width: 767px), (prefers-reduced-motion: reduce) {
  .scroll-reveal,
  .scroll-reveal.from-left,
  .scroll-reveal.from-right {
    transform: translateY(20px);
  }
}

/* --- MEDIA QUERIES --- */
@media (max-width: 767px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .main-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-primary);
    flex-direction: column;
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 999;
  }
  
  .main-nav.active {
    transform: translateY(0);
  }
  
  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  
  .header-contact {
    display: none;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
  }
  
  /* ⚠️ CORRECCIÓN 1: Logo en móvil también más grande */
  .logo img {
    height: 65px;  /* ← Un poco más pequeño en móvil para que quepa */
  }
}

@media (min-width: 1024px) {
  .hero h1 {
    font-size: 3rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
}

/* --- ACCESIBILIDAD --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}



/*------------------------------------------------------------------------------------------------*/
/* === 🍪 BANNER DE COOKIES === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgb(92, 32, 33);
  color: white;
  padding: var(--spacing-md);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
  z-index: 9999;
  animation: slideUp 0.3s ease;
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner-content {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 250px;
}

.cookie-banner-text strong {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-size: 1.1rem;
}

.cookie-banner-text p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.cookie-banner-text a {
  color: #fbbf24;
  text-decoration: underline;
}

.cookie-banner-text a:hover {
  color: white;
}

.cookie-banner-buttons {
  display: flex;
  gap: var(--spacing-sm);
  flex-shrink: 0;
}

.btn-cookie {
  padding: 0.75rem 1.5rem;
  border: 2px solid white;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
}

.btn-cookie-reject {
  background-color: transparent;
  color: white;
}

.btn-cookie-reject:hover {
  background-color: rgba(255,255,255,0.1);
}

.btn-cookie-accept {
  background-color: #fbbf24;
  color: rgb(92, 32, 33);
  border-color: #fbbf24;
}

.btn-cookie-accept:hover {
  background-color: #f59e0b;
  border-color: #f59e0b;
}

/* Responsive */
@media (max-width: 767px) {
  .cookie-banner-content {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-banner-buttons {
    width: 100%;
    justify-content: center;
  }
}

/* Placeholder para servicios bloqueados */
.maps-placeholder,
.facebook-placeholder {
  min-height: 200px;
  background-color: var(--color-bg-light);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  text-align: center;
  padding: var(--spacing-md);
}

.maps-placeholder p,
.facebook-placeholder p {
  margin: 0;
}

.maps-placeholder a,
.facebook-placeholder a {
  color: var(--color-primary);
  font-weight: 600;
}



.maps-placeholder a.btn {
  color: white !important;
}



/* === 🗝️ LISTA DE VENTAJAS EN HERO (peticion final)=== */
.hero-list {
  list-style: none;
  margin: 0 auto var(--spacing-lg);
  padding: 0;
  max-width: 550px;
  text-align: left;
  padding-left: 3rem;
}

.hero-list li {
  color: white;
  font-size: 1.1rem;
  line-height: 1.7;
  opacity: 0.95;
  margin-bottom: 1rem;
  text-align: left;
  word-wrap: break-word;  /* Evita desbordamientos */
}

/* Móvil */
@media (max-width: 767px) {
  .hero-list {
    max-width: 100%;
    padding: 0 var(--spacing-md);
  }
  .hero-list li {
    font-size: 1rem;
    line-height: 1.6;
  }
}
/*-------------------------------------------*/


/*--------------------------------------------------------------------------------------------------*/

/* --- PRINT --- */
@media print {
  .site-header,
  .hero,
  .whatsapp-float,
  .main-nav,
  .form-actions,
  .legal-modal {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    color: black;
    background: white;
  }
  
  .section {
    padding: 1cm 0;
  }
  
  a {
    text-decoration: underline;
    color: black;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.9em;
  }
}