:root {
  --ajavyt-blue: #243d8f;
  --ajavyt-blue-dark: #16265c;
  --ajavyt-sky: #00a8d7;
  --ajavyt-green: #76b82a;
  --ajavyt-yellow: #f6c73f;
  --ajavyt-orange: #ef7d22;
  --ink: #172033;
  --muted: #667085;
  --line: #d9e2ee;
  --surface: #ffffff;
  --soft: #f4f8fb;
  --shadow: 0 18px 50px rgba(19, 39, 79, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  background: var(--surface);
}

a {
  color: inherit;
}

.navbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(36, 61, 143, 0.12);
  backdrop-filter: blur(18px);
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  display: block;
  width: auto;
  height: 58px;
  object-fit: contain;
}

.nav-link {
  color: var(--ink);
  font-weight: 650;
}

.nav-link:hover {
  color: var(--ajavyt-blue);
}

.btn {
  border-radius: 8px;
  font-weight: 750;
}

.btn-brand {
  color: white;
  background: var(--ajavyt-blue);
  border-color: var(--ajavyt-blue);
}

.btn-brand:hover {
  color: white;
  background: var(--ajavyt-blue-dark);
  border-color: var(--ajavyt-blue-dark);
}

.hero-section {
  position: relative;
  min-height: 720px;
  color: white;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 28, 65, 0.88), rgba(18, 28, 65, 0.4) 55%, rgba(18, 28, 65, 0.1)),
    url("assets/fondo-ajavyt.jpg?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-bottom: 5rem;
}

.eyebrow,
.section-kicker {
  margin-bottom: 0.75rem;
  color: var(--ajavyt-orange);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-section h1 {
  margin: 0;
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 900;
  line-height: 0.9;
}

.hero-section .lead {
  max-width: 720px;
  margin: 1.5rem 0 2rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-facts {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  backdrop-filter: blur(16px);
}

.hero-facts strong,
.hero-facts span {
  display: block;
}

.hero-facts strong {
  font-size: 1.5rem;
}

.hero-facts span {
  color: rgba(255, 255, 255, 0.78);
}

.section-block {
  padding: 6rem 0;
}

.section-block h2,
.cta-band h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 850;
  line-height: 1.05;
  color: var(--ajavyt-blue-dark);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.services-band {
  background:
    linear-gradient(180deg, rgba(0, 168, 215, 0.08), rgba(118, 184, 42, 0.08)),
    var(--soft);
}

.service-swiper {
  padding: 0.35rem 0 3.7rem;
}

.service-card {
  min-height: 320px;
  padding: 2rem;
  background: white;
  border: 1px solid var(--line);
  border-top: 5px solid var(--ajavyt-green);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.service-card:nth-child(2) {
  border-top-color: var(--ajavyt-yellow);
}

.service-card:nth-child(3) {
  border-top-color: var(--ajavyt-orange);
}

.service-card svg {
  width: 36px;
  height: 36px;
  color: var(--ajavyt-blue);
  stroke-width: 2.1;
}

.service-card h3 {
  margin: 1.35rem 0 0.75rem;
  font-size: 1.55rem;
  font-weight: 850;
  color: var(--ajavyt-blue-dark);
}

.service-card p {
  color: var(--muted);
}

.service-card a {
  display: inline-flex;
  margin-top: 0.5rem;
  color: var(--ajavyt-blue);
  font-weight: 800;
  text-decoration: none;
}

.slider-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.slider-btn {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--ajavyt-blue);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.swiper-pagination {
  position: static;
  width: auto;
}

.swiper-pagination-bullet-active {
  background: var(--ajavyt-blue);
}

.filter-bar {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-start;
  padding: 0.35rem;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filter-btn {
  flex: 1;
  min-height: 42px;
  padding: 0 0.9rem;
  color: var(--ajavyt-blue-dark);
  font-weight: 800;
  background: transparent;
  border: 0;
  border-radius: 7px;
}

.filter-btn.active {
  color: white;
  background: var(--ajavyt-blue);
}

.agency-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.agency-card {
  display: flex;
  min-height: 260px;
  padding: 1.05rem;
  flex-direction: column;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.agency-card:hover {
  color: var(--ink);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.agency-logo {
  display: grid;
  aspect-ratio: 2 / 1.5;
  width: 100%;
  place-items: center;
  margin-bottom: 1.15rem;
  padding: 0.8rem;
  color: var(--ajavyt-blue-dark);
  font-size: 1.3rem;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(135deg, rgba(0, 168, 215, 0.12), rgba(246, 199, 63, 0.18));
  border-radius: 8px;
}

.agency-logo::after {
  content: attr(data-initials);
}

.agency-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.agency-card h3 {
  margin: 0 0 1rem;
  font-size: clamp(1rem, 1.1vw, 1.25rem);
  font-weight: 850;
  line-height: 1.12;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.tag {
  padding: 0.2rem 0.55rem;
  color: var(--ajavyt-blue-dark);
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(118, 184, 42, 0.14);
  border-radius: 7px;
}

.instagram-band {
  background: var(--ajavyt-blue-dark);
  color: white;
}

.instagram-band h2 {
  color: white;
}

.instagram-band p {
  color: rgba(255, 255, 255, 0.74);
}

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.instagram-post,
.feed-skeleton {
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.instagram-post {
  position: relative;
  display: block;
}

.instagram-post img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.instagram-post:hover img {
  transform: scale(1.04);
}

.instagram-post span {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  left: 0.75rem;
  color: white;
  font-size: 0.82rem;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.feed-skeleton {
  animation: pulse 1.4s ease-in-out infinite alternate;
}

.feed-note {
  margin: 1rem 0 0;
  font-size: 0.9rem;
}

.contact-section {
  background: var(--soft);
}

.contact-list {
  display: grid;
  gap: 0.75rem;
  margin: 2rem 0;
}

.contact-list p {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin: 0;
  font-weight: 700;
}

.contact-list svg {
  color: var(--ajavyt-orange);
}

.contact-form {
  display: grid;
  gap: 0.85rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--ajavyt-blue-dark);
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.map-shell {
  height: 100%;
  min-height: 560px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.map-shell iframe {
  width: 100%;
  height: 100%;
  min-height: 560px;
  border: 0;
}

.cta-band {
  padding: 3rem 0;
  color: white;
  background: linear-gradient(90deg, var(--ajavyt-blue), var(--ajavyt-sky));
}

.cta-band .container {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

.cta-band h2,
.cta-band .section-kicker {
  color: white;
}

.site-footer {
  padding: 1.5rem 0;
  color: rgba(255, 255, 255, 0.8);
  background: #101828;
}

.site-footer .container {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.admin-page {
  min-height: 100vh;
  background: var(--soft);
}

.admin-header {
  padding: 1.25rem 0;
  background: white;
  border-bottom: 1px solid var(--line);
}

.admin-header .container-fluid {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding-right: 2rem;
  padding-left: 2rem;
}

.admin-header h1 {
  margin: 0;
  color: var(--ajavyt-blue-dark);
  font-size: 1.45rem;
  font-weight: 850;
}

.admin-header p,
.admin-panel-head p {
  margin: 0;
  color: var(--muted);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(420px, 0.8fr);
  gap: 1.25rem;
  padding: 1.25rem 2rem 2rem;
}

.admin-panel {
  padding: 1.25rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-panel-head {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.admin-panel h2 {
  margin: 0;
  color: var(--ajavyt-blue-dark);
  font-size: 1.15rem;
  font-weight: 850;
}

.agency-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.agency-table td {
  vertical-align: middle;
}

.agency-table strong,
.agency-table span,
.agency-table small {
  display: block;
}

.agency-table strong {
  color: var(--ajavyt-blue-dark);
}

.agency-table small {
  color: var(--muted);
}

.admin-logo {
  display: grid;
  width: 88px;
  height: 56px;
  place-items: center;
  padding: 0.35rem;
  background: var(--soft);
  border-radius: 8px;
}

.admin-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.admin-logo-fallback {
  color: var(--ajavyt-blue);
  font-weight: 850;
}

.admin-form {
  display: grid;
  gap: 1rem;
}

.admin-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--ajavyt-blue-dark);
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.admin-fieldset {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-fieldset legend {
  float: none;
  width: auto;
  margin: 0 0.75rem 0 0;
  color: var(--ajavyt-blue-dark);
  font-size: 0.95rem;
  font-weight: 850;
}

.admin-fieldset .form-check,
.active-check {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin: 0;
  color: var(--ink);
}

.admin-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.admin-status {
  min-height: 1.5rem;
  margin: 0;
  font-weight: 800;
}

.admin-status[data-tone="success"] {
  color: #267a2f;
}

.admin-status[data-tone="error"] {
  color: #b42318;
}

@keyframes pulse {
  from {
    opacity: 0.45;
  }

  to {
    opacity: 0.9;
  }
}

@media (max-width: 991.98px) {
  .hero-section {
    min-height: 780px;
  }

  .hero-content {
    padding-top: 7rem;
  }

  .section-heading,
  .cta-band .container,
  .site-footer .container {
    align-items: flex-start;
    flex-direction: column;
  }

  .agency-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-layout {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
}

@media (max-width: 575.98px) {
  .section-block {
    padding: 4rem 0;
  }

  .hero-section {
    min-height: 700px;
  }

  .filter-bar {
    flex-direction: column;
  }

  .agency-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .agency-card {
    min-height: 220px;
    padding: 0.75rem;
  }

  .agency-card h3 {
    font-size: 0.9rem;
  }

  .tag {
    font-size: 0.68rem;
  }

  .instagram-grid {
    grid-template-columns: 1fr;
  }

  .map-shell,
  .map-shell iframe {
    min-height: 420px;
  }

  .admin-header .container-fluid,
  .admin-panel-head,
  .admin-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}
