/* ==========================================================================
   ÍNDICE CSS - PÁGINA CONTACTO
   1. CONFIGURACIÓN GENERAL
   2. HERO
   3. FORMULARIO
   4. AJUSTES RESPONSIVOS (Tablet y Móvil)
   ========================================================================== */

/* ==========================================================================
   1. CONFIGURACIÓN GENERAL
   ========================================================================== */
body.cnt-page {
    background-color: #ffffff;
    color: #111111;
    -webkit-font-smoothing: antialiased;
}

/* Force transparent header and white text on dark hero (override light-theme) */
body.cnt-page .header {
    background-color: transparent !important;
    border-bottom: none !important;
}

body.cnt-page .nav a {
    color: #ffffff !important;
}

body.cnt-page .nav a:hover {
    color: #d4c8b8 !important;
}

/* Force white hamburger on dark hero */
body.cnt-page .hamburger-line {
    background-color: #ffffff !important;
}

.cnt-page .menu-btn {
    background: #111111 !important;
    border-color: rgba(255, 255, 255, 0.1);
}


/* ==========================================================================
   2. HERO
   ========================================================================== */
.cnt-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
}

.cnt-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.cnt-hero-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.cnt-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 60%, rgba(255,255,255,1) 100%);
    z-index: 2;
}

.cnt-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #111111;
    padding: 160px 4vw 8vw; /* Safe top padding to clear header */
}

.cnt-hero-title {
    font-size: clamp(2rem, 4vw, 4.5rem) !important;
    font-weight: 100;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.1;
    color: #ffffff;
    text-shadow: 0 2px 30px rgba(0,0,0,0.3);
}

/* ==========================================================================
   3. FORMULARIO
   ========================================================================== */
.cnt-section-form {
    padding: 0 0 4rem;
    position: relative;
    z-index: 5;
}

.cnt-container {
    max-width: 90%;
    margin: 0 auto;
    padding: 0 4vw;
}

.cnt-form-wrap {
    max-width: 1000px;
    margin: calc(-100vh + 340px) auto 0; /* Se ajusta dinámicamente debajo del texto */
    position: relative;
    z-index: 10;
}

.cnt-form {
    background: #ffffff;
    border: 1px solid #eeeeee;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cnt-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.cnt-form-group {
    display: flex;
    flex-direction: column;
}

.cnt-input {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 300;
    color: #111;
    background: transparent;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.8rem 0;
    width: 100%;
    outline: none;
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
}

.cnt-input::placeholder { color: #aaa; }
.cnt-input:focus { border-color: #111; }

.cnt-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.7;
}

/* Custom Select */
.cnt-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10L12 15L17 10' stroke='%23111111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 20px;
    padding-right: 30px;
}

/* RGPD Checkbox */
.cnt-rgpd-group {
    margin-top: 1rem;
}

.cnt-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
}

.cnt-checkbox-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cnt-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    flex-shrink: 0;
    margin-top: 2px;
    transition: border-color 0.3s ease;
}

.cnt-checkbox-label input:checked + .cnt-checkbox-custom {
    background: #111;
    border-color: #111;
    position: relative;
}

.cnt-checkbox-label input:checked + .cnt-checkbox-custom::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5L4.5 8.5L11 1.5' stroke='white' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}

.cnt-checkbox-text {
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.6;
    color: #555;
}

/* Botón Submit */
.cnt-submit-wrap {
    text-align: right;
    margin-top: 1rem;
}

.cnt-submit-btn {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    padding: 1.3rem 3.5rem;
    background: #111;
    color: #fff;
    border: 1px solid #111;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease;
    width: 100%;
}

.cnt-submit-btn:hover {
    background: transparent;
    color: #111;
}

/* ─── TABLET (768px – 1024px) ──────────────────────────────── */
@media (min-width: 768px) and (max-width: 1024px) {
    .cnt-hero-content {
        padding: 140px 4vw 4vw !important;
    }

    .cnt-form-wrap {
        margin-top: calc(-100vh + 300px) !important;
        max-width: 85% !important;
    }

    .cnt-form {
        padding: 2.5rem 2.5rem;
    }

    .cnt-hero-title {
        font-size: clamp(2rem, 5vw, 3.5rem) !important;
    }
}

/* ─── MOBILE (≤ 767px) ─────────────────────────────────────── */
@media (max-width: 767px) {
    .cnt-form-row {
        grid-template-columns: 1fr;
    }

    .cnt-form {
        padding: 2.2rem 1.8rem !important;
        border-radius: 14px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
    }

    .cnt-form-wrap {
        margin-top: calc(-100vh + 270px) !important;
    }

    .cnt-hero-content {
        padding: 130px 8vw 4vw !important;
    }

    /* Keep font-size at least 16px to prevent iOS auto-zoom, but increased for readability */
    .cnt-input,
    .cnt-select,
    .cnt-textarea {
        font-size: 17px !important; 
    }

    .cnt-checkbox-text {
        font-size: 1rem !important;
    }

    .cnt-submit-btn {
        font-size: 0.85rem !important;
    }
}

/* ─── MOBILE S (≤ 480px) ────────────────────────────────────── */
@media (max-width: 480px) {
    .cnt-form {
        padding: 1.8rem 1.2rem !important;
        border-radius: 10px !important;
    }

    .cnt-hero-title {
        font-size: clamp(1.5rem, 7vw, 2.2rem) !important;
    }

    .cnt-hero-content {
        padding: 120px 8vw 4vw !important;
    }

    .cnt-form-wrap {
        margin-top: calc(-100vh + 240px) !important;
    }

}

/* ─── MOBILE LANDSCAPE (Horizontal) ────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
    .cnt-hero {
        min-height: 400px !important;
        height: auto !important;
    }
    .cnt-form-wrap {
        margin-top: -60px !important;
    }
}
