/* ADIENL shared site styles
   Used by index.php and the AFILIACIONES module via includes/header.php */

:root {
  --adienl-blue-dark: #0b3d5c;
  --adienl-blue: #14608f;
  --adienl-blue-light: #eaf3f9;
  --adienl-ice: #f4f8fa;
  --adienl-accent: #d94f4f;
  --adienl-text: #22303a;
  --adienl-muted: #5a6b76;
  --adienl-border: #d7e2e8;
  --adienl-max-width: 1100px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Segoe UI", Verdana, Arial, Helvetica, sans-serif;
  background: var(--adienl-ice);
  color: var(--adienl-text);
  line-height: 1.5;
}

a { color: var(--adienl-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.site {
  max-width: var(--adienl-max-width);
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  box-shadow: 0 0 24px rgba(11, 61, 92, 0.06);
}

/* Header */
.site-header {
  background: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  border-bottom: 3px solid var(--adienl-blue-dark);
}

.site-header img.logo {
  flex: 0 0 auto;
  width: min(480px, 100%);
  height: auto;
  display: block;
}

.back-home {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  color: var(--adienl-blue-dark);
  background: var(--adienl-blue-light);
  border-bottom: 1px solid var(--adienl-border);
}
.back-home:hover { text-decoration: none; background: #dcecf5; }

/* Layout */
.layout {
  display: flex;
  align-items: flex-start;
}

/* Nav / sidebar */
.site-nav {
  flex: 0 0 220px;
  background: var(--adienl-blue-light);
  border-right: 1px solid var(--adienl-border);
  padding: 1.25rem 1rem;
  align-self: stretch;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.site-nav a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  color: var(--adienl-blue-dark);
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a:hover {
  background: #fff;
  text-decoration: none;
}

.site-nav .nav-divider {
  border: none;
  border-top: 1px solid var(--adienl-border);
  margin: 0.75rem 0;
}

/* Main content */
.site-main {
  flex: 1 1 auto;
  padding: 1.5rem 2rem;
  min-width: 0;
}

.post {
  padding-bottom: 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--adienl-border);
}
.post:last-child { border-bottom: none; }

.post h2 {
  text-align: center;
  color: var(--adienl-blue-dark);
  font-size: 1.4rem;
  margin: 0 0 1rem;
}

.post h3 {
  color: var(--adienl-blue-dark);
  font-size: 1.1rem;
}

.post-figure {
  text-align: center;
  margin: 1rem 0;
}

.post-figure img { border-radius: 4px; }

.cta-button {
  display: inline-block;
  margin: 0.75rem 0;
}

.promo-button {
  display: inline-block;
  background: linear-gradient(180deg, #1a63a8, #0b3d5c);
  color: #ffd400;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  padding: 1rem 2.25rem;
  border-radius: 14px;
  box-shadow: 0 6px 0 #062338, 0 8px 14px rgba(0, 0, 0, 0.35);
  line-height: 1.3;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.promo-button:hover {
  text-decoration: none;
  transform: translateY(2px);
  box-shadow: 0 4px 0 #062338, 0 6px 10px rgba(0, 0, 0, 0.3);
}
.promo-button small {
  display: block;
  font-size: 0.8em;
  font-weight: 700;
  margin-top: 0.15rem;
}

.data-table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 auto 1rem;
}

.data-table th,
.data-table td {
  border: 1px solid var(--adienl-border);
  padding: 0.5rem 0.75rem;
  text-align: center;
}

.data-table th {
  background: var(--adienl-blue-light);
  color: var(--adienl-blue-dark);
}

.alert-error {
  background: #fdecea;
  border: 1px solid #f3b4ab;
  color: #8a1f11;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  text-align: center;
  margin: 1.5rem 0;
}

.honor-list {
  border-collapse: collapse;
  margin: 0 auto 1.25rem;
}
.honor-list td {
  border: 1px solid var(--adienl-border);
  padding: 0.4rem 0.9rem;
  text-align: center;
}

.hit-counter {
  margin-top: 1.5rem;
  text-align: center;
  opacity: 0.7;
}

/* Footer */
.site-footer {
  background: var(--adienl-blue-dark);
  color: #cfe0ea;
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
}

/* Forms (AFILIACIONES module) */
.form-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.form-table tr:nth-child(odd) td { background: #fbfdfe; }
.form-table tr:nth-child(even) td { background: #fff; }

.form-table td {
  border-bottom: 1px solid var(--adienl-border);
  padding: 0.65rem 0.75rem;
  vertical-align: middle;
}

.form-table .form-label {
  background: var(--adienl-blue-light) !important;
  color: var(--adienl-blue-dark);
  font-weight: 600;
  width: 38%;
}

.form-table select,
.form-table input[type="text"],
.form-table input[type="tel"],
.form-table input[type="email"],
.form-table textarea {
  width: 100%;
  max-width: 420px;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--adienl-border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
}

.form-table .required { color: var(--adienl-accent); font-weight: 700; }
.form-table .hint { color: var(--adienl-muted); font-size: 0.85rem; }

.form-table .readonly-value {
  display: inline-block;
  padding: 0.4rem 0.5rem;
  color: var(--adienl-text);
  font-weight: 600;
}
.form-table .readonly-note {
  color: var(--adienl-muted);
  font-size: 0.8rem;
  font-weight: 400;
  margin-left: 0.5rem;
}

.form-separator td { padding: 0.35rem; background: var(--adienl-border) !important; }

.form-actions {
  text-align: center;
  padding: 1rem 0;
}

.form-actions input[type="submit"] {
  background: var(--adienl-blue);
  color: #fff;
  border: none;
  padding: 0.7rem 1.75rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}
.form-actions input[type="submit"]:disabled {
  background: #a9c2cf;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 780px) {
  .layout { flex-direction: column; }
  .site-nav {
    flex: 1 1 auto;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--adienl-border);
  }
  .site-nav ul { flex-direction: row; flex-wrap: wrap; }
  .site-main { padding: 1.25rem; }
  .form-table .form-label { width: auto; display: block; }
  .form-table, .form-table tbody, .form-table tr, .form-table td {
    display: block;
    width: 100%;
  }
  .form-table select,
  .form-table input[type="text"],
  .form-table input[type="tel"],
  .form-table input[type="email"],
  .form-table textarea {
    max-width: 100%;
  }
}
