﻿/* ============================================= */
/* 1. VARIABLES Y CONFIGURACIÓN BASE             */
/* ============================================= */
:root {
    --ion-blue: #4FC3F7;
    --drift-silver: #DDE3EA;
    --text-dark: #2e3e63;
    --footer-grey: #94a3b8;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    overflow-x: hidden;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

.split-container {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

/* ============================================= */
/* 2. PANEL IZQUIERDO (CONTENIDO)                */
/* ============================================= */
.left-panel {
    flex: 1;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 40px 8% 30px 8%;
}

    .left-panel.detail-mode {
        background-image: radial-gradient(rgba(0,0,0,0.05) 0.5px, transparent 0.5px);
        background-size: 25px 25px;
    }

.brand {
    margin-bottom: 10px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 38px;
    height: 38px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
}

.content-wrapper {
    flex: 1;
    width: 100%;
}

.view {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

    .view.active {
        display: block;
        opacity: 1;
    }

.hero-text h1 {
    font-size: 2.8rem;
    color: var(--text-dark);
    margin: 0 0 15px 0;
    line-height: 1.1;
    font-weight: 700;
}

.hero-text p {
    font-size: 1.1rem;
    color: #5c6b89;
    margin: 0 0 25px 0;
    max-width: 500px;
    line-height: 1.5;
}

/* ============================================= */
/* 3. ACCIÓN Y CIERRE                            */
/* ============================================= */
.action-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    width: 100%;
    margin: 20px 0 0 0;
    text-align: center;
}

.cta-button {
    background-color: var(--ion-blue);
    color: white;
    padding: 16px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: none;
    cursor: pointer;
    margin-bottom: 25px;
}

    .cta-button:hover {
        background-color: #03a9f4;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(79, 195, 247, 0.3);
    }

.btn-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 1.5px solid var(--ion-blue);
    color: var(--ion-blue);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .back-btn:hover {
        background-color: var(--ion-blue);
        color: white;
        transform: translateX(-5px);
    }

.section-image {
    display: block;
    max-width: 600px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 0 auto;
    object-fit: cover;
}

/* ============================================= */
/* 4. FOOTERS                                    */
/* ============================================= */
.footer-left {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-size: 0.72rem;
    color: var(--footer-grey);
}

.footer-contact-info {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

    .contact-link:hover {
        color: var(--ion-blue);
    }

.footer-icon {
    width: 14px;
    height: 14px;
    color: var(--ion-blue);
}

.softmedia-tag {
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    margin-top: 5px;
}

.softmedia-link-left {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #cbd5e1;
    font-size: 0.65rem;
    font-weight: 400;
    transition: 0.3s;
}

    .softmedia-link-left:hover {
        color: var(--ion-blue);
    }

.soft-icon-left {
    width: 12px;
    height: 12px;
    stroke-width: 1.5px;
}

/* ============================================= */
/* 5. PANEL DERECHO (FICHAS)                     */
/* ============================================= */
.right-panel {
    flex: 1;
    background-color: var(--ion-blue);
    display: flex;
    flex-direction: column;
    /* ESTA ES LA MAGIA QUE EVITA LOS SALTOS */
    justify-content: flex-start; /* Antes estaba en 'center' */
    padding-top: 80px; /* Ajusta este valor para alinear las fichas visualmente con la izquierda */

    align-items: center;
    gap: 12px;
}

.card {
    background-color: var(--drift-silver);
    width: 85%;
    height: 80px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    cursor: pointer;
    transition: 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

    .card:hover {
        transform: translateX(-10px);
        background-color: #f8f9fa;
    }

.pastel-cyan {
    border-left: 8px solid #B2EBF2;
}

.pastel-purple {
    border-left: 8px solid #E1BEE7;
}

.pastel-yellow {
    border-left: 8px solid #FFF9C4;
}

.pastel-green {
    border-left: 8px solid #C8E6C9;
}

.pastel-rose {
    border-left: 8px solid #F8BBD0;
}

.icon-ia {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 6px;
    margin-right: 15px;
    padding: 5px;
}

.card-content h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 700;
}

.card-content p {
    margin: 0;
    font-size: 0.8rem;
    color: #777;
}

.contact-trigger {
    transition: all 0.3s ease;
}

    .contact-trigger:hover {
        background-color: #e1f0ff !important;
        transform: scale(1.03) translateX(-5px) !important;
    }


/* ============================================= */
/* 6. VISTA DETALLE Y FORMULARIO                 */
/* ============================================= */
#detail-view {
    box-sizing: border-box;
}

    #detail-view .action-block {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 18px;
        width: 100%;
        margin: 20px 0 0 0;
        clear: both;
    }

    #detail-view .section-image,
    #detail-view #detail-image {
        display: block;
        margin: 0 auto;
        max-width: 600px;
        width: 100%;
        height: auto;
        object-fit: cover;
    }

/* DISEÑO DEL FORMULARIO COMPACTO */
.contact-form-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 25px; /* Más compacto */
    position: relative;
}

    .input-group input,
    .input-group textarea {
        width: 100%;
        padding: 8px 0; /* Más compacto */
        font-size: 0.9rem;
        color: var(--text-dark);
        background: transparent;
        border: none;
        border-bottom: 1px solid #d1d5db;
        outline: none;
        transition: all 0.4s ease;
        font-family: inherit;
    }

        .input-group input:focus,
        .input-group textarea:focus {
            border-bottom: 2px solid var(--ion-blue);
        }

    .input-group textarea {
        min-height: 80px;
        max-height: 150px; /* Limita el crecimiento */
        resize: vertical; /* Permite estirar manualmente solo en vertical */
    }

        .input-group input::placeholder,
        .input-group textarea::placeholder {
            color: #cbd5e1;
            font-size: 0.85rem;
            opacity: 0.6;
        }

/* Feedback visual de error */
.input-error {
    border-bottom: 2px solid #ef4444 !important;
}

    /* Para que el placeholder cambie de color si hay error (opcional) */
    .input-error::placeholder {
        color: #fca5a5;
    }


/* ============================================= */
/* 7. RESPONSIVIDAD                              */
/* ============================================= */
@media (max-width: 992px) {
    .split-container {
        flex-direction: column;
    }

    .left-panel, .right-panel {
        width: 100%;
        padding: 80px 8% 40px 8%;
    }

    .hero-text h1 {
        font-size: 2rem;
    }
}
