/* ============================================================
   CUADRANTE — HOME (Design System)
   ============================================================ */
:root {
  --q-primary: #075A73;
  --q-primary-dark: #063F52;
  --q-primary-deep: #032F40;
  --q-secondary: #0E718D;
  --q-orange: #FF9800;
  --q-orange-dark: #E88700;
  --q-white: #FFFFFF;
  --q-bg: #F6F8FA;
  --q-surface: #FFFFFF;
  --q-text: #123746;
  --q-text-secondary: #5F6F78;
  --q-border: #DCE4E8;
  --container-max: 1280px;
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px;
  --shadow-sm: 0 2px 8px rgba(0,40,55,.08);
  --shadow-md: 0 8px 24px rgba(0,40,55,.12);
  --transition: 180ms ease;
}

body.home {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--q-text);
  background: var(--q-white);
  line-height: 1.5;
}
body.home .container {
  width: min(calc(100% - 48px), var(--container-max));
  margin-inline: auto;
}

/* ---------------- Header ---------------- */
.home .header {
  position: sticky; top: 0; z-index: 100;
  background: var(--q-primary);
  color: var(--q-white);
  padding: 0;
  transition: box-shadow var(--transition);
}
.home .header--scrolled { box-shadow: var(--shadow-md); }
.home .header__inner {
  min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0;
}
.home .brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.home .logo-img { height: 65px; width: auto; }
.home .brand__tag {
  color: rgba(255,255,255,.9); font-size: 11px; line-height: 1.12; font-weight: 500;
  border-left: 1px solid rgba(255,255,255,.5); padding-left: 14px; letter-spacing: .3px;
}
.home .header__nav { margin-left: auto; }
.home .nav-login-item { display: none; }
.home .nav-menu { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.home .nav-menu a {
  color: var(--q-white); text-decoration: none; font-weight: 500; font-size: 15px;
  padding: 4px 0; border-bottom: 2px solid transparent; transition: var(--transition);
}
.home .nav-menu a:hover, .home .nav-menu a.active { border-bottom-color: var(--q-orange); }
.home .btn-login {
  background: var(--q-orange); color: #fff; border: 0; border-radius: 8px;
  min-height: 44px; padding: 0 20px; font-weight: 600; display: inline-flex;
  align-items: center; gap: 8px; text-decoration: none; white-space: nowrap;
}
.home .btn-login:hover { background: var(--q-orange-dark); }
.home .hamburger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.home .hamburger span { display: block; width: 30px; height: 3px; background: #fff; margin: 6px 0; border-radius: 2px; transition: var(--transition); }

/* ---------------- Hero ---------------- */
.home .hero { position: relative; min-height: 620px; display: flex; align-items: center; overflow: hidden; }
.home .hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home .hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(3,47,64,.96) 0%, rgba(3,47,64,.82) 45%, rgba(3,47,64,.35) 100%);
}
.home .hero__inner {
  position: relative; z-index: 2; display: block;
  padding-block: 64px; width: min(calc(100% - 48px), var(--container-max));
}
.home .hero__content { max-width: 100%; }
.home .hero__search-row { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.home .hero__badge {
  display: inline-block; color: #bcdbe6; font-size: 13.5px; font-weight: 600;
  letter-spacing: 2px; margin-bottom: 14px;
}
.home .hero__title { color: #fff; font-size: 60px; line-height: 1.05; font-weight: 800; margin: 0 0 14px; }
.home .hero__title .hl, .home .opportunities__text .hl { color: var(--q-orange); }
.home .hero__desc { color: #d7e3e8; font-size: 18px; max-width: 560px; margin: 0 0 22px; }

.home .hero__tabs {
  display: inline-flex; gap: 4px; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25); border-radius: 10px; padding: 4px; margin-bottom: 12px;
  flex-wrap: wrap;
}
.home .hero-tab {
  border: 0; background: transparent; color: #fff; font-weight: 600; font-size: 14px;
  padding: 9px 16px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: var(--transition);
}
.home .hero-tab:hover { background: rgba(255,255,255,.12); }
.home .hero-tab.active { background: #fff; color: var(--q-primary); }

.home .hero-search-bar {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr auto; gap: 6px;
  background: #fff; border-radius: 12px; padding: 6px; box-shadow: var(--shadow-md);
  flex: 1 1 640px; max-width: 860px;
}
.home .hero-field { display: flex; align-items: center; gap: 8px; padding: 0 10px; border-right: 1px solid var(--q-border); }
.home .hero-field > i { color: var(--q-text-secondary); }
.home .hero-search-distrito { position: relative; flex: 1; }
.home .distrito-trigger {
  border: 0; background: transparent; cursor: pointer; color: var(--q-text-secondary);
  font-size: 15px; text-align: left; width: 100%; padding: 10px 0; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.home .distrito-dropdown {
  display: none; position: absolute; top: calc(100% + 10px); left: 0; z-index: 30;
  background: #fff; border: 1px solid var(--q-border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); width: 300px; max-height: 300px; overflow: auto; padding: 10px;
}
.home .distrito-dropdown.open { display: block; }
.home .distrito-search-input { width: 100%; border: 1px solid var(--q-border); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.home .distrito-options label { display: flex; align-items: center; gap: 8px; padding: 6px 4px; cursor: pointer; font-size: 14px; }
.home .hero-select {
  border: 0; background: transparent; font-size: 15px; color: var(--q-text);
  padding: 10px 8px; border-right: 1px solid var(--q-border); cursor: pointer;
}
.home .hero-search-bar .hero-input {
  border: 0; background: transparent; font-size: 15px; color: var(--q-text);
  padding: 10px 8px; border-right: 1px solid var(--q-border); width: 100%; min-width: 0; outline: none;
}
.home .hero-search-bar .hero-input::placeholder { color: var(--q-text-secondary); }
.home .hero-search-bar .btn-buscar-hero {
  border: 0; background: var(--q-orange); color: #fff; border-radius: 8px; min-height: 44px;
  padding: 0 20px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.home .hero-search-bar .btn-buscar-hero:hover { background: var(--q-orange-dark); }
.home .hero__advanced {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  color: #cfe0e7; font-size: 14px; text-decoration: none;
}
.home .hero__advanced:hover { color: #fff; }

.home .hero__audiences { display: flex; flex-direction: row; gap: 24px; align-items: center; }
.home .audience { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #dbe8ed; font-size: 12px; white-space: nowrap; }
.home .audience i { font-size: 22px; color: #cfe0e7; }

/* ---------------- Valor ---------------- */
.home .value-section { background: var(--q-white); border-bottom: 1px solid var(--q-border); }
.home .value-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.home .value-item { padding: 34px 26px; border-right: 1px solid var(--q-border); text-align: left; }
.home .value-item:last-child { border-right: 0; }
.home .value-item i { font-size: 30px; color: var(--q-primary); margin-bottom: 12px; }
.home .value-item h3 { color: var(--q-text); font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.home .value-item p { color: var(--q-text-secondary); font-size: 14px; margin: 0; }

/* ---------------- Secciones ---------------- */
.home .section { padding-block: 56px; background: var(--q-bg); }
.home .section-title {
  position: relative; color: var(--q-text); font-size: 30px; font-weight: 700;
  margin: 0 0 28px; padding-top: 16px;
}
.home .section-title::before {
  content: ''; position: absolute; top: 0; left: 0; width: 46px; height: 4px;
  background: var(--q-orange); border-radius: 2px;
}

/* ---------------- Explora por tipo ---------------- */
.home .type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.home .type-card {
  position: relative; display: block; border-radius: var(--radius-md); overflow: hidden;
  text-decoration: none; box-shadow: var(--shadow-sm); min-height: 260px;
}
.home .type-card img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; position: absolute; inset: 0; }
.home .type-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(3,47,64,0) 35%, rgba(3,47,64,.85) 100%);
}
.home .type-card__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 62px 16px 16px; z-index: 2; }
.home .type-card__body h3 { color: #fff; font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.home .type-card__body p {
  color: #d7e3e8; font-size: 13px; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.home .type-card__arrow {
  position: absolute; right: 14px; bottom: 14px; z-index: 2; width: 38px; height: 38px;
  border-radius: 50%; background: var(--q-orange); color: #fff; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.home .type-card:hover .type-card__arrow { background: var(--q-orange-dark); transform: translateX(3px); }

/* ---------------- Oportunidades ---------------- */
.home .opportunities { background: var(--q-white); }
.home .opportunities__grid {
  display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 32px; align-items: center;
  padding-block: 56px;
}
.home .eyebrow { color: var(--q-secondary); font-size: 12px; font-weight: 700; letter-spacing: 1.5px; }
.home .opportunities__text h2 { color: var(--q-text); font-size: 34px; line-height: 1.1; font-weight: 800; margin: 10px 0 14px; }
.home .opportunities__text p { color: var(--q-text-secondary); font-size: 15px; margin: 0 0 20px; }
.home .opportunities__image img { width: 100%; border-radius: var(--radius-lg); object-fit: cover; aspect-ratio: 4/3; }
.home .opportunities__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.home .opportunities__list li {
  display: flex; align-items: center; gap: 10px; background: var(--q-bg); border: 1px solid var(--q-border);
  border-radius: var(--radius-sm); padding: 12px 14px; color: var(--q-text); font-size: 14px; font-weight: 500;
}
.home .opportunities__list li i { color: var(--q-primary); }

/* ---------------- Servicios ---------------- */
.home .services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.home .service-card {
  background: #fff; border: 1px solid var(--q-border); border-radius: var(--radius-md);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.home .service-card i, .home .service-card .icon { color: var(--q-primary); font-size: 26px; margin-bottom: 10px; display: block; }
.home .service-card h3 { color: var(--q-text); font-size: 17px; margin: 0 0 6px; }
.home .service-card p { color: var(--q-text-secondary); font-size: 14px; margin: 0; }

/* ---------------- CTA / Contacto ---------------- */
.home .cta { background: linear-gradient(135deg, var(--q-primary-deep), var(--q-primary)); color: #fff; }
.home .cta__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; padding-block: 48px; }
.home .cta__text h2 { font-size: 32px; font-weight: 800; margin: 0 0 10px; color: #fff; }
.home .cta__text p { color: #cfe0e7; margin: 0; }
.home .cta__form { display: flex; flex-direction: column; gap: 12px; }
.home .cta__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.home .cta__form input, .home .cta__form textarea {
  width: 100%; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.94);
  border-radius: 8px; padding: 12px 14px; font-size: 15px; color: var(--q-text);
}
.home .cta__form textarea { min-height: 90px; resize: vertical; }
.home .cta__form .btn-primary { align-self: flex-end; min-height: 48px; padding: 0 26px; }
.home .contacto-mensaje { color: #d9f5e9; font-size: 14px; }

/* ---------------- Footer ---------------- */
.home .footer { background: var(--q-primary-deep); color: #cfe0e7; }
.home .footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 40px; padding-block: 44px;
}
.home .footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.home .brand__tag--footer { color: rgba(255,255,255,.85); border-left-color: rgba(255,255,255,.5); }
.home .footer-col h3 { color: #fff; font-size: 16px; margin: 0 0 14px; }
.home .footer-col ul { list-style: none; margin: 0; padding: 0; }
.home .footer-col li { margin-bottom: 8px; }
.home .footer-col a { color: #cfe0e7; text-decoration: none; font-size: 14px; }
.home .footer-col a:hover { color: #fff; }
.home .footer-col p { font-size: 14px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.home .footer-col p i { color: var(--q-orange); }
.home .footer-social { display: flex; gap: 10px; margin-top: 12px; }
.home .footer-social a {
  width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.home .footer-social a:hover { background: var(--q-orange); border-color: var(--q-orange); }
.home .footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15); padding: 18px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 13px;
}
.home .footer-legal { display: flex; gap: 20px; }
.home .footer-legal a { color: #cfe0e7; text-decoration: none; }

/* ---------------- Botones base (home) ---------------- */
.home .btn { min-height: 44px; padding: 0 20px; border-radius: 8px; border: 0; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px; font-weight: 600; cursor: pointer; text-decoration: none; }
.home .btn-primary { background: var(--q-orange); color: #fff; }
.home .btn-primary:hover { background: var(--q-orange-dark); }

/* ---------------- Responsive ---------------- */
@media (max-width: 768px) {
  .home .hamburger { display: block; margin-left: auto; }
  .home .btn-login { display: none; }
  .home .header__nav { margin-left: 0; }
  .home .nav-menu {
    position: fixed; top: 84px; right: -100%; width: 250px; height: calc(100vh - 84px);
    background: var(--q-primary-dark); flex-direction: column; align-items: flex-start; gap: 0;
    padding: 24px; box-shadow: -4px 0 12px rgba(0,0,0,.3); transition: right .3s ease; display: flex;
  }
  .home .nav-menu.active { right: 0; }
  .home .nav-menu li { width: 100%; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .home .nav-menu a { display: block; width: 100%; padding: 0; border-radius: 0; border-bottom: 0; color: #fff; font-size: 1rem; font-weight: 500; }
  .home .nav-menu a:hover, .home .nav-menu a.active { background: transparent; color: var(--q-orange); border-bottom-color: rgba(255,255,255,.1); }
  .home .nav-login-item { display: block; margin-top: 1rem; border-bottom: 0; }
  .home .nav-login { background: var(--q-orange) !important; color: #fff !important; text-align: center; font-weight: 600; border-bottom: 0 !important; padding: 12px 24px !important; border-radius: 8px; }
  .home .hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .home .hamburger.active span:nth-child(2) { opacity: 0; }
  .home .hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
}

@media (max-width: 1024px) {
  .home .hero__search-row { flex-direction: column; align-items: stretch; }
  .home .hero__audiences { flex-wrap: wrap; gap: 22px; }
  .home .hero-search-bar { flex: 0 0 auto; grid-template-columns: 1fr 1fr; max-width: 100%; }
  .home .hero-field { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--q-border); }
  .home .value-grid { grid-template-columns: repeat(2, 1fr); }
  .home .type-grid { grid-template-columns: repeat(2, 1fr); }
  .home .opportunities__grid { grid-template-columns: 1fr; }
  .home .services-grid { grid-template-columns: repeat(2, 1fr); }
  .home .cta__grid { grid-template-columns: 1fr; }
  .home .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .home .container { width: calc(100% - 32px); }
  .home .logo-img { height: 54px; }
  .home .hero { min-height: 0; }
  .home .hero__inner { padding-block: 40px; }
  .home .hero__title { font-size: 38px; }
  .home .hero__desc { font-size: 15px; }
  .home .hero-search-bar { grid-template-columns: 1fr; max-width: 100%; }
  .home .hero-select { border-right: 0; border-bottom: 1px solid var(--q-border); }
  .home .hero-field--zona { position: relative; }
  .home .hero-search-distrito { position: static; }
  .home .distrito-dropdown { left: 0; right: 0; width: auto; }
  .home .hero__tabs { display: flex; flex-wrap: nowrap; width: 100%; gap: 4px; }
  .home .hero-tab { flex: 1 1 0; min-width: 0; justify-content: center; font-size: 11.5px; padding: 8px 4px; gap: 4px; }
  .home .hero-tab i { font-size: 12px; }
  .home .value-grid { grid-template-columns: 1fr; }
  .home .value-item { border-right: 0; border-bottom: 1px solid var(--q-border); }
  .home .section { padding-block: 40px; }
  .home .section-title { font-size: 24px; }
  .home .type-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .home .type-card, .home .type-card img { min-height: 180px; }
  .home .services-grid { grid-template-columns: 1fr; }
  .home .cta__row { grid-template-columns: 1fr; }
  .home .cta__form .btn-primary { align-self: stretch; }
  .home .footer-grid { grid-template-columns: 1fr; }
  .home .footer-bottom { flex-direction: column; text-align: center; }
}
