/* Variables de Diseño Premium */
:root {
  --bg-color: #F9F8F6;
  --bg-alt: #EFECE7;
  --black: #0A0A0A;
  --text-main: #0A0A0A;
  --text-muted: #555555;
  --accent: #4A5D4E;
  --accent-light: #7A8B7D;
  --white: #FFFFFF;
  
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Montserrat', sans-serif;
  
  --transition: all 0.4s ease;
}

/* Reset y Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}
::selection { background-color: var(--black); color: var(--white); }

/* Utilidades */
.container { max-width: 1200px; margin: 0 auto; padding: 5rem 2rem; position: relative; z-index: 1; }
.text-center { text-align: center; }
.bg-dark { background-color: var(--black); color: var(--white); }
.mt-4 { margin-top: 3rem; }

/* Tipografía */
h1, h2, h3, h4, .logo { font-family: var(--font-serif); font-weight: 400; color: var(--black); }
em { font-style: italic; color: var(--accent); }
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark p, .bg-dark blockquote, .quote-section em, cite { color: var(--white); }
.quote-section em { color: var(--bg-alt); }
.quote-section cite { color: var(--bg-alt); }

.section-tag {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--black);
  margin-bottom: 1rem;
  font-weight: 600;
}

/* Botones */
.btn-solid, .btn-outline {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}
.btn-solid { background-color: var(--black); color: var(--white); border: 1px solid var(--black); }
.btn-solid:hover { background-color: var(--accent); border-color: var(--accent); }
.btn-outline { border: 1px solid var(--black); color: var(--black); }

/* Navegación */
nav {
  position: fixed; width: 100%; top: 0; z-index: 1000; padding: 1.5rem 0; transition: var(--transition);
}
nav.scrolled {
  background-color: rgba(249, 248, 246, 0.95); padding: 1rem 0; box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.nav-container {
  display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 2rem;
}
.logo { 
  font-size: 2rem; 
  text-decoration: none; 
  color: var(--black); 
  letter-spacing: 0.05em; 
}
.logo span { font-style: italic; color: var(--black); }

.nav-links { display: flex; gap: 2rem; align-items: center; list-style: none; }
.nav-links a:not(.btn-outline) {
  text-decoration: none; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 0.1em; transition: var(--transition); font-weight: 500;
}
.nav-links a:not(.btn-outline):hover { color: var(--black); }

/* Menú Móvil */
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 6px; }
.mobile-menu-btn span { display: block; width: 25px; height: 2px; background-color: var(--black); transition: var(--transition); }

/* Hero Section */
.hero {
  height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; text-align: center; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: -20px;
  background: url('https://images.unsplash.com/photo-1618220179428-22790b461013?auto=format&fit=crop&w=1200&q=70') center/cover no-repeat;
  filter: blur(10px); transform: scale(1.05); z-index: -1;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(249, 248, 246, 0.6) 0%, rgba(249, 248, 246, 0.95) 100%); z-index: 0;
}
.hero-content { position: relative; z-index: 1; max-width: 800px; padding: 0 2rem; }
.eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.25em; color: var(--black); margin-bottom: 1.5rem; font-weight: 600; }
.hero h1 { font-size: clamp(3rem, 6vw, 5rem); line-height: 1.1; margin-bottom: 1.5rem; color: var(--black); }
.hero h1 em { color: var(--accent); }
.hero .subtitle { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2.5rem; }

/* Filosofía */
.philosophy { position: relative; overflow: hidden; }
.philosophy::before {
  content: ''; position: absolute; inset: -15px;
  background: url('https://images.unsplash.com/photo-1599809275671-b59411ac7b94?auto=format&fit=crop&w=1200&q=60') center/cover no-repeat;
  filter: blur(8px); transform: scale(1.03); z-index: -1;
}
.philosophy .overlay { background-color: rgba(249, 248, 246, 0.85); position: absolute; inset: 0; z-index: 0; }

.philosophy-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; position: relative; z-index: 1;
}

.philosophy-image-container {
  max-width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;
}
.philosophy-image-container img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); display: block;
}

.philosophy-content-container { display: flex; flex-direction: column; gap: 3rem; }
.philosophy h2 { font-size: 2.5rem; margin-bottom: 1.5rem; line-height: 1.2; color: var(--black); }
.philosophy .lead { font-size: 1.2rem; font-family: var(--font-serif); margin-bottom: 1rem; color: var(--black); }

.philosophy-stats {
  display: flex; flex-direction: row; gap: 2rem; justify-content: space-between;
  border-top: 1px solid rgba(0,0,0,0.1); padding-top: 2rem;
}
.stat h3 { font-size: 3rem; color: var(--accent); line-height: 1; }
.stat p { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); font-weight: 600; }

/* Servicios */
.services { position: relative; overflow: hidden; }
.services::before {
  content: ''; position: absolute; inset: -15px;
  background: url('https://images.unsplash.com/photo-1600607687939-ce8a6c25118c?auto=format&fit=crop&w=1200&q=60') center/cover no-repeat;
  filter: blur(8px); transform: scale(1.03); z-index: -1;
}
.services .overlay { background-color: rgba(239, 236, 231, 0.85); position: absolute; inset: 0; z-index: 0; }
.services-inner { position: relative; z-index: 1; }

.services h2 { font-size: 2.5rem; margin-bottom: 3rem; text-align: center; color: var(--black); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.service-card {
  background: var(--white); padding: 3rem 2rem; border: 1px solid rgba(0,0,0,0.05); transition: var(--transition);
}
.service-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.05); border-color: var(--black); }
.service-card .roman { font-family: var(--font-serif); font-size: 1.5rem; color: var(--accent); display: block; margin-bottom: 1rem; font-style: italic; }
.service-card h3 { font-size: 1.3rem; margin-bottom: 1rem; color: var(--black); }
.service-card p { font-size: 0.9rem; color: var(--text-muted); }

/* Certificaciones */
.credentials h2 { font-size: 2.5rem; margin-bottom: 2rem; color: var(--black); }
.badges { display: flex; justify-content: center; align-items: center; gap: 4rem; margin-bottom: 2rem; flex-wrap: wrap; }
.badges img { transition: var(--transition); }
.badges img:hover { transform: scale(1.05); }
.badges img.main-aspo-logo { width: auto; height: 100px; object-fit: contain; border-radius: 0; box-shadow: none; }
.badges img:not(.main-aspo-logo) { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.credential-note { font-size: 0.9rem; color: var(--text-muted); max-width: 500px; margin: 0 auto; }

/* MODAL PORTAFOLIO */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
  background: rgba(10, 10, 10, 0.9); z-index: 2000;
  display: flex; justify-content: center; align-items: center;
  opacity: 0; pointer-events: none; transition: var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-content {
  background: var(--bg-color); width: 90%; max-width: 1100px; max-height: 85vh;
  overflow-y: auto; border-radius: 15px; padding: 4rem 2rem; position: relative;
  transform: translateY(30px); transition: var(--transition);
}
.modal-overlay.active .modal-content { transform: translateY(0); }

.close-btn {
  position: absolute; top: 1.5rem; right: 2rem; font-size: 3rem; color: var(--black);
  background: none; border: none; cursor: pointer; line-height: 1;
}
.close-btn:hover { color: var(--accent); }

.modal-header { text-align: center; margin-bottom: 4rem; }
.modal-header h2 { font-size: 2.5rem; margin-bottom: 1rem; color: var(--black); }

.portfolio-gallery { display: flex; flex-direction: column; gap: 6rem; }

.portfolio-project { display: flex; flex-direction: column; gap: 2rem; }
.portfolio-project h3 { 
  font-size: 1.8rem; color: var(--black); border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 0.5rem; 
}

.portfolio-item { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.image-wrapper { 
  position: relative; 
  border-radius: 10px; 
  overflow: hidden; 
  height: 500px; 
  background-color: var(--bg-alt); 
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.portfolio-item img { 
  width: 100%; 
  height: 100%; 
  object-fit: contain; 
  display: block; 
}

.lightbox-trigger {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.lightbox-trigger:hover {
  transform: scale(1.02);
}

.label {
  position: absolute; top: 1.5rem; left: 1.5rem; background: var(--white); color: var(--black);
  padding: 0.5rem 1.5rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;
  font-weight: 600; border-radius: 5px; box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 2; pointer-events: none; 
}

/* LIGHTBOX PARA AGRANDAR IMÁGENES */
.lightbox-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
  background: rgba(10, 10, 10, 0.95); 
  z-index: 3000; 
  display: flex; justify-content: center; align-items: center;
  opacity: 0; pointer-events: none; transition: var(--transition);
}

.lightbox-overlay.active {
  opacity: 1; pointer-events: auto;
}

.lightbox-content {
  max-width: 90%; max-height: 90vh; 
  border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  object-fit: contain; transform: scale(0.9); transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute; top: 1.5rem; right: 2.5rem; font-size: 3rem; 
  color: var(--white); cursor: pointer; transition: color 0.3s ease; line-height: 1;
}

.lightbox-close:hover {
  color: var(--accent-light);
}

/* Contacto */
.contact { position: relative; overflow: hidden; }
.contact::before {
  content: ''; position: absolute; inset: -15px;
  background: url('https://images.unsplash.com/photo-1558997519-83ea9252edf8?auto=format&fit=crop&w=1200&q=60') center/cover no-repeat;
  filter: blur(8px); transform: scale(1.03); z-index: -1;
}
.contact .overlay { background-color: rgba(239, 236, 231, 0.85); position: absolute; inset: 0; z-index: 0; }
.contact-inner { position: relative; z-index: 1; }
.contact h2 { font-size: 2.5rem; margin-bottom: 1rem; color: var(--black); }
.contact-desc { max-width: 500px; margin: 0 auto 2rem; color: var(--text-muted); }
.contact-info { display: flex; justify-content: center; gap: 4rem; flex-wrap: wrap; border-top: 1px solid rgba(0,0,0,0.1); padding-top: 3rem; align-items: center; }
.contact-info span { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--black); margin-bottom: 0.5rem; font-weight: 600; }
.contact-info a, .contact-info p { color: var(--text-muted); text-decoration: none; font-family: var(--font-serif); font-size: 1.2rem; transition: var(--transition); }
.contact-info a:hover { color: var(--accent); }
.qr-box img { width: 120px; height: 120px; margin-top: 0.8rem; border-radius: 8px; }

/* =========================================
   FOOTER
   ========================================= */
footer { 
  background: var(--black); 
  color: var(--white); 
  padding: 5rem 0 2rem; 
  text-align: center; 
}
footer .logo { 
  margin-bottom: 0.5rem; /* Reducido para que el eslogan esté más cerca */
  display: block; 
  font-size: 2.5rem; 
  color: var(--white);
}
footer .logo span { 
  color: var(--white); 
  font-style: italic;
} 

/* Nuevo estilo para la bajada del footer */
.footer-tagline {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 3rem; /* Espacio antes de los enlaces */
  font-weight: 500;
}

.footer-links { 
  display: flex; 
  justify-content: center; 
  gap: 3rem; 
  list-style: none; 
  margin-bottom: 3rem; 
  flex-wrap: wrap;
}
.footer-links a { 
  text-decoration: none; 
  font-size: 0.8rem; 
  text-transform: uppercase; 
  letter-spacing: 0.15em; 
  transition: var(--transition); 
  color: var(--white); 
}
.footer-links a:hover { 
  color: var(--accent-light); 
}

.copyright { 
  font-size: 0.75rem; 
  color: rgba(255,255,255,0.4); 
  border-top: 1px solid rgba(255,255,255,0.1); 
  padding-top: 2rem; 
  max-width: 800px; 
  margin: 0 auto; 
}

/* Animaciones Reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 900px) {
  .philosophy-grid { grid-template-columns: 1fr; gap: 3rem; }
  .philosophy-image-container { height: 400px; }
  .philosophy-content-container { text-align: center; }
  .philosophy-stats { flex-direction: row; justify-content: space-around; }
  .contact-info { gap: 2rem; flex-direction: column; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
    background: var(--bg-color); flex-direction: column; justify-content: center; transition: var(--transition);
  }
  .nav-links.active { right: 0; }
  .mobile-menu-btn { display: flex; position: relative; z-index: 1001; }
  .mobile-menu-btn.active span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  .mobile-menu-btn.active span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
  
  .philosophy-image-container { height: 300px; }
  .philosophy-stats { flex-direction: column; gap: 2rem; align-items: center; }
  
  .badges { gap: 2rem; }
  .badges img.main-aspo-logo { height: 70px; }
  .badges img:not(.main-aspo-logo) { width: 100px; height: 100px; }

  /* Ajustes modal móvil */
  .portfolio-gallery { gap: 4rem; }
  .portfolio-item { grid-template-columns: 1fr; }
  .image-wrapper { height: auto; min-height: 250px; } 
  .modal-content { padding: 3rem 1rem; }
  
  /* Ajustes lightbox móvil */
  .lightbox-close { top: 1rem; right: 1rem; font-size: 2.5rem; }

  /* Ajustes Footer Móvil */
  .footer-links { gap: 1.5rem; flex-direction: column; }
}