/* contact.css - Estilos específicos para la página de contacto */

/* Page Hero Mejorado */
.page-hero {
    background: var(--gradient-primary);
    padding: 9rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    }

    .page-hero-content {
        position: relative;
        z-index: 1;
        max-width: 700px;
        margin: 0 auto;
    }

    .page-hero-title {
        font-family: 'Playfair Display', serif;
        font-size: clamp(2.5rem, 5vw, 3.5rem);
        color: white;
        margin-bottom: 1rem;
        line-height: 1.2;
    }

    .page-hero-subtitle {
        font-size: 1.25rem;
        color: rgba(255, 255, 255, 0.9);
        font-weight: 300;
        line-height: 1.6;
    }
}

/* Contact Cards Grid */
.contact-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;

    .contact-card {
        background: white;
        border-radius: 1rem;
        padding: 2.5rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(0, 0, 0, 0.05);
        text-align: center;
        transition: all 0.3s ease;

        &:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
        }

        .contact-card-icon {
            width: 60px;
            height: 60px;
            margin: 0 auto 1.5rem;
            background: var(--gradient-primary);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
        }

        h3 {
            font-size: 1.25rem;
            color: var(--text-dark);
            margin-bottom: 1rem;
        }

        .contact-main {
            font-size: 1.125rem;
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 0.5rem;
        }

        .contact-detail {
            color: var(--text-light);
            line-height: 1.6;
            margin-bottom: 1.5rem;
            font-size: 0.95rem;
        }
    }
}

/* Process Timeline - Altura Uniforme */
.process-section {
    background: var(--background-light);
    padding: 5rem 0;

    .process-timeline {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
        margin-top: 3rem;
        position: relative;

        .process-card {
            background: white;
            border-radius: 1rem;
            padding: 2rem;
            position: relative;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            transition: all 0.3s ease;

            /* Flexbox para distribuir el contenido */
            display: flex;
            flex-direction: column;
            min-height: 380px;
            /* Altura mínima consistente */

            &:hover {
                transform: translateY(-5px);
                box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
            }
            
            .process-number {
                width: 40px;
                height: 40px;
                background: var(--gradient-primary);
                color: white;
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                font-weight: 700;
                font-size: 1.25rem;
                margin-bottom: 1rem;
                flex-shrink: 0;
            }
            
            h3 {
                color: var(--text-dark);
                font-size: 1.25rem;
                margin-bottom: 1rem;
                min-height: 60px;
                /* Altura mínima para títulos de dos líneas */
                display: flex;
                align-items: center;
            }

            p {
                color: var(--text-light);
                line-height: 1.6;
                flex-grow: 1;
                /* El párrafo crece para ocupar el espacio disponible */
                margin-bottom: 1.5rem;
            }

            .process-metric {
                border-top: 1px solid rgba(0, 0, 0, 0.05);
                padding-top: 1rem;
                text-align: center;
                margin-top: auto;
                /* Se empuja al final de la tarjeta */
                
                .metric-value {
                    display: block;
                    font-size: 2rem;
                    font-weight: 700;
                    color: var(--accent-color);
                    margin-bottom: 0.25rem;
                }

                .metric-label {
                    font-size: 0.875rem;
                    color: var(--text-light);
                }
            }
        }
    }
}

/* Responsive: Mantener altura uniforme en diferentes breakpoints */
@media (max-width: 1024px) {
    .process-timeline {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .process-timeline {
        grid-template-columns: 1fr;

        &::before {
            display: none;
        }
    }

    .process-card {
        z-index: 1;
        min-height: auto;
        /* En móvil permitimos altura variable */

        h3 {
            min-height: auto;
        }
    }
}

/* Form Section Rediseñada */
.form-section {
    padding: 5rem 0;

    .form-container {
        display: grid;
        grid-template-columns: 350px 1fr;
        gap: 4rem;
        max-width: 1200px;
        margin: 0 auto;

        .form-sidebar {
            background: var(--background-light);
            padding: 2.5rem;
            border-radius: 1rem;
            height: fit-content;
            position: sticky;
            top: 100px;

            h2 {
                font-size: 1.5rem;
                color: var(--text-dark);
                margin-bottom: 2rem;
            }
            
            .benefit-item {
                display: flex;
                gap: 1rem;
                margin-bottom: 2rem;
                align-items: flex-start;

                .benefit-icon {
                    width: 32px;
                    height: 32px;
                    background: var(--success-color);
                    color: white;
                    border-radius: 50%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-weight: bold;
                    flex-shrink: 0;
                }
                
                /* Estilo específico para contadores en línea */
                .benefit-content {
                    p {
                        color: var(--text-light);
                        font-size: 0.9rem;
                        line-height: 1.5;
                    }
                    strong {
                        color: var(--accent-color);
                        font-weight: 600;
                    }
                    
                    .counter-inline {
                        display: inline-block;
                        color: var(--accent-color);
                        font-weight: 600;
                        font-variant-numeric: tabular-nums;
                    }
                }
            }
        }
    }
}

/* Formulario Principal */
.form-main {
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);

    h2 {
        font-size: 2rem;
        color: var(--text-dark);
        margin-bottom: 0.5rem;
    }

    .form-subtitle {
        color: var(--text-light);
        margin-bottom: 2rem;
    }
    
    .contact-form {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        
        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
        }
            
        .form-group {
            display: flex;
            flex-direction: column;

            label {
                font-weight: 500;
                color: var(--text-dark);
                margin-bottom: 0.5rem;
                font-size: 0.95rem;
            }

            input, select, textarea {
                padding: 0.875rem;
                border: 1px solid #e5e7eb;
                border-radius: 0.5rem;
                font-size: 1rem;
                font-family: 'Inter', sans-serif;
                transition: all 0.3s ease;
                background: white;

                &:focus {
                    outline: none;
                    border-color: var(--secondary-color);
                    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
                }
            }

            textarea {
                resize: vertical;
                min-height: 120px;
            }
        }
        
        .form-checkbox {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;

            input[type="checkbox"] {
                margin-top: 0.25rem;
                width: 18px;
                height: 18px;
                cursor: pointer;
            }
            label {
                color: var(--text-light);
                font-size: 0.9rem;
                line-height: 1.5;
            }
            a {
                color: var(--secondary-color);
                text-decoration: none;

                &:hover {
                    text-decoration: underline;
                }
            }
        }
        
        .form-note {
            text-align: center;
            color: var(--text-light);
            font-size: 0.875rem;
            margin-top: 1rem;
        }
    }
}

/* Alternative Contact CTA */
.alternative-contact {
    background: var(--background-light);
}

.cta-note {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Animaciones suaves */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;

    &.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estados de hover mejorados */
.contact-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.process-card{
    &::after {
        content: '';
        position: absolute;
        top: 50%;
        right: -2rem;
        width: 2rem;
        height: 2px;
        background: var(--accent-color);
        opacity: 0.3;
    }

    &:last-child::after {
        display: none;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .form-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .form-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        
        h2 {
            grid-column: 1 / -1;
        }
    }
}

@media (max-width: 768px) {
    .contact-cards-grid {
        grid-template-columns: 1fr;
    }

    .process-timeline {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-sidebar {
        grid-template-columns: 1fr;
    }

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

    .form-main {
        padding: 2rem;
    }

    .page-hero {
        padding: 5rem 0 3rem;
    }

    .page-hero-title {
        font-size: 1.75rem;
    }

    .page-hero-subtitle {
        font-size: 1rem;
    }

    .process-card::after {
        display: none;
    }

    .contact-card {
        padding: 1.5rem;
    }

    .process-section {
        padding: 3rem 0;
    }

    .form-section {
        padding: 3rem 0;
    }
}

/* Extra Small Devices */
@media (max-width: 575px) {
    .page-hero {
        padding: 5rem 0 2.5rem;
    }

    .page-hero-title {
        font-size: 1.5rem;
    }

    .page-hero-subtitle {
        font-size: 0.9375rem;
    }

    .contact-card {
        padding: 1.25rem;
    }

    .contact-card-icon {
        width: 50px;
        height: 50px;
    }

    .contact-card h3 {
        font-size: 1.125rem;
    }

    .contact-main {
        font-size: 1rem;
    }

    .form-main {
        padding: 1.5rem;
    }

    .form-main h2 {
        font-size: 1.5rem;
    }

    .process-card {
        padding: 1.5rem;
    }

    .process-card h3 {
        font-size: 1.125rem;
    }

    .metric-value {
        font-size: 1.5rem;
    }
}