/* VARIABLES GLOBALES */
:root {
  --primary: #1a2a40;      
  --primary-light: #2c3e50;
  --secondary: #dcdfe4;    
  --accent: #5a7b9c;       

  --bg-color: #ffffff;
  --bg-light: #f0f2f5;
  --card-bg: #faf9f8;
  --text-main: #333333;
  --text-muted: #555555;   

  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;

  --nav-height: 80px;      
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* RESET GENERAL */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body {
  margin: 0; padding: 0;
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}
h1, h2, h3, h4, h5 { font-family: var(--font-heading); margin-top: 0; color: var(--primary); }
a { color: var(--accent); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--primary); }
ul { margin: 0; padding-left: 1.2rem; }

/* Control dinámico de los enlaces según la página */
body.home-page .menu-legal { display: none !important; }
body.legal-page .menu-home { display: none !important; }
body.legal-page footer .legal-links { display: none !important; }

/* NAVEGACIÓN Y HAMBURGUESA */
nav {
  position: fixed;
  top: 0; width: 100%;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4rem;
  z-index: 1000;
}
.logo-boutique {
  display: flex; flex-direction: column; line-height: 1.1;
  text-decoration: none; color: var(--primary);
}
.main-name { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800; letter-spacing: 0.05em; }
.sub-text { font-family: var(--font-body); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent); margin-left: 2px; }

.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--primary-light); text-transform: uppercase; letter-spacing: 0.05em; }
.nav-links a:hover { color: var(--accent); }

.menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 5px;
}
.menu-toggle .bar {
  width: 25px; height: 3px; background-color: var(--primary); border-radius: 2px;
  transition: all 0.3s ease;
}

/* HERO */
.hero {
  padding: 12rem 2rem 8rem;
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}
.hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; margin-bottom: 1rem; color: #fff; }
.hero p { font-size: clamp(1.1rem, 2vw, 1.3rem); color: rgba(255,255,255,0.9); max-width: 600px; margin: 0 auto 3rem; font-weight: 300; }
.cta-button {
  display: inline-block; padding: 1rem 2.5rem; background: #fff; color: var(--primary);
  font-weight: 600; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em;
  border-radius: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.15); color: var(--primary); }

/* SECCIONES COMUNES */
section { padding: 6rem 2rem; max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 2.5rem; font-weight: 700; text-align: center; margin-bottom: 4rem; position: relative; }
.section-title::after { content: ""; position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%); width: 60px; height: 3px; background: var(--accent); }

/* SERVICIOS */
.services-grid { display: flex; flex-direction: column; gap: 4rem; }
.group-abogacia, .group-gestoria { background: var(--card-bg); border-radius: var(--radius-lg); padding: 3rem; box-shadow: 0 10px 30px rgba(0,0,0,0.03); border: 1px solid var(--secondary); border-top: 4px solid var(--primary); }
.group-header { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; color: var(--primary); margin-bottom: 2rem; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--secondary); padding-bottom: 1rem; }
.subcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.card h4 { font-size: 1.3rem; margin-bottom: 1rem; color: var(--primary-light); }
.card ul li { margin-bottom: 0.5rem; color: var(--text-muted); font-size: 0.95rem; }

/* SOBRE MÍ (VUELTA AL DISEÑO ANTERIOR) */
.about-wrap { 
  max-width: 100%;
  background-color: var(--bg-light); 
  padding: 6rem 5%; 
}
.about-wrap h2.section-title {
  text-align: center;
  margin-bottom: 4rem;
}
.about-card { 
  max-width: 1150px; 
  margin: 0 auto; 
  display: flex; 
  align-items: flex-start; 
  background: var(--bg-color); 
  padding: 4rem; 
  border-radius: var(--radius-md); 
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); 
  border: 1px solid var(--secondary); 
}
.accent { 
  width: 4px; 
  height: 80px; 
  background-color: var(--primary); 
  margin-right: 2rem; 
  flex-shrink: 0; 
}
.name-col { 
  padding-right: 3rem; 
  min-width: 260px; 
  border-right: 1px solid var(--secondary); 
  margin-right: 3rem; 
  display: flex; 
  flex-direction: column; 
}
.name-main { 
  font-family: var(--font-heading); 
  font-size: 1.8rem; 
  font-weight: 700; 
  color: var(--primary); 
  line-height: 1.1; 
  margin-bottom: 0.5rem; 
  text-transform: uppercase; 
  letter-spacing: 1px; 
}
.name-sub { 
  font-family: var(--font-body); 
  font-size: 0.85rem; 
  color: var(--text-muted); 
  text-transform: uppercase; 
  letter-spacing: 5px; 
}
.about-bio { 
  color: var(--text-main); 
  font-size: 0.95rem; 
  line-height: 1.8; 
  display: flex; 
  flex-direction: column; 
  gap: 1.2rem; 
}
.about-bio p { margin: 0; }


/* CONTACTO */
#contacto { max-width: 1100px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: start; }
.contact-msg-col h2 { font-size: 2.5rem; margin-bottom: 1.5rem; }
.contact-msg-col p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.highlight { font-weight: 600; color: var(--primary) !important; border-left: 3px solid var(--accent); padding-left: 1rem; }
.contact-form-card { background: var(--card-bg); border: 1px solid var(--secondary); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: 0 10px 30px rgba(0,0,0,0.03); }
.form-group { margin-bottom: 1.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
label { display: block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--primary-light); margin-bottom: 8px; }
.req { color: #d9534f; margin-left: 2px; }
input, select, textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--secondary); border-radius: var(--radius-md); font-family: var(--font-body); font-size: 0.95rem; background: #fcfcfc; transition: all 0.3s; color: var(--text-main); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(26, 42, 64, 0.05); }

/* Estilos extra para el select agrupado */
optgroup { font-weight: 600; color: var(--primary); font-style: normal; background-color: #f9f9f9; }
option { font-weight: 400; color: #333; background-color: #ffffff; padding: 4px; }

.consent-box { display: flex; align-items: flex-start; gap: 10px; margin: 1.5rem 0; }
.consent-box input { width: auto; margin-top: 3px; }
.consent-box label { font-size: 0.85rem; text-transform: none; color: var(--text-muted); letter-spacing: normal; margin: 0; }
.link-legal { color: var(--accent); text-decoration: underline; }
.btn-submit { width: 100%; background: var(--primary); color: #fff; border: none; padding: 14px; font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; border-radius: var(--radius-md); cursor: pointer; transition: background 0.3s; }
.btn-submit:hover { background: var(--accent); }
.form-legend { font-size: 0.8rem; color: #999; margin-top: 1rem; text-align: center; }

/* PÁGINA LEGAL COMPLETA */
.legal-page { background-color: #f9fafb; }
.legal-page-content { max-width: 900px; margin: 120px auto 4rem; padding: 0 2rem; }
.legal-header { text-align: center; margin-bottom: 4rem; }
.legal-header h1 { font-size: 2.8rem; color: var(--primary); border-bottom: none; padding-bottom: 0; margin-bottom: 1rem; }
.legal-header .subtitle { font-size: 1.2rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 1.5rem; }
.legal-header .last-updated { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); font-weight: 600; background: rgba(90, 123, 156, 0.1); display: inline-block; padding: 6px 12px; border-radius: 20px; }
.legal-section { background: var(--bg-color); border-radius: var(--radius-lg); padding: 3.5rem; margin-bottom: 3rem; box-shadow: 0 4px 20px rgba(0,0,0,0.03); border: 1px solid var(--secondary); scroll-margin-top: 100px; }
.legal-section h2 { font-size: 2rem; color: var(--primary); border-bottom: 2px solid var(--secondary); padding-bottom: 1rem; margin-bottom: 2rem; }
.legal-section h3 { font-size: 1.3rem; color: var(--primary-light); margin-top: 2.5rem; margin-bottom: 1rem; }
.legal-section h4 { font-size: 1.1rem; margin-top: 1.5rem; color: var(--accent); }
.legal-section p { color: var(--text-muted); line-height: 1.7; margin-bottom: 1.2rem; font-size: 0.95rem; }
.legal-section ul { margin-bottom: 1.5rem; padding-left: 1.5rem; color: var(--text-muted); font-size: 0.95rem; }
.legal-section ul li { margin-bottom: 0.5rem; line-height: 1.6; }

/* REGLAS RESPONSIVE (MÓVILES) */
@media (max-width: 900px) {
  nav { padding: 0 1.5rem; }
  .menu-toggle { display: flex; }
  .nav-links {
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: #fff; flex-direction: column; gap: 0;
    border-bottom: 1px solid var(--secondary);
    display: none; align-items: flex-start;
  }
  .nav-links.active { display: flex; }
  .nav-links a { width: 100%; padding: 1.5rem 2rem; border-top: 1px solid #f0f0f0; }

  .hero { padding: 10rem 1.5rem 6rem; clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%); }
  section, .about-wrap { padding: 4rem 1.5rem; }
  
  /* SOBRE MI EN MÓVIL (ESTILO ANTERIOR) */
  .about-card { flex-direction: column; padding: 2.5rem; }
  .name-col { 
    padding-right: 0; 
    margin-right: 0; 
    border-right: none; 
    margin-bottom: 1.5rem; 
    border-bottom: 1px solid var(--secondary); 
    padding-bottom: 1.5rem; 
    width: 100%;
  }
  .accent { display: none; }
  
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; gap: 1.2rem; }
  .contact-form-card { padding: 1.5rem; }
  
  .legal-section { padding: 2rem; }
}

/* FOOTER GLOBAL */
footer {
  background: var(--primary); padding: 4rem 2rem; text-align: center; color: rgba(255,255,255,0.7);
}
.footer-logo { font-family: var(--font-heading); font-weight: 700; font-size: 1.5rem; color: #fff; letter-spacing: 0.1em; margin-bottom: 1rem; }
.legal-links { margin-top: 2rem; display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.legal-links a { color: rgba(255,255,255,0.7); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.legal-links a:hover { color: #fff; }

/* BANNER DE COOKIES */
.cookie-banner { position: fixed; bottom: -100%; left: 0; width: 100%; background: #ffffff; box-shadow: 0 -4px 20px rgba(0,0,0,0.1); padding: 1.5rem 2rem; display: flex; justify-content: space-between; align-items: center; z-index: 9999; flex-wrap: wrap; gap: 1.5rem; transition: bottom 0.5s ease-in-out; border-top: 3px solid var(--primary); }
.cookie-banner.show { bottom: 0; }
.cookie-content { flex: 1 1 60%; min-width: 300px; font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.cookie-content a { color: var(--accent); text-decoration: underline; font-weight: 500; }
.cookie-actions { display: flex; gap: 10px; }
.btn-accept, .btn-reject { padding: 10px 20px; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; font-size: 0.85rem; transition: all 0.2s; }
.btn-accept { background: var(--primary); color: #fff; border: 1px solid var(--primary); }
.btn-accept:hover { background: var(--accent); border-color: var(--accent); }
.btn-reject { background: transparent; color: var(--text-muted); border: 1px solid var(--secondary); }
.btn-reject:hover { background: var(--secondary); color: var(--text-main); }
@media (max-width: 600px) {
  .cookie-banner { flex-direction: column; text-align: center; padding: 1.5rem; }
  .cookie-actions { width: 100%; justify-content: center; flex-direction: column; }
  .btn-accept, .btn-reject { width: 100%; }
}