/*
Theme Name: Kinsu
Description: Custom theme for kinsucentro.com
Version: 1.0
*/

/* ─── VARIABLES ─────────────────────────────────────── */
:root {
  --terracota: #935643;
  --dorado:    #b29456;
  --salvia:    #79867b;
  --pizarra:   #3c4d4b;
  --blanco:    #fefefd;
  --claro:     #f5f0ea;
  --texto:     #2a2a28;
  --medio:     #7a7268;
  --borde:     #ddd8d0;
}

/* ─── NAV LIST RESET ────────────────────────────────── */
nav ul,
nav ul li,
nav .dropdown-menu,
nav .dropdown-menu li {
  list-style: none !important;
  list-style-type: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

nav ul li::before,
nav ul li::marker {
  content: none !important;
  display: none !important;
}

/* ─── RESET ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 140px;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--blanco);
  color: var(--texto);
  font-size: 15px;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── TOP BAR ───────────────────────────────────────── */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--pizarra);
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  padding: 0 32px;
  transition: height 0.35s ease, opacity 0.35s ease;
  overflow: hidden;
}

body.scrolled .top-bar {
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.top-bar a {
  font-size: 11px;
  color: #b0bab9;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.top-bar a:hover { color: var(--blanco); }

/* ─── NAVIGATION ────────────────────────────────────── */
nav {
  position: fixed;
  top: 36px; left: 0; right: 0;
  z-index: 100;
  background: var(--blanco);
  border-bottom: 1px solid var(--borde);
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  transition: height 0.35s ease, top 0.35s ease, box-shadow 0.35s ease;
}

nav.scrolled {
  top: 0;
  height: 60px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

.nav-logo img {
  height: 80px;
  width: auto;
  transition: height 0.35s ease;
  display: block;
}

nav.scrolled .nav-logo img {
  height: 40px;
}

/* ─── NAV LINKS ─────────────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links > li {
  position: relative;
  list-style: none;
  display: block;
  padding: 0;
  margin: 0;
}

.nav-links > li::marker {
  display: none;
  content: '';
}

.nav-links > li > a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--texto);
  padding: 8px 16px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  display: block;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links > li > a:hover {
  color: var(--terracota);
  background: var(--claro);
}

/* ─── DROPDOWN ──────────────────────────────────────── */
.nav-links .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: auto;
  right: 0;
  transform: none;
  background: var(--blanco);
  border-top: 2px solid var(--terracota);
  border-radius: 0 0 10px 10px;
  min-width: 240px;
  padding: 6px 0 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
  list-style: none !important;
  z-index: 999;
  margin: 0;
}

.nav-links li.has-dropdown {
  position: relative;
}

.nav-links li.has-dropdown:hover .dropdown-menu {
  display: block;
}

.nav-links li.has-dropdown::after {
  content: '';
  display: block;
  position: absolute;
  height: 20px;
  width: 100%;
  bottom: -20px;
  left: 0;
}

.dropdown-menu li {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dropdown-menu li + li {
  border-top: 1px solid var(--borde);
}

.dropdown-menu li a {
  display: block;
  padding: 11px 24px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--medio);
  letter-spacing: 0.03em;
  transition: color 0.2s, background 0.2s, padding-left 0.2s;
  text-decoration: none;
}

.dropdown-menu li a:hover {
  color: var(--terracota);
  background: var(--claro);
  padding-left: 30px;
}

/* ─── NAV CTA ───────────────────────────────────────── */
.nav-cta {
  background: var(--terracota) !important;
  color: var(--blanco) !important;
  padding: 10px 22px !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: #7a4538 !important;
  color: var(--blanco) !important;
}

/* ─── PAGE OFFSET ───────────────────────────────────── */
.page-wrap {
  padding-top: 132px;
}

/* ─── HERO ──────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 132px);
  align-items: center;
}

.hero-text {
  padding: 80px 64px 80px 40px;
}

.hero-tag {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--salvia);
  margin-bottom: 16px;
}

.hero-title {
  font-size: 44px;
  font-weight: 300;
  line-height: 1.2;
  color: var(--texto);
  margin-bottom: 20px;
}

.hero-title strong {
  color: var(--terracota);
  font-weight: 500;
}

.hero-sub {
  font-size: 15px;
  color: var(--medio);
  margin-bottom: 40px;
  max-width: 420px;
  line-height: 1.8;
}

.hero-address {
  font-size: 12px;
  color: var(--salvia);
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-image {
  height: calc(100vh - 132px);
  overflow: hidden;
  background: #f5f0ea;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── BUTTONS ───────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--terracota);
  color: var(--blanco);
}

.btn-primary:hover { background: #7a4538; color: var(--blanco); }

.btn-secondary {
  background: transparent;
  color: var(--terracota);
  border: 1.5px solid var(--terracota);
}

.btn-secondary:hover {
  background: var(--terracota);
  color: var(--blanco);
}

.btn-white {
  background: var(--blanco);
  color: var(--terracota);
  font-weight: 600;
}

.btn-white:hover { background: var(--claro); }

/* ─── SECTIONS ──────────────────────────────────────── */
.section {
  padding: 96px 40px;
}

.section-light { background: var(--blanco); }
.section-tinted { background: var(--claro); }
.section-dark {
  background: var(--pizarra);
  color: var(--blanco);
}

.section-label {
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--salvia);
  margin-bottom: 12px;
  display: block;
}

.section-dark .section-label { color: #79a09a; }

.section-title {
  font-size: 34px;
  font-weight: 300;
  line-height: 1.25;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 14px;
  color: var(--medio);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 48px;
}

.section-dark .section-sub { color: #9ab0ae; }

/* ─── SERVICES GRID (homepage) ──────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.service-card {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: 8px;
  padding: 32px 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.service-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.service-card .icon {
  font-size: 28px;
  margin-bottom: 16px;
}

.service-card h3 {
  font-size: 16px;
  font-weight: 500;
  color: var(--terracota);
  margin-bottom: 10px;
}

.service-card p {
  font-size: 13px;
  color: var(--medio);
  line-height: 1.7;
  margin-bottom: 20px;
}

.service-card a {
  font-size: 12px;
  color: var(--terracota);
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--terracota);
  padding-bottom: 2px;
}

/* ─── WHY US ─────────────────────────────────────────── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 960px;
  margin: 0 auto;
}

.why-item { text-align: center; }

.why-number {
  font-size: 48px;
  font-weight: 300;
  color: var(--dorado);
  line-height: 1;
  margin-bottom: 8px;
}

.why-item h3 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
}

.why-item p {
  font-size: 13px;
  color: #9ab0ae;
  line-height: 1.7;
}

/* ─── CTA BAND ──────────────────────────────────────── */
.cta-band {
  background: var(--terracota);
  padding: 64px 40px;
  text-align: center;
  color: var(--blanco);
}

.cta-band h2 {
  font-size: 30px;
  font-weight: 300;
  margin-bottom: 8px;
}

.cta-band p {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 32px;
}

/* ─── SERVICE DETAIL PAGE ───────────────────────────── */
.service-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
}

.service-hero-text {
  padding: 80px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-hero-image { overflow: hidden; }

.service-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.benefits-list {
  list-style: none;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.benefits-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--medio);
}

.benefits-list li::before {
  content: '✓';
  color: var(--terracota);
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ─── TEAM ───────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 960px;
  margin: 0 auto;
}

.team-card { text-align: center; }

.team-card img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 3px solid var(--borde);
}

.team-card h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}

.team-card .role {
  font-size: 12px;
  color: var(--terracota);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.team-card p {
  font-size: 13px;
  color: var(--medio);
  line-height: 1.7;
}

/* ─── FAQ ───────────────────────────────────────────── */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--borde);
  padding: 20px 0;
  cursor: pointer;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--texto);
}

.faq-question::after {
  content: '+';
  font-size: 20px;
  color: var(--terracota);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  font-size: 13px;
  color: var(--medio);
  line-height: 1.8;
  padding: 0;
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding-top: 12px;
}

/* ─── CONTACT ────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

.contact-block {
  margin-bottom: 32px;
}

.contact-block-label {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--salvia);
  margin-bottom: 8px;
  display: block;
}

.contact-block-value {
  font-size: 15px;
  color: var(--texto);
  line-height: 1.8;
}

.contact-block-value a {
  color: var(--terracota);
}

.contact-buttons {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── MAP ────────────────────────────────────────────── */
.map-mobile { display: none; }
.map-desktop { display: block; }

/* ─── SERVICIOS ROWS ─────────────────────────────────── */
.servicio-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.servicio-img {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  min-height: 300px;
  background: var(--claro);
  display: flex;
  align-items: center;
  justify-content: center;
}

.servicio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── NOSOTROS ───────────────────────────────────────── */
.nosotros-intro { max-width: 800px; margin: 0 auto; }

.nosotros-valores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.nosotros-valor-card {
  text-align: left;
  padding: 32px;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--borde);
}

/* ─── FOOTER ────────────────────────────────────────── */
footer {
  background: var(--pizarra);
  color: #9ab0ae;
  padding: 48px 40px 24px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-logo img {
  height: 56px;
  width: auto;
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.7;
  color: #7a9996;
  max-width: 260px;
}

.footer-col h4 {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--blanco);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 13px;
  color: #7a9996;
  transition: color 0.2s;
  text-decoration: none;
}

.footer-col ul li a:hover { color: var(--blanco); }

.footer-bottom {
  border-top: 1px solid #2e4543;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 11px;
  color: #4a6a68;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  font-size: 11px;
  color: #4a6a68;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
  text-decoration: none;
}

.footer-social a:hover { color: var(--blanco); }

/* ─── MOBILE MENU TOGGLE ─────────────────────────────── */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--texto);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── MOBILE ─────────────────────────────────────────── */
@media (max-width: 768px) {

  /* NAV */
  nav {
    padding: 0 20px;
    height: 64px;
    top: 0;
  }

  .top-bar { display: none; }
  .page-wrap { padding-top: 64px; }
  .nav-logo img { height: 48px; }
  .menu-toggle { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--blanco);
    border-top: 1px solid var(--borde);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 0;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    z-index: 99;
  }

  .nav-links.open { display: flex; }

  .nav-links > li > a {
    padding: 14px 24px;
    border-radius: 0;
    font-size: 15px;
  }

  .nav-links .dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border-top: none;
    border-left: 3px solid var(--terracota);
    border-radius: 0;
    padding: 4px 0;
    margin-left: 24px;
    min-width: auto;
    right: auto;
  }

  .nav-links li.has-dropdown:hover .dropdown-menu { display: none; }
  .nav-links li.has-dropdown.open .dropdown-menu { display: block; }

  .nav-cta {
    margin: 12px 24px;
    text-align: center;
    display: block;
  }

  /* HERO */
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-text { padding: 40px 20px; }
  .hero-title { font-size: 30px; }
  .hero-image { height: 260px; }

  /* SECTIONS */
  .section { padding: 56px 20px; }
  .cta-band { padding: 48px 20px; }

  /* SERVICES GRID */
  .services-grid { grid-template-columns: 1fr; }

  /* WHY GRID */
  .why-grid { grid-template-columns: 1fr; gap: 32px; }

  /* SERVICE DETAIL */
  .service-hero { grid-template-columns: 1fr; }
  .service-hero-text { padding: 48px 20px; }

  /* SERVICIOS ROWS */
  .servicio-row { grid-template-columns: 1fr; gap: 32px; }
  .servicio-img { min-height: 220px; }
  .servicio-row .btn { margin-bottom: 32px; }

  /* TEAM */
  .team-grid { grid-template-columns: 1fr; gap: 32px; }

  /* NOSOTROS */
  .nosotros-valores { grid-template-columns: 1fr; }

  /* CONTACT */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-buttons .btn {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    margin-left: 0;
  }

  /* MAP — hide iframe on mobile, show link instead */
  .map-desktop { display: none; }
  .map-mobile { display: block; }

  /* FOOTER */
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  footer { padding: 40px 20px 24px; overflow: hidden; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  /* GLOBAL OVERFLOW FIX */
  body { overflow-x: hidden; }
  * { max-width: 100%; }
  img { max-width: 100%; height: auto; }
}