/* ========================================
   THAYLINE CARIUS — PSICÓLOGA CLÍNICA
   Style Guide & CSS
   ======================================== */

/* --- CSS Variables (Design Tokens) --- */
@font-face {
  font-family: "Lora";
  src: url("Lora-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --color-bg: #eeeae1;
  --color-bg-muted: #e5e0d5;
  --color-card: #f5f2ec;
  --color-primary: #654e3c;
  --color-primary-fg: #f5f2ec;
  --color-secondary: #a5917b;
  --color-warm-light: #a5917b;
  --color-warm-dark: #4a3828;
  --color-foreground: #1f1710;
  --color-muted-fg: #7a6b5a;
  --color-border: #d5cfc4;
  --font-heading: "Cormorant Garamond", serif;
  --font-body: "DM Sans", sans-serif;
  --radius: 1rem;
  --transition: 0.3s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* --- Utility --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container--sm {
  max-width: 800px;
}
.text-center {
  text-align: center;
}
.mt-16 {
  margin-top: 4rem;
}

.label {
  color: var(--color-warm-light);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 500;
  border-radius: 9999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}
.btn--xl {
  padding: 1rem 2.5rem;
  font-size: 1rem;
}

.btn--cta {
  background: var(--color-primary);
  color: var(--color-primary-fg) !important;
  border-color: var(--color-primary);
}
.btn--cta:hover {
  background: var(--color-warm-dark);
  border-color: var(--color-warm-dark);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary-fg);
  border-color: rgba(255, 255, 255, 0.3);
}
.btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn--cta-inverted {
  background: var(--color-primary-fg);
  color: var(--color-primary);
  border-color: var(--color-primary-fg);
}
.btn--cta-inverted:hover {
  background: rgba(245, 242, 236, 0.9);
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(238, 234, 225, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(213, 207, 196, 0.5);
}

.header__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
}

.header__logo img {
  height: 48px;
  width: auto;
}

.header__nav {
  display: none;
  align-items: center;
  gap: 2rem;
}
.header__nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(31, 23, 16, 0.7);
  transition: color var(--transition);
}
.header__nav a:hover {
  color: var(--color-primary);
}

.header__hamburger {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}
.header__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-foreground);
  transition: all var(--transition);
}
.header__hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}
.header__hamburger.active span:nth-child(2) {
  opacity: 0;
}
.header__hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

.header__mobile-nav {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--color-bg);
  border-top: 1px solid rgba(213, 207, 196, 0.5);
}
.header__mobile-nav.active {
  display: flex;
}
.header__mobile-nav a {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(31, 23, 16, 0.7);
  transition: color var(--transition);
}
.header__mobile-nav a:hover {
  color: var(--color-primary);
}

@media (min-width: 768px) {
  .header__nav {
    display: flex;
  }
  .header__hamburger {
    display: none;
  }
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__overlay {
  position: absolute;
  inset: 0;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 8rem 1.5rem 4rem;
  width: 100%;
}
.hero__text {
  max-width: 640px;
}
.hero__layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}
.hero__photo {
  display: none;
}
.hero__bg .mob {
  display: none;
}
@media (max-width: 768px) {
  .hero__text .label {
    color: #f5f2ec !important;
  }
  .hero__bg {
    position: relative;
  }
  .hero__bg .mob {
    display: block;
  }
  .hero__bg .desk {
    display: none;
  }
  .hero__bg:before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      360deg,
      rgb(74 56 40) 0%,
      rgba(74, 56, 40, 0.55) 35%,
      rgba(74, 56, 40, 0.15) 65%,
      rgba(74, 56, 40, 0) 100%
    );
  }
  .hero {
    display: flex;
    align-items: center;
    overflow: hidden;
    flex-direction: column;
  }
  .hero__content {
    padding: 0 1.5rem 4rem;
    width: 100%;
    top: 0;
    background: rgb(74 56 40);
  }
}
@media (min-width: 1024px) {
  .hero__layout {
    flex-direction: row;
    align-items: center;
    gap: 4rem;
  }
  .hero__text {
    flex: 1;
  }
  .hero__photo {
    display: block;
    flex-shrink: 0;
  }
  .hero__photo img {
    width: 400px;
    height: auto;
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    object-fit: cover;
  }
}

.hero__text .label {
  color: var(--color-warm-light);
  margin-bottom: 1.5rem;
}

.hero__text h1 {
  font-family: Lora;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  font-weight: 300;
  color: var(--color-primary-fg);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.hero__text h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--color-warm-light);
}

.hero__subtitle {
  color: rgba(245, 242, 236, 0.8);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --- Sections --- */
.section {
  padding: 6rem 0;
}
.section--muted {
  background: var(--color-bg-muted);
}
.section--primary {
  background: var(--color-primary);
  color: var(--color-primary-fg);
}

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
}
.section__header h2 {
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--color-foreground);
  margin-bottom: 1rem;
}
.section__header--light h2 {
  color: var(--color-primary-fg);
}
.section__header--light .section__subtitle {
  color: rgba(245, 242, 236, 0.7);
}
.section__subtitle {
  color: var(--color-muted-fg);
}

.section--primary .section__header h2 {
  color: var(--color-primary-fg);
}
.section--primary .section__subtitle {
  color: rgba(245, 242, 236, 0.7);
}
.section--primary h2 {
  color: var(--color-primary-fg);
}

/* --- About --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
}
@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.about__image {
  position: relative;
}
.about__image-wrapper {
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}
.about__image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__circle {
  position: absolute;
  border-radius: 50%;
  z-index: -1;
}
.about__circle--1 {
  width: 8rem;
  height: 8rem;
  background: rgba(165, 145, 123, 0.2);
  bottom: -1.5rem;
  right: -1.5rem;
}
.about__circle--2 {
  width: 6rem;
  height: 6rem;
  background: rgba(101, 78, 60, 0.1);
  top: -1.5rem;
  left: -1.5rem;
}

.about__text h2 {
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 300;
  margin-bottom: 1.5rem;
}
.about__text p {
  color: var(--color-muted-fg);
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* --- Problems Grid --- */
.problems-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .problems-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .problems-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.5s ease;
}
.card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.card__icon {
  font-size: 1.875rem;
  display: block;
  margin-bottom: 1rem;
}
.card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.card p {
  color: var(--color-muted-fg);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* --- Steps Grid --- */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 640px) {
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step__num {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 300;
  color: rgb(255 255 255 / 74%);
  display: block;
  margin-bottom: 1rem;
}
.step h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.step p {
  color: rgba(245, 242, 236, 0.7);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* --- Testimonials --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonial {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(213, 207, 196, 0.5);
}

.testimonial__quote {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--color-warm-light);
  line-height: 1;
  margin-bottom: 1rem;
}
.testimonial__text {
  color: var(--color-muted-fg);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.testimonial__author strong {
  display: block;
  color: var(--color-foreground);
}
.testimonial__author span {
  font-size: 0.875rem;
  color: var(--color-muted-fg);
}

/* --- Credentials --- */
.credentials {
  max-width: 800px;
  margin: 0 auto;
}
.credential {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--color-card);
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(213, 207, 196, 0.3);
}
.credential__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-warm-light);
  flex-shrink: 0;
}

/* --- Benefits --- */
.benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
}
@media (min-width: 640px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.benefit {
  text-align: center;
}
.benefit__numeral {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--color-warm-light);
  letter-spacing: 0.1em;
  display: block;
}
.benefit__divider {
  display: block;
  width: 2.5rem;
  height: 1px;
  background: var(--color-warm-light);
  opacity: 0.4;
  margin: 0.75rem auto 1.25rem;
}
.benefit h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.benefit p {
  color: var(--color-muted-fg);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* --- FAQ --- */
.faq-item {
  border-bottom: 1px solid rgba(213, 207, 196, 0.5);
}

.faq-item__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-foreground);
  text-align: left;
  transition: color var(--transition);
}
.faq-item__question:hover {
  color: var(--color-primary);
}

.faq-item__icon {
  font-size: 1.25rem;
  color: var(--color-warm-light);
  flex-shrink: 0;
  transition: transform var(--transition);
}
.faq-item.active .faq-item__icon {
  transform: rotate(45deg);
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease;
}
.faq-item.active .faq-item__answer {
  max-height: 200px;
  padding-bottom: 1.25rem;
}
.faq-item__answer p {
  color: var(--color-muted-fg);
  line-height: 1.7;
}

/* --- Footer --- */
.footer {
  background: var(--color-foreground);
  color: rgba(245, 242, 236, 0.7);
  padding: 3rem 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer__logo img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}
.footer__nav a {
  font-size: 0.875rem;
  transition: color var(--transition);
}
.footer__nav a:hover {
  color: var(--color-primary-fg);
}

.footer__social {
  font-size: 0.875rem;
  flex-direction: column;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 15px;
}
.footer__social a {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
}
.footer__bottom {
  border-top: 1px solid rgba(245, 242, 236, 0.1);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.75rem;
}

/* --- Scroll Animations --- */
.scroll-reveal {
  opacity: 0;
  transform: translateY(2rem);
  transition:
    opacity 1s ease,
    transform 1s ease;
}
.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Keyframe Animations --- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out both;
}
.animate-fade-up {
  animation: fadeUp 0.8s ease-out both;
}
.delay-1 {
  animation-delay: 0.2s;
}
.delay-2 {
  animation-delay: 0.4s;
}

/* --- Office Grid --- */
.office-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.office-grid__item {
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: var(--radius);
}
.office-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.office-grid__item:hover img {
  transform: scale(1.05);
}
@media (min-width: 768px) {
  .office-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- Location --- */
.location-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.location-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.location-info__item h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-foreground);
  margin-bottom: 0.25rem;
}
.location-info__item p {
  color: var(--color-muted-fg);
  font-size: 0.95rem;
}
.location-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  min-height: 400px;
}
.location-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: 0;
}
@media (min-width: 1024px) {
  .location-grid {
    grid-template-columns: 1fr 2fr;
    align-items: stretch;
  }
}

/* --- Office Grid button reset --- */
.office-grid__item {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: block;
}
.office-grid__item:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lightbox.active {
  display: flex;
}
.lightbox__img {
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: color 0.2s;
  padding: 0.5rem;
  line-height: 1;
}
.lightbox__close:hover,
.lightbox__nav:hover {
  color: #fff;
}
.lightbox__close {
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.5rem;
}
.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 4rem;
  font-family: var(--font-heading);
}
.lightbox__nav--prev {
  left: 1.5rem;
}
.lightbox__nav--next {
  right: 1.5rem;
}
.lightbox__counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}
