/* ============================================================
   MOLINA MATEOS — Ciberseguridad y Derecho
   Diseño: Profesional, moderno, seguridad digital
   ============================================================ */

:root {
  --navy:      #0d1b2e;
  --navy-mid:  #162540;
  --navy-light:#1e3355;
  --gold:      #c9972c;
  --gold-light:#e8b84b;
  --white:     #ffffff;
  --off-white: #f4f6f9;
  --gray-light:#e8ecf2;
  --gray:      #8a9ab5;
  --text:      #2c3e50;
  --text-light:#5a6e87;
  --red:       #c0392b;

  --font-serif:  'Georgia', 'Times New Roman', serif;
  --font-sans:   'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  --shadow-sm: 0 2px 8px rgba(13,27,46,.12);
  --shadow-md: 0 6px 24px rgba(13,27,46,.18);
  --shadow-lg: 0 16px 48px rgba(13,27,46,.22);
  --radius:    6px;
  --radius-lg: 12px;
  --transition: .3s ease;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-sans); color: var(--text); background: var(--white); line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
ul { list-style: none; }

/* ── COOKIE BANNER ── */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: var(--navy); color: var(--white);
  padding: 18px 24px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.3); font-size: .9rem;
}
#cookie-banner a { color: var(--gold-light); }
.cookie-btns { display: flex; gap: 10px; flex-shrink: 0; }
.btn-accept {
  background: var(--gold); color: var(--navy); border: none;
  padding: 9px 22px; border-radius: var(--radius); cursor: pointer;
  font-weight: 700; font-size: .88rem; transition: background var(--transition);
}
.btn-accept:hover { background: var(--gold-light); }
.btn-reject {
  background: transparent; color: var(--gray); border: 1px solid var(--gray);
  padding: 9px 22px; border-radius: var(--radius); cursor: pointer;
  font-size: .88rem; transition: all var(--transition);
}
.btn-reject:hover { border-color: var(--white); color: var(--white); }

/* ── HEADER / NAV ── */
header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--navy);
  box-shadow: var(--shadow-md);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo-wrap { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.1rem; color: var(--navy); flex-shrink: 0;
}
.logo-text { line-height: 1.2; }
.logo-text .brand { font-size: 1.05rem; font-weight: 700; color: var(--white); }
.logo-text .tagline { font-size: .72rem; color: var(--gray); text-transform: uppercase; letter-spacing: .08em; }

nav ul { display: flex; gap: 4px; }
nav a {
  color: var(--gray); font-size: .88rem; font-weight: 500;
  padding: 8px 14px; border-radius: var(--radius);
  transition: all var(--transition); white-space: nowrap;
  text-transform: uppercase; letter-spacing: .04em;
}
nav a:hover, nav a.active { color: var(--white); background: var(--navy-light); }
nav a.cta-nav {
  background: var(--gold); color: var(--navy) !important; font-weight: 700;
  margin-left: 8px;
}
nav a.cta-nav:hover { background: var(--gold-light); }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 6px; background: none; border: none;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: all .3s; }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #1a2f50 100%);
  color: var(--white); padding: 100px 24px 80px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { max-width: 900px; margin: 0 auto; position: relative; }
.hero-badge { display: inline-block; background: rgba(201,151,44,.15); border: 1px solid rgba(201,151,44,.4); color: var(--gold-light); padding: 5px 14px; border-radius: 20px; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-family: var(--font-serif); font-weight: 700; line-height: 1.2; margin-bottom: 18px; }
.hero h1 em { color: var(--gold-light); font-style: normal; }
.hero-sub { font-size: 1.1rem; color: #a0b4cc; max-width: 620px; margin-bottom: 36px; line-height: 1.8; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 28px; border-radius: var(--radius); font-weight: 700; font-size: .92rem; cursor: pointer; border: none; transition: all var(--transition); }
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-light); color: var(--navy); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201,151,44,.35); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.3); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.hero-stats { display: flex; gap: 40px; margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.1); flex-wrap: wrap; }
.stat-item .num { font-size: 1.8rem; font-weight: 800; color: var(--gold-light); }
.stat-item .lbl { font-size: .78rem; color: var(--gray); text-transform: uppercase; letter-spacing: .06em; }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white); padding: 60px 24px;
  text-align: center;
}
.page-hero .breadcrumb { font-size: .82rem; color: var(--gray); margin-bottom: 12px; }
.page-hero .breadcrumb a { color: var(--gold); }
.page-hero h1 { font-family: var(--font-serif); font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: 12px; }
.page-hero p { color: #a0b4cc; max-width: 560px; margin: 0 auto; font-size: 1rem; }

/* ── SECTIONS ── */
.section { padding: 80px 24px; }
.section-alt { background: var(--off-white); }
.container { max-width: 1140px; margin: 0 auto; }
.section-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-weight: 700; margin-bottom: 10px; }
.section-title { font-family: var(--font-serif); font-size: clamp(1.5rem, 3vw, 2rem); color: var(--navy); margin-bottom: 16px; }
.section-intro { color: var(--text-light); max-width: 600px; font-size: 1rem; margin-bottom: 40px; line-height: 1.8; }
.divider { width: 48px; height: 3px; background: var(--gold); margin: 14px 0 32px; border-radius: 2px; }

/* ── CARDS GRID ── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 32px; border: 1px solid var(--gray-light);
  transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: var(--gold); }
.card-icon { width: 50px; height: 50px; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.card-icon svg { width: 24px; height: 24px; fill: var(--gold); }
.card h3 { font-size: 1.05rem; color: var(--navy); margin-bottom: 10px; font-weight: 700; }
.card p { color: var(--text-light); font-size: .9rem; line-height: 1.7; }

/* ── PROFILE ── */
.profile-layout { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: start; }
.profile-card {
  background: var(--navy); color: var(--white); border-radius: var(--radius-lg);
  padding: 36px 28px; text-align: center; position: sticky; top: 90px;
}
.profile-avatar {
  width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 900; color: var(--navy);
  border: 4px solid rgba(255,255,255,.15);
}
.profile-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.profile-card .role { font-size: .82rem; color: var(--gray); margin-bottom: 20px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.profile-tags span {
  font-size: .72rem; padding: 4px 10px;
  background: rgba(201,151,44,.15); border: 1px solid rgba(201,151,44,.3);
  color: var(--gold-light); border-radius: 20px;
}
.profile-links { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.profile-links a { font-size: .82rem; color: var(--gray); }
.profile-links a:hover { color: var(--gold-light); }

.bio-section h2 { font-family: var(--font-serif); font-size: 1.6rem; color: var(--navy); margin-bottom: 6px; }
.bio-section .divider { margin-bottom: 24px; }
.credentials { display: flex; flex-direction: column; gap: 14px; margin-bottom: 32px; }
.credential { display: flex; gap: 14px; align-items: flex-start; }
.cred-bullet { width: 8px; height: 8px; background: var(--gold); border-radius: 50%; margin-top: 8px; flex-shrink: 0; }
.credential p { font-size: .95rem; color: var(--text); line-height: 1.6; }

/* ── ARTICLES LIST ── */
.articles-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.filter-btn {
  padding: 7px 18px; border-radius: 20px; font-size: .82rem; font-weight: 600;
  border: 1px solid var(--gray-light); background: var(--white); color: var(--text-light);
  cursor: pointer; transition: all var(--transition);
}
.filter-btn.active, .filter-btn:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.articles-list { display: flex; flex-direction: column; gap: 0; }
.article-item {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 22px 0; border-bottom: 1px solid var(--gray-light);
  transition: all var(--transition);
}
.article-item:last-child { border-bottom: none; }
.article-item:hover { padding-left: 8px; }
.article-year {
  flex-shrink: 0; width: 50px; text-align: center;
  font-size: .78rem; color: var(--gold); font-weight: 700;
  padding-top: 4px;
}
.article-body h3 { font-size: .97rem; color: var(--navy); margin-bottom: 6px; line-height: 1.4; }
.article-body h3 a { color: var(--navy); }
.article-body h3 a:hover { color: var(--gold); }
.article-meta { font-size: .78rem; color: var(--gray); display: flex; gap: 12px; flex-wrap: wrap; }
.article-tag { background: var(--off-white); padding: 2px 9px; border-radius: 10px; font-weight: 600; }

.opinion-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 32px; }
.opinion-card {
  background: var(--white); border: 1px solid var(--gray-light); border-radius: var(--radius);
  padding: 20px; transition: all var(--transition);
}
.opinion-card:hover { box-shadow: var(--shadow-sm); border-color: var(--gold); }
.opinion-card a { color: var(--navy); font-size: .93rem; font-weight: 600; line-height: 1.4; display: block; }
.opinion-card a:hover { color: var(--gold); }
.opinion-card .pub { font-size: .75rem; color: var(--gray); margin-top: 6px; }

/* ── BOOKS ── */
.books-list { display: flex; flex-direction: column; gap: 48px; }
.book-item { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: start; padding-bottom: 48px; border-bottom: 1px solid var(--gray-light); }
.book-item:last-child { border-bottom: none; }
.book-spine {
  width: 24px; background: linear-gradient(180deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 3px; align-self: stretch; min-height: 80px; flex-shrink: 0;
}
.book-content h3 { font-family: var(--font-serif); font-size: 1.2rem; color: var(--navy); margin-bottom: 6px; }
.book-content .book-meta { font-size: .8rem; color: var(--gold); margin-bottom: 14px; font-weight: 600; }
.book-content p { color: var(--text-light); font-size: .93rem; line-height: 1.8; margin-bottom: 12px; }
.book-content a.book-link { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--gold); font-weight: 600; }

/* ── ARTE / GALLERY ── */
.gallery-intro { text-align: center; max-width: 600px; margin: 0 auto 40px; }
.gallery-grid { columns: 3; column-gap: 16px; }
.gallery-grid figure { break-inside: avoid; margin-bottom: 16px; border-radius: var(--radius); overflow: hidden; }
.gallery-grid img { width: 100%; transition: transform .4s; cursor: pointer; }
.gallery-grid figure:hover img { transform: scale(1.04); }
.gallery-placeholder {
  aspect-ratio: 1; background: linear-gradient(135deg, var(--navy-light), var(--navy));
  display: flex; align-items: center; justify-content: center; border-radius: var(--radius);
  color: var(--gray); font-size: .8rem; text-align: center; padding: 16px;
}

/* ── SERVICES ── */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.service-card {
  border: 1px solid var(--gray-light); border-radius: var(--radius-lg);
  padding: 32px; position: relative; overflow: hidden; transition: all var(--transition);
  background: var(--white);
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  transform: scaleX(0); transition: transform var(--transition); transform-origin: left;
}
.service-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.service-card:hover::before { transform: scaleX(1); }
.service-num { font-size: 3rem; font-weight: 900; color: var(--gray-light); margin-bottom: 12px; line-height: 1; font-family: var(--font-serif); }
.service-card h3 { font-size: 1.05rem; color: var(--navy); margin-bottom: 12px; font-weight: 700; }
.service-card ul { padding-left: 0; }
.service-card li { font-size: .88rem; color: var(--text-light); padding: 4px 0 4px 16px; position: relative; line-height: 1.6; }
.service-card li::before { content: '◆'; position: absolute; left: 0; color: var(--gold); font-size: .55rem; top: 7px; }

/* ── CONTACT ── */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-info h2 { font-family: var(--font-serif); font-size: 1.6rem; color: var(--navy); margin-bottom: 6px; }
.contact-info p { color: var(--text-light); margin-bottom: 28px; font-size: .95rem; line-height: 1.8; }
.contact-items { display: flex; flex-direction: column; gap: 18px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-item-icon {
  width: 44px; height: 44px; background: var(--navy); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-item-icon svg { width: 20px; height: 20px; fill: var(--gold); }
.contact-item h4 { font-size: .88rem; color: var(--navy); font-weight: 700; margin-bottom: 2px; }
.contact-item p { font-size: .88rem; color: var(--text-light); margin: 0; }

.contact-form { background: var(--off-white); border-radius: var(--radius-lg); padding: 36px; }
.contact-form h3 { font-family: var(--font-serif); font-size: 1.2rem; color: var(--navy); margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .82rem; color: var(--navy); font-weight: 600; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--gray-light);
  border-radius: var(--radius); font-size: .93rem; font-family: var(--font-sans);
  background: var(--white); color: var(--text); transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--gold);
}
.form-group textarea { resize: vertical; min-height: 110px; }
.privacy-check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 20px; }
.privacy-check input[type="checkbox"] { margin-top: 4px; flex-shrink: 0; accent-color: var(--gold); width: 16px; height: 16px; }
.privacy-check label { font-size: .82rem; color: var(--text-light); line-height: 1.5; }
.privacy-check a { color: var(--gold); }
.btn-submit {
  width: 100%; background: var(--navy); color: var(--white);
  padding: 13px; border: none; border-radius: var(--radius);
  font-size: 1rem; font-weight: 700; cursor: pointer; transition: all var(--transition);
}
.btn-submit:hover { background: var(--navy-light); }
.form-success { display: none; text-align: center; padding: 24px; color: #27ae60; font-weight: 600; }

/* ── LEGAL PAGES ── */
.legal-content { max-width: 820px; margin: 0 auto; }
.legal-content h2 { font-family: var(--font-serif); font-size: 1.3rem; color: var(--navy); margin: 36px 0 12px; }
.legal-content h3 { font-size: 1.05rem; color: var(--navy); margin: 24px 0 8px; }
.legal-content p, .legal-content li { font-size: .93rem; color: var(--text); line-height: 1.85; margin-bottom: 10px; }
.legal-content ul { padding-left: 20px; list-style: disc; }
.legal-content a { color: var(--gold); }
.legal-box { background: var(--off-white); border-left: 4px solid var(--gold); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 20px 0; }

/* ── CTA STRIP ── */
.cta-strip {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white); text-align: center; padding: 72px 24px;
}
.cta-strip h2 { font-family: var(--font-serif); font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 14px; }
.cta-strip p { color: #a0b4cc; margin-bottom: 28px; font-size: 1rem; }

/* ── FOOTER ── */
footer {
  background: #080f1a;
  color: #8a9ab5; font-size: .88rem;
}
.footer-inner {
  max-width: 1140px; margin: 0 auto;
  padding: 60px 24px 0;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}
.footer-brand .logo-icon { margin-bottom: 16px; }
.footer-brand p { font-size: .85rem; line-height: 1.7; max-width: 280px; margin-bottom: 20px; }
.footer-col h4 { color: var(--white); font-size: .88rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: #8a9ab5; font-size: .85rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07); padding: 20px 24px;
  max-width: 1140px; margin: 28px auto 0;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: gap;
  font-size: .8rem;
}
.footer-legal-links { display: flex; gap: 20px; }
.footer-legal-links a { color: #8a9ab5; }
.footer-legal-links a:hover { color: var(--gold-light); }

/* ── 404 ── */
.notfound {
  min-height: 80vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 40px 24px;
}
.notfound h1 { font-size: 7rem; font-weight: 900; color: var(--gold); line-height: 1; margin-bottom: 10px; }
.notfound h2 { font-family: var(--font-serif); font-size: 1.6rem; color: var(--navy); margin-bottom: 14px; }
.notfound p { color: var(--text-light); margin-bottom: 28px; }

/* ── LIGHTBOX ── */
#lightbox {
  display: none; position: fixed; inset: 0; z-index: 9990;
  background: rgba(0,0,0,.92); align-items: center; justify-content: center;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius); }
#lb-close {
  position: fixed; top: 20px; right: 24px; font-size: 2rem; color: var(--white);
  cursor: pointer; background: none; border: none; line-height: 1;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-card { position: static; }
  .contact-layout { grid-template-columns: 1fr; }
  .gallery-grid { columns: 2; }
}
@media (max-width: 768px) {
  nav ul { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--navy); flex-direction: column; padding: 16px 24px 20px; gap: 4px; box-shadow: var(--shadow-md); }
  nav ul.open { display: flex; }
  .hamburger { display: flex; }
  .hero { padding: 70px 24px 60px; }
  .hero-stats { gap: 24px; }
  .cards-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .book-item { grid-template-columns: 1fr; }
  .book-spine { width: 100%; height: 6px; min-height: 0; }
  .gallery-grid { columns: 1; }
  .services-grid { grid-template-columns: 1fr; }
  #cookie-banner { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.7rem; }
}
