/* ============================================================
   VARIABLES
   ============================================================ */
:root {
  --blue-hospital: #005b96;
  --blue-hospital-hover: #004a7c;
  --blue-dark: #1a365d;
  --blue-light: #e8f2fa;
  --bg-white: #ffffff;
  --bg-section: #f8fbff;
  --text-dark: #2d3748;
  --text-light: #718096;
  --card-border: #edf2f7;
  --radius: 1rem;
  --radius-sm: 0.5rem;
  --shadow-soft: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-medium: 0 8px 30px rgba(0,0,0,0.12);
}

/* ============================================================
   RESET + BODY
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  padding-top: 90px;
  background: #fff;
  color: #2d3748;
  line-height: 1.6;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: var(--bg-white);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
  width: 100%;
  margin: 0 auto;
  padding: 0 5%;
}

@media (min-width: 1025px) {
  .nav-container {
    padding: 0 2%;
    max-width: 1800px;
  }
}

.logo-img {
  height: 45px;
  width: auto;
  display: block;
}

.mobile-toggle,
.mobile-menu-header,
.close-menu,
.nav-overlay {
  display: none;
}

.nav-list {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 1.5rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.nav-link i {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.nav-link:hover {
  color: var(--blue-hospital);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-white);
  min-width: 260px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-radius: var(--radius-sm);
  padding: 1rem 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1001;
}

@media (min-width: 1025px) {
  .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .dropdown:hover .nav-link i {
    transform: rotate(180deg);
  }
}

.dropdown-menu li a {
  display: block;
  padding: 0.6rem 1.5rem;
  text-decoration: none;
  color: var(--text-dark);
  font-size: 0.9rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-menu li a:hover {
  background-color: #f7fafc;
  color: var(--blue-hospital);
}

.btn-contacto-nav {
  background-color: var(--blue-hospital);
  color: var(--bg-white) !important;
  padding: 0.7rem 1.8rem;
  border-radius: 50px;
  transition: background-color 0.3s ease;
  font-weight: 600;
}

.btn-contacto-nav:hover {
  background-color: var(--blue-hospital-hover);
}

/* ============================================================
   MOBILE NAV
   ============================================================ */
@media (max-width: 1024px) {
  .mobile-toggle {
    display: block;
    font-size: 1.8rem;
    color: var(--blue-hospital);
    background: none;
    border: none;
    cursor: pointer;
  }

  .nav-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
    z-index: 1005;
  }

  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85vw;
    max-width: 450px;
    height: 100vh;
    background-color: var(--bg-white);
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    flex-direction: column;
    padding: 0;
    transition: right 0.4s cubic-bezier(0.77,0,0.175,1);
    z-index: 1010;
    overflow-y: auto;
    display: flex;
  }

  .nav-menu.open {
    right: 0;
  }

  .mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    border-bottom: 1px solid var(--card-border);
  }

  .close-menu {
    display: block;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-dark);
    cursor: pointer;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 0;
  }

  .nav-item {
    border-bottom: 1px solid #f0f4f8;
  }

  .nav-link {
    padding: 1.2rem 5%;
    justify-content: space-between;
  }

  .btn-contacto-nav {
    margin: 1.5rem 5%;
    text-align: center;
    justify-content: center;
  }

  .dropdown-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: block;
    background-color: #f8fafc;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0;
  }

  .dropdown.active .dropdown-menu {
    max-height: 400px;
    padding: 0.4rem 0;
  }

  .dropdown.active .nav-link i {
    transform: rotate(180deg);
  }

  .dropdown-menu li a {
    padding: 0.8rem 5% 0.8rem 10%;
  }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.cat-hero {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
}

.cat-hero::before {
  content: "";
  pointer-events: none;
  position: absolute;
  top: -150px;
  right: -150px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

.cat-hero::after {
  content: "";
  pointer-events: none;
  position: absolute;
  bottom: -150px;
  left: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(0,0,0,0.12);
}

.cat-hero__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  z-index: 2;
}

.cat-hero__badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  border-radius: 50px;
  padding: 0.3rem 1rem;
  margin-bottom: 1rem;
}

.cat-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.cat-hero__desc {
  color: rgba(255,255,255,0.88);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.cat-hero__chips {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: center;
  gap: 0.75rem;
}

.cat-hero__chip {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 50px;
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cat-hero__chip i {
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
}

/* ============================================================
   HERO COLOR MODIFIERS
   ============================================================ */
.cat-hero--libre {
  background: linear-gradient(135deg, #010c1f 0%, #003378 40%, #0055cc 70%, #1a80ff 100%);
}

.cat-hero--cerrados {
  background: linear-gradient(170deg, #050810 0%, #0c1525 35%, #142240 65%, #1c3660 100%);
}

.cat-hero--multisalud {
  background: linear-gradient(135deg, #001018 0%, #003848 40%, #006878 70%, #00aacc 100%);
}

.cat-hero--pyme {
  background: linear-gradient(135deg, #1a0d00 0%, #4a2900 40%, #916000 70%, #c98a00 100%);
}

.cat-hero--ambulatorio {
  background: linear-gradient(145deg, #001209 0%, #003820 40%, #006838 70%, #00a050 100%);
}

/* ============================================================
   PLANS SECTION
   ============================================================ */
.cat-planes {
  padding: 4rem 0 5rem;
  background: var(--bg-section);
}

.cat-planes__intro {
  text-align: center;
  margin-bottom: 3rem;
}

.cat-planes__intro h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--blue-dark);
  margin-bottom: 0.5rem;
}

.cat-planes__intro p {
  color: var(--text-light);
  font-size: 1rem;
}

.cat-planes__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ============================================================
   PLAN CARDS
   ============================================================ */
.cat-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid var(--card-border);
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.cat-card__top {
  padding: 1.6rem 1.6rem 1.2rem;
  flex: 1;
}

.cat-card__tag {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue-hospital);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 50px;
  padding: 0.2rem 0.75rem;
  margin-bottom: 0.8rem;
}

.cat-card__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--blue-dark);
  margin-bottom: 0.4rem;
}

.cat-card__desc {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.cat-card__features {
  list-style: none;
  padding: 0;
  margin-bottom: 0;
}

.cat-card__features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.87rem;
  color: var(--text-dark);
  padding: 0.3rem 0;
}

.cat-card__features li i {
  color: var(--blue-hospital);
  font-size: 0.78rem;
  flex-shrink: 0;
}

.cat-card__actions {
  padding: 1.2rem 1.6rem;
  border-top: 1px solid var(--card-border);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cat-card__link {
  flex: 1;
  text-align: center;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--blue-hospital);
  color: var(--blue-hospital);
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.cat-card__link:hover {
  background: var(--blue-hospital);
  color: #fff;
}

.cat-card__btn {
  flex: 1;
  padding: 0.6rem 0.8rem;
  background: linear-gradient(135deg, var(--blue-hospital), #0077c8);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.cat-card__btn:hover {
  background: linear-gradient(135deg, var(--blue-hospital-hover), #005ea8);
  transform: translateY(-1px);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background-color: #1a365d;
  color: #fff;
  font-family: 'Poppins', sans-serif;
}

.footer-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  padding: 3.5rem 1.5rem;
  justify-content: space-between;
}

.footer-logo-col {
  flex: 1;
  min-width: 200px;
}

.logo-img-footer {
  height: 45px;
  width: auto;
  display: block;
  margin-bottom: 1.5rem;
}

.footer-logo-col p {
  color: #cbd5e0;
  font-size: 0.92rem;
  line-height: 1.7;
}

.footer-info-col {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .footer-info-col {
    flex-direction: row;
    justify-content: flex-end;
    gap: 6rem;
  }
}

.footer-links h3,
.footer-contact h3 {
  font-size: 1rem;
  margin-bottom: 1.2rem;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.7rem;
}

.footer-links a {
  color: #cbd5e0;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-contact p {
  color: #cbd5e0;
  margin-bottom: 0.7rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-contact p a {
  color: inherit;
  text-decoration: none;
}

.footer-contact p i {
  color: #63b3ed;
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.footer-bottom {
  background-color: #1a365d;
  text-align: center;
  padding: 1.2rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-bottom p {
  color: #a0aec0;
  font-size: 0.85rem;
  margin: 0;
}

/* ============================================================
   PAGE TRANSITIONS
   ============================================================ */
body {
  animation: pageEnter 0.35s ease backwards;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
  }
}

body.page-exit {
  animation: pageLeave 0.28s ease forwards !important;
}

@keyframes pageLeave {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .cat-hero__inner {
    padding: 3.5rem 1.2rem;
  }

  .cat-hero h1 {
    font-size: 1.8rem;
  }

  .cat-planes__grid {
    grid-template-columns: 1fr;
  }

  .cat-card__actions {
    flex-direction: column;
  }
}
