/* ========================================
   ESTILOS PARA PÁGINA ECOGRAFÍA GINECOLÓGICA
   Variables scoped bajo #italmed-gineco-page
   para no interferir con otras páginas
   ======================================== */

/* =====================================================
   TINTE GLOBAL DE SITIO — Solo en esta página
   WordPress agrega .page-template-page-ecografia-ginecologica
   al <body> cuando esta plantilla está activa
   ===================================================== */
body.page-template-page-ecografia-ginecologica {
    /* Sobrescribir variables globales → todo lo que use
       var(--color-primario) y var(--gradiente-logo) cambia */
    --color-primario: #E91E63;
    --color-secundario: #FF4081;
    --color-oscuro:    #880E4F;
    --color-acento:    #E91E63;
    --gradiente-logo:  linear-gradient(135deg, #E91E63 0%, #FF4081 100%);
    --sombra-acento:   0 14px 30px rgba(233, 30, 99, 0.22);
}

/* Pre-header: colores hardcodeados en main.css → override explícito */
body.page-template-page-ecografia-ginecologica .pre-header {
    background: linear-gradient(90deg, #6A0035 0%, #C2185B 45%, #E91E63 100%) !important;
}

/* Header sticky: borde inferior */
body.page-template-page-ecografia-ginecologica .header-new {
    border-bottom-color: rgba(233, 30, 99, 0.12) !important;
}

/* Botones hover menú navbar */
body.page-template-page-ecografia-ginecologica .menu-link:hover,
body.page-template-page-ecografia-ginecologica .menu-dropdown-trigger:hover {
    background: rgba(233, 30, 99, 0.09) !important;
    color: #880E4F !important;
}

/* Dropdown items hover */
body.page-template-page-ecografia-ginecologica .menu-dropdown-content a:hover,
body.page-template-page-ecografia-ginecologica .mobile-menu-nav a:hover,
body.page-template-page-ecografia-ginecologica .mobile-menu-nav a.active {
    background: rgba(233, 30, 99, 0.09) !important;
    color: #E91E63 !important;
}

/* Botón "Resultados" (ghost) */
body.page-template-page-ecografia-ginecologica .btn-new-ghost {
    color: #880E4F !important;
    background: rgba(233, 30, 99, 0.07) !important;
    border-color: rgba(233, 30, 99, 0.15) !important;
}

/* Toggle mobile */
body.page-template-page-ecografia-ginecologica .header-new-toggle {
    background: rgba(233, 30, 99, 0.08) !important;
}

#italmed-gineco-page {
    --color-primario: #E91E63;
    --color-primario-oscuro: #C2185B;
    --color-secundario: #FF4081;
    --color-exito: #34A853;
    --texto-principal: #202124;
    --texto-secundario: #5F6368;
    --fondo-card: #FFFFFF;
    --borde-suave: #f0d6df;
}

/* HERO SECTION */
.service-hero-premium {
    background: linear-gradient(135deg, rgba(234, 67, 53, 0.95), rgba(244, 67, 54, 0.85)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="1200" height="600" fill="url(%23grid)"/></svg>');
    background-size: cover, 100px 100px;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.service-hero-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

.service-hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 1.5rem;
}

.hero-badge i {
    font-size: 1.1rem;
}

.service-hero-premium h1 {
    color: white;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 1rem 0 1.5rem;
    letter-spacing: -0.5px;
}

.hero-text {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.btn-hero-primary,
.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-hero-primary {
    background: white;
    color: var(--color-primario);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
}

/* SERVICE WRAPPER */
.service-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* SERVICE SECTION */
.service-section {
    margin-bottom: 4rem;
}

.service-section:nth-child(1) { }
.service-section:nth-child(2) { }
.service-section:nth-child(3) { }
.service-section:nth-child(4) { }
.service-section:nth-child(5) { }

.service-title-center {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--texto-principal);
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.service-title-center::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primario), var(--color-secundario));
    border-radius: 2px;
}

/* INTRO CARD */
.service-intro-card {
    background: linear-gradient(135deg, rgba(234, 67, 53, 0.05), rgba(244, 67, 54, 0.05));
    padding: 2.5rem;
    border-radius: 16px;
    border-left: 4px solid var(--color-primario);
    transition: all 0.3s ease;
}

.service-intro-card:hover {
    box-shadow: 0 8px 24px rgba(234, 67, 53, 0.1);
    transform: translateY(-2px);
}

.service-intro-card h2 {
    color: var(--texto-principal);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.service-intro-card p {
    color: var(--texto-secundario);
    font-size: 1.05rem;
    line-height: 1.8;
    margin: 0;
}

.service-intro-card strong {
    color: var(--color-primario);
    font-weight: 600;
}

/* GRID LAYOUTS */
.service-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.service-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* FEATURE CARDS */
.service-feature-card {
    background: var(--fondo-card);
    border: 1px solid var(--borde-suave);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: var(--color-primario);
}

.feature-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 1.5rem;
}

.service-feature-card h3 {
    color: var(--texto-principal);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-feature-card p {
    color: var(--texto-secundario);
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.service-feature-card strong {
    color: var(--color-primario);
    font-weight: 600;
}

.feature-details {
    background: rgba(234, 67, 53, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--color-primario);
}

.feature-details small {
    display: block;
    color: var(--texto-secundario);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* USE CASE CARDS */
.service-use-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    background: rgba(234, 67, 53, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(234, 67, 53, 0.2);
}

.service-use-card:hover {
    background: rgba(234, 67, 53, 0.1);
    transform: translateY(-5px);
    border-color: var(--color-primario);
    box-shadow: 0 8px 20px rgba(234, 67, 53, 0.15);
}

.service-use-card i {
    font-size: 2.5rem;
    color: var(--color-primario);
    margin-bottom: 1rem;
}

.service-use-card h4 {
    color: var(--texto-principal);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.service-use-card p {
    color: var(--texto-secundario);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* PRICE BOX */
.service-price-box {
    background: linear-gradient(135deg, rgba(234, 67, 53, 0.05), rgba(244, 67, 54, 0.05));
    padding: 3rem 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--borde-suave);
}

.service-price-box h2 {
    color: var(--texto-principal);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.price-subtitle {
    color: var(--texto-secundario);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.service-price-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--borde-suave);
}

.service-price-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.service-price-table thead {
    background: linear-gradient(135deg, var(--color-primario), var(--color-primario-oscuro));
    color: white;
}

.service-price-table th {
    padding: 1.2rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.service-price-table td {
    padding: 1.2rem;
    border-bottom: 1px solid var(--borde-suave);
    font-size: 1rem;
}

.service-price-table tbody tr {
    transition: background 0.2s ease;
}

.service-price-table tbody tr:hover {
    background: rgba(234, 67, 53, 0.03);
}

.service-price-table tbody tr:last-child td {
    border-bottom: none;
}

.price-fonasa {
    font-weight: 700;
    color: var(--color-primario);
    font-size: 1.15rem;
}

.prep-cell {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--texto-secundario);
}

/* PREPARATION CARDS */
.preparation-card {
    padding: 2rem;
    background: var(--fondo-card);
    border: 1px solid var(--borde-suave);
    border-radius: 12px;
    border-left: 4px solid var(--color-primario);
    transition: all 0.3s ease;
}

.preparation-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

.prep-icon {
    font-size: 2.5rem;
    color: var(--color-primario);
    margin-bottom: 1rem;
}

.preparation-card h3 {
    color: var(--texto-principal);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.preparation-card ul {
    list-style: disc;
    margin-left: 1.5rem;
    color: var(--texto-secundario);
    line-height: 1.8;
}

.preparation-card li {
    margin-bottom: 0.5rem;
}

.preparation-card strong {
    color: var(--texto-principal);
    font-weight: 600;
}

/* GLASS CARD */
.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.glass-card h2 {
    color: var(--texto-principal);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.glass-card h4 {
    color: var(--color-primario);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* CTA CARD */
.cta-card {
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
    animation: pulse 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.cta-card h2 {
    position: relative;
    z-index: 1;
}

.cta-card p {
    position: relative;
    z-index: 1;
}

.cta-card > div {
    position: relative;
    z-index: 1;
}

/* FAQ SECTION */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--fondo-card);
    border: 1px solid var(--borde-suave);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--color-primario);
}

.faq-item[open] .faq-question {
    background: linear-gradient(135deg, rgba(234, 67, 53, 0.08), rgba(244, 67, 54, 0.08));
    color: var(--color-primario);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--texto-principal);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    transition: all 0.3s ease;
    gap: 1rem;
}

.faq-question i {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    color: var(--color-primario);
}

.faq-item[open] .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--texto-secundario);
    line-height: 1.8;
    background: rgba(234, 67, 53, 0.03);
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .service-wrapper {
        padding: 0 1.5rem;
    }

    .service-hero-premium {
        padding: 3rem 1.5rem;
    }

    .service-hero-premium h1 {
        font-size: clamp(1.8rem, 4vw, 2.8rem);
    }

    .service-title-center {
        font-size: 1.8rem;
    }

    .service-grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .service-hero-premium {
        padding: 2.5rem 1rem;
        margin-bottom: 2rem;
    }

    .service-hero-premium h1 {
        font-size: 1.8rem;
        margin: 0.8rem 0 1rem;
    }

    .hero-text {
        font-size: 1rem;
    }

    .hero-buttons {
        gap: 0.75rem;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
        width: 100%;
    }

    .service-wrapper {
        padding: 0 1rem;
    }

    .service-section {
        margin-bottom: 2.5rem;
    }

    .service-title-center {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .service-intro-card {
        padding: 1.5rem;
    }

    .service-intro-card h2 {
        font-size: 1.4rem;
    }

    .service-feature-card {
        padding: 1.5rem;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .service-use-card {
        padding: 1.5rem 1rem;
    }

    .service-use-card i {
        font-size: 2rem;
    }

    .service-price-box {
        padding: 1.5rem;
    }

    .service-price-box h2 {
        font-size: 1.5rem;
    }

    .service-price-table th,
    .service-price-table td {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .preparation-card {
        padding: 1.5rem;
    }

    .prep-icon {
        font-size: 2rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .glass-card h2 {
        font-size: 1.4rem;
    }

    .faq-question {
        font-size: 0.95rem;
        padding: 1.2rem;
    }

    .faq-answer {
        padding: 0 1.2rem 1.2rem;
        font-size: 0.95rem;
    }

    .cta-card {
        padding: 2rem 1.5rem !important;
    }

    .cta-card h2 {
        font-size: 1.5rem;
    }

    .cta-card p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .service-hero-premium {
        padding: 2rem 0.75rem;
    }

    .service-hero-premium h1 {
        font-size: 1.5rem;
    }

    .hero-badge {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .hero-text {
        font-size: 0.95rem;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .service-wrapper {
        padding: 0 0.75rem;
    }

    .service-section {
        margin-bottom: 2rem;
    }

    .service-title-center {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }

    .service-grid-2,
    .service-grid-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .service-feature-card,
    .preparation-card {
        padding: 1rem;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    .prep-icon {
        font-size: 1.8rem;
    }

    .service-price-table th,
    .service-price-table td {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
}
