/* ============================================
   42º NOTARÍA ÁLVARO GONZÁLEZ SALINAS
   ============================================ */

:root {
  --primary: #004059;
  --primary-dark: #002840;
  --primary-light: #006699;
  --accent: #c49a2a;
  --accent-light: #e0b83a;
  --text: #222;
  --text-light: #555;
  --bg: #f8f9fa;
  --white: #ffffff;
  --border: #ddd;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
  --font: 'PT Sans', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
  background: var(--bg);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ====================
   NAVBAR
   ==================== */
.navbar {
  background: var(--primary);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.navbar-brand {
  display: flex;
  flex-direction: column;
}

.navbar-brand .brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}

.navbar-brand .brand-sub {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.navbar-menu a {
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.navbar-menu a:hover,
.navbar-menu a.active {
  background: rgba(255,255,255,0.15);
  color: var(--white);
}

.navbar-menu .dropdown {
  position: relative;
}

.navbar-menu .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  z-index: 200;
}

.navbar-menu .dropdown:hover .dropdown-content {
  display: block;
}

.navbar-menu .dropdown-content a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.navbar-menu .dropdown-content a:last-child { border-bottom: none; }
.navbar-menu .dropdown-content a:hover { background: var(--bg); }

.navbar-menu .dropdown-content a.nota-link {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 768px) {
  .navbar-toggle { display: block; }
  .navbar-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--primary-dark);
    padding: 0.5rem 0;
  }
  .navbar-menu.open { display: flex; }
  .navbar-menu a { width: 100%; padding: 0.75rem 1.5rem; }
  .navbar-menu .dropdown-content {
    position: static;
    box-shadow: none;
    background: rgba(255,255,255,0.05);
  }
  .navbar-menu .dropdown-content a {
    color: rgba(255,255,255,0.8);
    padding-left: 2rem;
  }
  .navbar-menu .dropdown:hover .dropdown-content { display: none; }
  .navbar-menu .dropdown .dropdown-toggle::after { content: ' ▼'; font-size: 0.7em; }
}

/* ====================
   HERO
   ==================== */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(0,64,89,0.92) 0%, rgba(0,40,64,0.85) 100%),
    url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?w=1400&q=80') center/cover no-repeat;
  color: var(--white);
  overflow: hidden;
}

.hero-overlay {
  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-content {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
}

.hero-content h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--accent-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-desc {
  font-size: 1.1rem;
  max-width: 600px;
  color: rgba(255,255,255,0.88);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ====================
   BUTTONS
   ==================== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196,154,42,0.35);
}

.btn-outline {
  border-color: rgba(255,255,255,0.6);
  color: var(--white);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.1);
}

.btn-sm {
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
}

/* ====================
   INFO BAR
   ==================== */
.info-bar {
  background: var(--primary-dark);
  color: var(--white);
  padding: 1.25rem 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.info-item {
  font-size: 0.88rem;
}

.info-item strong {
  display: block;
  color: var(--accent-light);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.info-item span { color: rgba(255,255,255,0.85); }

/* ====================
   SECTIONS
   ==================== */
.section { padding: 4rem 0; }
.section-alt { background: var(--white); }
.section-dark { background: var(--primary); color: var(--white); }

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
  text-align: center;
}

.section-desc {
  text-align: center;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  font-size: 1rem;
}

.section-dark .section-title { color: var(--white); }
.section-dark .section-desc { color: rgba(255,255,255,0.75); }

.text-center { text-align: center; }
.narrow { max-width: 800px; }

/* ====================
   SERVICIOS GRID
   ==================== */
.serv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.serv-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.serv-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.serv-icon {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.serv-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
}

.serv-card p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.5;
  flex-grow: 1;
}

.serv-more {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.5rem;
}

/* ====================
   TRANSPARENCIA
   ==================== */
.trans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.trans-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.trans-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.trans-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

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

/* ====================
   CHECK LIST
   ==================== */
.check-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.check-list li {
  padding: 0.75rem 1rem;
  background: var(--white);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}

.note {
  font-size: 0.88rem;
  color: var(--text-light);
  background: #fff8e1;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}

/* ====================
   PAGE HEADER
   ==================== */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
}

/* ====================
   CONTENT
   ==================== */
.content {
  padding: 3rem 0;
}

.content h2 {
  font-size: 1.4rem;
  color: var(--primary);
  margin: 2rem 0 0.75rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.4rem;
}

.content h2:first-child { margin-top: 0; }

.content h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin: 1.5rem 0 0.5rem;
}

.content p {
  margin-bottom: 1rem;
  color: var(--text-light);
  line-height: 1.7;
}

.content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.content ul li {
  margin-bottom: 0.4rem;
  color: var(--text-light);
}

.tramite-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.tramite-item h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin: 0 0 0.5rem;
}

.tramite-item .tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.tag-publica { background: #e3f2fd; color: #0d47a1; }
.tag-privada { background: #f3e5f5; color: #4a148c; }
.tag-info { background: #e8f5e9; color: #1b5e20; }

.tramite-item ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

.tramite-item ul li { font-size: 0.9rem; }

/* ====================
   TEAM / FUNCIONARIOS
   ==================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.team-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.team-card .team-name {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.team-card .team-role {
  font-size: 0.82rem;
  color: var(--text-light);
}

/* ====================
   FOOTER
   ==================== */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 2.5rem 0 1rem;
  font-size: 0.88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-col ul { display: flex; flex-direction: column; gap: 0.4rem; }

.footer-col a {
  color: rgba(255,255,255,0.7);
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--accent-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.footer-links a { color: rgba(255,255,255,0.6); }
.footer-links a:hover { color: var(--accent-light); }

/* ====================
   FORMULARIOS
   ==================== */
.form-group { margin-bottom: 1rem; }

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  background: var(--white);
  transition: border-color 0.2s;
}

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

/* ====================
   TABLA INDICE
   ==================== */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

thead { background: var(--primary); color: var(--white); }

th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-light);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8f9fa; }

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  background: var(--primary);
  color: var(--white);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-download:hover { background: var(--primary-light); }

/* ====================
   ALERTS
   ==================== */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.alert-info {
  background: #e3f2fd;
  border-left: 4px solid #1976d2;
  color: #0d47a1;
}

.alert-success {
  background: #e8f5e9;
  border-left: 4px solid #388e3c;
  color: #1b5e20;
}

/* ====================
   PRIVACY BANNER
   ==================== */
.privacy-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary-dark);
  color: var(--white);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.88rem;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.privacy-banner p { flex-grow: 1; }

.privacy-banner .btn {
  flex-shrink: 0;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
}

.privacy-banner .btn-accept {
  background: var(--accent);
  color: var(--primary-dark);
}

/* ====================
   RESPONSIVE
   ==================== */
@media (max-width: 768px) {
  .hero { min-height: 420px; }
  .hero-content { padding: 2rem 1.5rem; }
  .section { padding: 2.5rem 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .navbar-brand .brand-name { font-size: 0.95rem; }
}

@media (max-width: 480px) {
  .serv-grid { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; text-align: center; }
}
