/* =========================================
   STYLE.CSS - ACCIÓN ANIMAL (VERSIÓN FINAL)
   ========================================= */

/* 1. IMPORTACIÓN DE FUENTES */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&family=Roboto:wght@300;400;500&display=swap');

/* 2. VARIABLES DE COLOR (Paleta Exacta de React) */
:root {
    --purple-main: #795cd8;
    --purple-light: #d6c4ff;
    --blue-light: #c9e0f5;
    --purple-dark: #6a4c94;
    --teal: #58c3c0;
    --green: #9bcf75;
    --bg-light: #ffffff;
    --bg-offwhite: #fdfdfd;
    --text-main: #4a4a4a;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --error-red: #d32f2f;
}

/* 3. RESET Y CONFIGURACIÓN BÁSICA */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-offwhite);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--purple-dark);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--purple-dark);
    transition: color 0.2s;
}

button {
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
}

/* 4. LAYOUT */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.content-section {
    padding: 60px 0;
    flex: 1;
}

/* 5. NAVBAR (ENCABEZADO) */
header {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.4rem;
    color: var(--purple-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--purple-dark);
    cursor: pointer;
    padding: 5px;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
}

.nav-links a {
    color: var(--purple-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--teal);
}

/* 6. BOTONES */
.btn {
    min-width: 180px;
    height: 45px;
    padding: 0 20px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.btn-white {
    background-color: var(--purple-dark);
    color: #ffffff;
    border: none;
}
.btn-white:hover {
    background-color: var(--purple-main);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-teal {
    background-color: var(--teal);
    color: #ffffff;
    border: none;
}
.btn-teal:hover {
    background-color: #4eb5b2;
    color: #ffffff;
    transform: translateY(-2px);
}

/* NUEVO BOTÓN SÓLIDO */
.btn-purple {
    background-color: var(--purple-main);
    color: #ffffff;
    border: none;
}
.btn-purple:hover {
    background-color: var(--purple-dark);
    color: #ffffff;
    transform: translateY(-2px);
}

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

.btn-outline-purple:hover {
    background-color: var(--purple-dark);
    color: #ffffff;
    transform: translateY(-2px);
}

/* 7. PAGE HEADER (BANNERS) */
.page-header {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 100px 0;
    text-align: center;
    position: relative;
}

.page-header h1 {
    color: var(--purple-dark);
    margin-bottom: 15px;
    font-size: 2.8rem;
}

.page-header p {
    color: var(--text-main);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
    padding: 0 10px;
}

/* 8. ELEMENTOS DINÁMICOS Y ANIMACIONES */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeInUp 0.8s ease-out forwards;
}

.text-block { margin-bottom: 40px; }

.intro-box {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 12px;
    border-top: 4px solid var(--green);
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card-info {
    background: var(--bg-light);
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.card-info h3 { margin-bottom: 15px; }
.card-info:hover {
    transform: translateY(-5px);
    border-color: var(--purple-light);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

/* Tarjetas de Servicios (Qué Hacemos) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.service-card {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid var(--teal);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.service-card h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--purple-dark);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.service-card .icon-circle {
    background: var(--blue-light);
    color: var(--purple-dark);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Banner Inferior (Llamado a la acción) */
.cta-banner {
    background: linear-gradient(135deg, var(--blue-light), var(--purple-light));
    padding: 40px 20px;
    border-radius: 16px;
    text-align: center;
    margin: 60px 0 20px 0;
    box-shadow: 0 10px 30px rgba(121, 92, 216, 0.1);
}

.cta-banner h3 {
    color: var(--purple-dark);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

/* 9. AVISO IMPORTANTE MEDICO */
.medical-disclaimer {
    background-color: #fff8e1;
    border-left: 5px solid #f0ad4e;
    padding: 30px;
    margin-top: 40px;
    border-radius: 0 8px 8px 0;
}
.medical-disclaimer h3 {
    color: var(--error-red);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.medical-disclaimer ul { margin: 15px 0 15px 20px; }
.medical-disclaimer li { margin-bottom: 5px; color: var(--text-main); }

/* 10. TABLA DE ARANCELES */
.table-wrapper {
    width: 100%;
    margin-top: 20px;
    background: var(--bg-light);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.price-table thead {
    background: var(--purple-dark);
    color: var(--bg-light);
}

.price-table th {
    padding: 18px 20px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.price-table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 1.05rem;
}

.price-table tr:last-child td { border-bottom: none; }
.price-row:hover { background-color: var(--bg-offwhite); }

.price-tag {
    font-weight: 700;
    color: var(--purple-main);
    text-align: right !important;
    font-size: 1.15rem !important;
}

/* 11. CONTADORES MULTICOLOR */
.stats-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    text-align: center;
    margin-top: 40px;
}
.stat-item { flex: 1; min-width: 200px; padding: 20px; }
.icon-stat { font-size: 3rem; margin-bottom: 15px; }
.counter {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 5px;
    line-height: 1;
}
.stat-item p {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-purple .icon-stat, .stat-purple .counter { color: var(--purple-main); }
.stat-teal .icon-stat, .stat-teal .counter { color: var(--teal); }
.stat-green .icon-stat, .stat-green .counter { color: var(--green); }

/* 12. FOOTER */
footer {
    background: var(--purple-dark);
    color: #fff;
    padding: 40px 0;
    margin-top: auto;
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
}

/* 13. SECCIÓN FAQ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.faq-item:hover { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03); }

.faq-item summary {
    padding: 20px;
    font-weight: 600;
    color: var(--purple-dark);
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--teal);
    transition: transform 0.3s ease;
}
.faq-item[open] summary::after { transform: rotate(180deg); }

.faq-item .faq-content {
    padding: 0 20px 20px 20px;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
    border-top: 1px dashed var(--border-color);
    margin-top: 5px;
    padding-top: 15px;
}

/* 14. GUÍA DE CUIDADOS */
.care-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    align-items: start;
}

.care-card {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    border-top: 8px solid;
    transition: transform 0.3s ease;
}

.care-card:hover { transform: translateY(-5px); }

.care-card.pre-op { border-top-color: var(--teal); }
.care-card.post-op { border-top-color: var(--purple-main); }

.care-card h4 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--purple-dark);
    border-bottom: 2px solid var(--bg-offwhite);
    padding-bottom: 15px;
}

.care-card h4 i {
    background: var(--bg-offwhite);
    padding: 12px;
    border-radius: 50%;
    color: var(--purple-main);
}
.care-card.pre-op h4 i { color: var(--teal); }

.care-section { margin-bottom: 25px; }

.care-section h5 {
    font-size: 1.05rem;
    color: var(--purple-main);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.care-section p, .care-section ul {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.6;
}
.care-section ul { padding-left: 20px; margin-top: 5px; }
.care-section li { margin-bottom: 5px; }

.small-text { 
    font-size: 0.85rem !important; 
    color: var(--text-light) !important; 
    margin-top: 8px;
}

.alert-danger {
    background: #fff0f0;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid var(--error-red);
}
.alert-danger h5 { color: var(--error-red); }

.alert-warning {
    background: #fff8e1;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid #f0ad4e;
}
.alert-warning h5 { color: #d35400; }

/* 15. MEDIA QUERIES (MÓVIL) */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .navbar { position: relative; height: auto; padding: 15px 0; }
    .hamburger { display: block; padding: 5px; margin: 0; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 20px;
        width: auto;
        min-width: 200px;
        background-color: var(--bg-light);
        flex-direction: column;
        padding: 10px 0;
        border-radius: 8px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
        border: 1px solid var(--border-color);
        z-index: 2000;
    }

    .nav-links.active {
        display: flex;
        animation: aparecerMenu 0.2s ease-out;
    }

    @keyframes aparecerMenu {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .nav-links li { width: 100%; text-align: left; }

    .nav-links a {
        display: block;
        padding: 12px 20px;
        color: var(--purple-dark);
        font-size: 0.95rem;
        border-left: 3px solid transparent;
    }

    .nav-links a:hover {
        background-color: var(--purple-light);
        border-left: 3px solid var(--purple-dark);
    }

    .page-header h1 { font-size: 2rem; }
    .page-header { padding: 60px 0; }
    .stats-grid { flex-direction: column; gap: 40px; }
    .btn { width: 100%; margin-bottom: 10px; margin-left: 0 !important; }

    /* TABLA MÓVIL */
    .table-wrapper {
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    .price-table, .price-table tbody, .price-table tr, .price-table td {
        display: block;
        width: 100%;
    }

    .price-table thead { display: none; }

    .price-table tr {
        background: var(--bg-light);
        margin-bottom: 15px;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
        border: 1px solid var(--border-color);
        border-left: 5px solid var(--teal);
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        gap: 15px;
        transition: transform 0.2s;
    }

    .price-table tr:hover { transform: translateY(-3px); }
    .price-table td { padding: 0; border: none; }

    .price-table td:first-child {
        font-size: 1.1rem;
        font-weight: 500;
        flex: 1;
        line-height: 1.4;
        text-align: left;
    }

    .price-table td.price-tag {
        font-size: 1.3rem !important;
        text-align: right !important;
        white-space: nowrap;
        color: var(--purple-dark);
    }
}