/* ============================================
   Dr. Claudio Araya M. — Website Styles
   Psiquiatra con hiperfoco en TDAH
   ============================================ */

/* --- CSS Variables (from logo palette) --- */
:root {
  /* Primary colors - from logo */
  --orange: #E85800;
  --orange-light: #F08820;
  --orange-warm: #E89010;
  --blue-deep: #1068A8;
  --blue-medium: #1878B8;
  --blue-light: #2090D0;
  --teal: #20A088;
  --green-accent: #48B870;

  /* Neutrals */
  --white: #FFFFFF;
  --off-white: #F8F7F4;
  --gray-100: #F0EFEC;
  --gray-200: #E0DFDC;
  --gray-300: #C0BFBC;
  --gray-500: #808080;
  --gray-700: #404040;
  --gray-900: #1A1A1A;

  /* Semantic */
  --primary: var(--blue-deep);
  --accent: var(--orange);
  --accent-hover: #D04E00;
  --bg-primary: var(--white);
  --bg-secondary: var(--off-white);
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-700);
  --text-muted: var(--gray-500);

  /* Typography */
  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --section-padding: 5rem 0;
  --container-max: 1140px;
  --container-padding: 0 1.5rem;

  /* Transitions */
  --transition: all 0.3s ease;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.2;
}

h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2.25rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.125rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* --- Layout --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-padding);
}

.section {
  padding: var(--section-padding);
}

.section--alt {
  background: var(--bg-secondary);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
  transition: var(--transition);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo img {
  height: 53px;
  width: auto;
  flex-shrink: 0;
}

.nav__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.nav__logo-text strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--gray-900);
  letter-spacing: 0.1px;
}

.nav__logo-text small {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 2px;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 1.35rem;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.25rem 0;
  white-space: nowrap;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--primary);
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.nav__cta {
  background: var(--accent) !important;
  color: var(--white) !important;
  padding: 0.55rem 1.1rem !important;
  border-radius: 8px;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
}

.nav__cta:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-1px);
}

.nav__cta::after {
  display: none !important;
}

/* Hamburger menu */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  transition: var(--transition);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn--secondary:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn--outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn--outline-white:hover {
  background: var(--white);
  color: var(--primary);
}

/* --- Hero Section --- */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  background: linear-gradient(135deg, #F8F7F4 0%, #EDF4F8 50%, #F0F8F4 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 150%;
  background: radial-gradient(circle, rgba(16,104,168,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16,104,168,0.1);
  color: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero__title {
  font-size: 3.2rem;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.hero__title span {
  color: var(--accent);
}

.hero__subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
  max-width: 500px;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.hero__trust {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero__trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__logo-display {
  width: 340px;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  padding: 0;
  overflow: hidden;
}

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

/* Photo gallery with lightbox */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.photo-gallery__item {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.photo-gallery__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.photo-gallery__item:hover .photo-gallery__zoom {
  opacity: 1;
}

.photo-gallery__zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.5);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.photo-gallery__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.photo-gallery__caption {
  padding: 0.75rem 1rem;
  background: var(--white);
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--gray-100);
}

.photo-gallery__caption strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
}

.lightbox__content {
  max-width: 90vw;
  max-height: 85vh;
  position: relative;
}

.lightbox__content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox__caption {
  text-align: center;
  color: rgba(255,255,255,0.85);
  margin-top: 1rem;
  font-size: 0.95rem;
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 10000;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .photo-gallery { grid-template-columns: 1fr; }
  .photo-gallery__img { height: 200px; }
}

/* --- Features / Cards --- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.card__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.card__icon--blue { background: rgba(16,104,168,0.1); color: var(--primary); }
.card__icon--orange { background: rgba(232,88,0,0.1); color: var(--accent); }
.card__icon--teal { background: rgba(32,160,136,0.1); color: var(--teal); }
.card__icon--green { background: rgba(72,184,112,0.1); color: var(--green-accent); }

.card h3 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Section Headers --- */
.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-medium) 50%, var(--teal) 100%);
  color: var(--white);
  text-align: center;
  padding: 4rem 1.5rem;
  border-radius: 20px;
  margin: 2rem 0;
}

.cta-banner h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.cta-banner p {
  color: rgba(255,255,255,0.85);
  max-width: 500px;
  margin: 0 auto 2rem;
}

/* --- Footer --- */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 3rem 0 1.5rem;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer__brand p {
  color: var(--gray-300);
  font-size: 0.9rem;
  margin-top: 1rem;
  max-width: 340px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.footer__logo img {
  height: 77px;
  width: auto;
  background: transparent;
  padding: 0;
  flex-shrink: 0;
}

.footer__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.footer__logo-text strong {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--white);
}

.footer__logo-text small {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--orange-light);
  text-transform: uppercase;
  letter-spacing: 1.3px;
  margin-top: 4px;
}

.footer h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer ul a {
  color: var(--gray-300);
  font-size: 0.9rem;
}

.footer ul a:hover {
  color: var(--white);
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer__social {
  display: flex;
  gap: 1rem;
}

.footer__social a {
  color: var(--gray-300);
  font-size: 1.2rem;
}

.footer__social a:hover {
  color: var(--accent);
}

/* --- Responsive --- */
@media (max-width: 1080px) {
  .nav__logo-text { display: none; }
}

@media (max-width: 968px) {
  h1, .hero__title { font-size: 2.4rem; }
  h2 { font-size: 1.8rem; }

  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__subtitle { margin: 0 auto 2rem; }
  .hero__actions { justify-content: center; }
  .hero__trust { justify-content: center; }

  .hero__visual { order: -1; }
  .hero__logo-display { width: 220px; height: 220px; }

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

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

@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: var(--shadow-md);
  }

  .nav__links.active {
    display: flex;
  }

  .nav__hamburger { display: flex; }

  .hero { min-height: auto; padding: 6rem 0 3rem; }

  .footer__inner { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 1rem; text-align: center; }
}
