@import url('https://fonts.googleapis.com/css2?family=Indie+Flower&display=swap');

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #FFFBF7;
    color: #2E241F;
    line-height: 1.5;
    scroll-behavior: smooth;
    padding-top: 56px;
}

h1, h2, h3, h4 {
    font-family: "Indie Flower", cursive;
    font-style: italic;
    color: #D48C6C;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: #D48C6C;
    color: #FFF6F0;
    text-align: center;
    padding: 10px 15px;
    font-size: 0.85rem;
    font-weight: 500;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    backdrop-filter: blur(2px);
    background: rgba(212, 140, 108, 0.95);
}
.top-bar a {
    color: #FFF6F0;
    text-decoration: none;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.top-bar i {
    font-size: 0.8rem;
}

/* ===== HEADER / NAV ===== */
header {
    position: sticky;
    top: 56px;
    background: rgba(255, 251, 247, 0.96);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    z-index: 1000;
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    flex-wrap: wrap;
}
.logo a {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 600;
    text-decoration: none;
    color: #A55B3A;
}
.logo span {
    color: #D48C6C;
}
.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
    align-items: center;
}
.nav-links a {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    color: #4F3A2E;
    transition: color 0.2s;
}
.nav-links a:hover {
    color: #D48C6C;
}
.btn-cita {
    background: #D48C6C;
    color: white !important;
    padding: 8px 22px;
    border-radius: 40px;
    transition: background 0.2s;
}
.btn-cita:hover {
    background: #B86B4A;
}
.mobile-menu {
    display: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #A55B3A;
}

/* ===== HERO – BANNER ===== */
.hero-banner-responsive {
    position: relative;
    width: 100%;
}
.banner-img {
    width: 100%;
    height: auto;
    display: block;
}
.banner-overlay-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 20px;
    box-sizing: border-box;
}
.hero-quote {
    font-family: "Indie Flower", cursive;
    font-style: italic;
    color: #FFFFFF;
    text-align: right;
    font-size: clamp(1.2rem, 4vw, 2.8rem);
    margin: 0;
    line-height: 1.2;
    max-width: 80%;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.6);
}
.hero-author {
    font-size: clamp(0.8rem, 2vw, 1.2rem);
    font-weight: 300;
    display: block;
    margin-top: 4px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .banner-overlay-text {
        justify-content: center;
        padding: 15px;
    }
    .hero-quote {
        max-width: 90%;
        font-size: clamp(1rem, 3.5vw, 1.8rem);
        text-align: center;
    }
    .hero-author {
        font-size: clamp(0.7rem, 2.5vw, 1rem);
    }
}

@media (max-width: 480px) {
    .hero-quote {
        max-width: 95%;
        font-size: clamp(0.9rem, 4vw, 1.3rem);
    }
    .hero-author {
        font-size: clamp(0.6rem, 2.8vw, 0.9rem);
    }
}

/* ===== SECCIÓN "¿POR QUÉ ACUDIR A TERAPIA?" ===== */
.card-porque {
    display: flex;
    align-items: center;
    gap: 50px;
    background: #fff;
    border-radius: 28px;
    padding: 40px 45px;
    border: 1px solid #F3E5DB;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
    transition: all 0.3s;
    max-width: 1100px;
    margin: 0 auto;
}
.card-porque:hover {
    border-color: #E9CFBC;
}

.card-porque-image {
    flex: 0 0 35%;
    max-width: 35%;
}

.kidney-shape {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 50% 20% 50% 20% / 20% 50% 20% 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    object-fit: cover;
}

.card-porque-text {
    flex: 1;
    text-align: center;
}

.card-porque-text h2 {
    font-size: 2rem;
    font-family: "Indie Flower", cursive;
    font-style: italic;
    color: #D48C6C;
    margin-bottom: 6px;
}

.card-porque-text .subtitulo {
    font-size: 1.1rem;
    font-weight: 500;
    color: #A55B3A;
    margin-bottom: 20px;
}

.card-porque-text p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #4F3A2E;
    max-width: 90%;
    margin: 0 auto 18px;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* ===== BOTONES ===== */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.btn-primary {
    background: #D48C6C;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.btn-primary:hover {
    background: #B86B4A;
    transform: translateY(-2px);
}
.btn-secondary {
    background: transparent;
    border: 1.5px solid #D48C6C;
    color: #A55B3A;
}
.btn-secondary:hover {
    background: #F3E5DB;
}

/* ===== SECCIONES ===== */
.section {
    padding: 60px 0;
    border-bottom: 1px solid #F3E5DB;
}
.section-light {
    background-color: #FDF8F3;
}
.section-title {
    font-family: "Indie Flower", cursive;
    font-style: italic;
    color: #D48C6C;
    font-size: 2rem;
    margin-bottom: 12px;
    text-align: center;
}
.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #5F4A3A;
    margin-bottom: 40px;
}

/* ===== TARJETAS GENÉRICAS ===== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 30px;
}

/* ===== TARJETAS VOLTEABLES 3D ===== */
.flip-card {
    background-color: transparent;
    perspective: 1000px;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    border-radius: 28px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.flip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}
.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    border-radius: 28px;
}
.flip-card.flipped .flip-inner {
    transform: rotateY(180deg);
}
.flip-front, .flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 28px;
    overflow: hidden;
}
.flip-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.flip-back {
    background: #D48C6C;
    color: #fff;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    text-align: center;
}
.flip-back h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.flip-back p {
    font-size: 1rem;
    line-height: 1.6;
    color: #fff;
    max-width: 90%;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 30px;
}
.tarjeta {
    background: #fff;
    border-radius: 28px;
    padding: 32px 28px;
    border: 1px solid #F3E5DB;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
    transition: all 0.3s;
}
.tarjeta-en-que-puedo-ayudarte {
    overflow: hidden;
    padding: 0;
    background: #fff;
    border-radius: 28px;
    border: 1px solid #F3E5DB;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}
.tarjeta:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    border-color: #E9CFBC;
}
.tarjeta-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.tarjeta-body {
    padding: 28px 24px 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.tarjeta-body h3 {
    font-family: "Indie Flower", cursive;
    font-style: italic;
    color: #D48C6C;
    font-size: 1.6rem;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 12px;
}
.tarjeta-body h3 i {
    color: #D48C6C;
    margin-right: 8px;
}
.tarjeta-body p {
    color: #4F3A2E;
    line-height: 1.6;
    font-size: 0.98rem;
    margin-bottom: 16px;
}
.tarjeta-body .btn-primary {
    align-self: flex-start;
    margin-top: auto;
    padding: 10px 28px;
    font-size: 0.9rem;
}
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.text-content2 {
    max-width: 800px;
    margin: 0 auto 20px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #4F3A2E;
    text-align: center;
}
.text-content2 p {
    margin-bottom: 18px;
}

/* ===== UTILIDADES ===== */
.text-center {
    text-align: center;
}
.mt-4 {
    margin-top: 30px;
}

/* ===== TESTIMONIOS ===== */
.testimonios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 30px;
}
.testimonio {
    background: #fff;
    border-radius: 28px;
    padding: 28px 24px;
    border: 1px solid #F3E5DB;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
    position: relative;
}
.testimonio::before {
    content: '\201C';
    font-size: 3rem;
    color: #D48C6C;
    font-family: 'Playfair Display', serif;
    line-height: 1;
    display: block;
    margin-bottom: -10px;
}
.testimonio p {
    font-style: italic;
    color: #4F3A2E;
    margin-bottom: 15px;
}
.testimonio .autor {
    font-style: normal;
    font-weight: 600;
    color: #A55B3A;
    display: block;
}
.testimonio .ciudad {
    font-style: normal;
    font-weight: 400;
    color: #8F7A6A;
    font-size: 0.9rem;
    display: block;
}

/* ===== TARIFAS ===== */
.tarifas-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
    margin-top: 30px;
}
.tarjeta-precio {
    background: #fff;
    border-radius: 28px;
    padding: 32px 28px;
    flex: 1 1 220px;
    max-width: 280px;
    text-align: center;
    border: 1px solid #F1E2D6;
}
.tarjeta-precio h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}
.precio {
    font-size: 2rem;
    font-weight: 700;
    color: #A55B3A;
    margin: 12px 0;
}
.btn-tarifa {
    background: #D48C6C;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 15px;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
}
.btn-tarifa:hover {
    background: #B86B4A;
}

/* ===== CONTACTO ===== */
.contact-flex {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}
.contact-info {
    flex: 1;
}
.contact-info i {
    width: 28px;
    color: #D48C6C;
    margin-right: 10px;
}
.contact-form {
    flex: 1.2;
    background: #fff;
    padding: 36px;
    border-radius: 32px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}
input, textarea {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 20px;
    border: 1px solid #E9CFBC;
    border-radius: 60px;
    background: #FFFEFC;
    font-family: inherit;
}
textarea {
    border-radius: 28px;
    resize: vertical;
}

/* ===== FOOTER ===== */
.footer {
    background: #2E241F;
    color: #E9CFBC;
    padding: 50px 0 25px;
}
.footer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}
.footer a {
    color: #E9CFBC;
}
.copyright {
    text-align: center;
    border-top: 1px solid #4F3A2E;
    padding-top: 25px;
    margin-top: 35px;
    font-size: 0.8rem;
}

/* ===== CONTENEDOR LEGAL ===== */
.legal-box {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 28px;
    border: 1px solid #F3E5DB;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.legal-box h2 {
    color: #A55B3A;
    margin-top: 20px;
    transition: color 0.3s;
}
.legal-box h2:first-of-type {
    margin-top: 0;
}
.legal-box p,
.legal-box li {
    color: #4F3A2E;
    transition: color 0.3s;
}
.legal-box a {
    color: #A55B3A;
    text-decoration: underline;
}
.legal-box table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    color: #4F3A2E;
}
.legal-box th {
    background: #F3E5DB;
    padding: 10px;
    border: 1px solid #E9CFBC;
    text-align: left;
    font-weight: 600;
}
.legal-box td {
    padding: 10px;
    border: 1px solid #E9CFBC;
}

/* ===== BANNER DE COOKIES ===== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(44, 36, 31, 0.97);
    backdrop-filter: blur(8px);
    color: #F2E2D6;
    padding: 16px 24px;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    border-top: 2px solid #D48C6C;
    display: none;
}
.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.cookie-content p {
    flex: 1;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    min-width: 200px;
}
.cookie-content a {
    color: #D48C6C;
    text-decoration: underline;
    font-weight: 500;
}
.cookie-content a:hover {
    color: #E9CFBC;
}
.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.cookie-buttons button {
    padding: 8px 24px;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.btn-cookie-accept {
    background: #D48C6C;
    color: #1A1412;
}
.btn-cookie-accept:hover {
    background: #B86B4A;
    transform: scale(1.02);
}
.btn-cookie-reject {
    background: transparent;
    color: #E9CFBC;
    border: 1.5px solid #E9CFBC;
}
.btn-cookie-reject:hover {
    background: #4F3A2E;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .card-porque-text h2 { font-size: 1.8rem; }
    .section-title { font-size: 1.8rem; }
}

@media (max-width: 768px) {
    .top-bar { font-size: 0.75rem; gap: 15px; padding: 6px 10px; }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #fff;
        padding: 20px;
        border-radius: 28px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.08);
        position: absolute;
        top: 70px;
        left: 0;
        gap: 15px;
        align-items: flex-start;
    }
    .nav-links.active { display: flex; }
    .mobile-menu { display: block; }
    .card-porque {
        flex-direction: column;
        padding: 30px 25px;
        gap: 30px;
    }
    .card-porque-image {
        flex: 0 0 auto;
        max-width: 60%;
        width: 60%;
        margin: 0 auto;
    }
    .card-porque-text h2 { font-size: 1.6rem; }
    .card-porque-text p { max-width: 100%; }
    .section { padding: 45px 0; }
    .contact-flex { flex-direction: column; }
    .tarjeta-img-top { height: 170px; }
    .tarjeta-body { padding: 22px 18px 26px; }
    .grid-4 { gap: 20px; }
}

@media (max-width: 480px) {
    .card-porque-text h2 { font-size: 1.4rem; }
    .section-title { font-size: 1.5rem; }
    .btn-primary, .btn-secondary { padding: 10px 20px; font-size: 0.8rem; }
    .card-porque { padding: 20px 18px; }
    .card-porque-image { max-width: 75%; width: 75%; }
    .tarjeta-img-top { height: 140px; }
    .tarjeta-body h3 { font-size: 1.3rem; }
}

/* ===== MODO OSCURO AUTOMÁTICO ===== */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1A1412;
        color: #E6D5C8;
    }

    .top-bar {
        background: rgba(44, 36, 31, 0.95);
        color: #E6D5C8;
    }
    .top-bar a {
        color: #E6D5C8;
    }

    header {
        background: rgba(26, 20, 18, 0.96);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    }
    .logo a {
        color: #E9CFBC;
    }
    .logo span {
        color: #D48C6C;
    }
    .nav-links a {
        color: #E6D5C8;
    }
    .nav-links a:hover {
        color: #D48C6C;
    }
    .btn-cita {
        background: #D48C6C;
        color: #1A1412 !important;
    }
    .btn-cita:hover {
        background: #B86B4A;
    }

    .section-light {
        background-color: #1E1A18;
    }
    .section {
        border-bottom-color: #332A25;
    }

    .card,
    .card-porque,
    .testimonio,
    .contact-form,
    .tarjeta-precio {
        background: #2C241F;
        border-color: #4F3A2E;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }
    .card:hover,
    .card-porque:hover {
        border-color: #6B4F3E;
    }
    .card h3,
    .card-porque-text h2 {
        color: #F2E2D6;
    }
    .card p,
    .card-porque-text p,
    .testimonio p {
        color: #D1C0B0;
    }
    .card-porque-text .subtitulo {
        color: #D48C6C;
    }
    .tarjeta,
    .tarjeta-porque,
    .testimonio,
    .contact-form,
    .tarjeta-precio {
        background: #2C241F;
        border-color: #4F3A2E;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }
    .tarjeta:hover,
    .tarjeta-porque:hover {
        border-color: #6B4F3E;
    }
    .tarjeta h3,
    .tarjeta-porque-text h2 {
        color: #F2E2D6;
    }
    .tarjeta p,
    .tarjeta-porque-text p,
    .testimonio p {
        color: #D1C0B0;
    }
    .tarjeta-porque-text .subtitulo {
        color: #D48C6C;
    }
    .testimonio::before {
        color: #D48C6C;
    }
    .testimonio .autor {
        color: #D48C6C;
    }
    .testimonio .ciudad {
        color: #A68F7A;
    }

    .section-title {
        color: #F2E2D6;
    }
    .section-subtitle {
        color: #D1C0B0;
    }

    .btn-primary {
        background: #D48C6C;
        color: #1A1412;
    }
    .btn-primary:hover {
        background: #B86B4A;
    }
    .btn-secondary {
        border-color: #D48C6C;
        color: #D48C6C;
    }
    .btn-secondary:hover {
        background: #332A25;
    }

    input,
    textarea {
        background: #1E1A18;
        border-color: #4F3A2E;
        color: #E6D5C8;
    }
    input::placeholder,
    textarea::placeholder {
        color: #8F7A6A;
    }

    .footer {
        background: #0F0C0A;
        color: #D1C0B0;
    }
    .footer a {
        color: #D1C0B0;
    }
    .copyright {
        border-top-color: #332A25;
    }

    .legal-box {
        background: #2C241F;
        border-color: #4F3A2E;
    }
    .legal-box h2 {
        color: #D48C6C;
    }
    .legal-box p,
    .legal-box li,
    .legal-box td {
        color: #D1C0B0;
    }
    .legal-box a {
        color: #D48C6C;
    }
    .legal-box th {
        background: #4F3A2E;
        border-color: #4F3A2E;
        color: #E6D5C8;
    }
    .legal-box td {
        border-color: #4F3A2E;
    }

    .cookie-banner {
        background: rgba(15, 12, 10, 0.98);
        border-top-color: #D48C6C;
    }
    .cookie-banner a {
        color: #D48C6C;
    }
    .btn-cookie-reject {
        border-color: #D48C6C;
        color: #D48C6C;
    }
    .btn-cookie-reject:hover {
        background: #332A25;
    }

    .nav-links {
        background: #2C241F;
    }
}