/* ============================================================
   SEMBRIS — seleccionar.css
   ============================================================ */

/* ── Variables globales ─────────────────────────────────── */
:root {
    --green:       #249F5F;
    --green-dark:  #1a7a46;
    --green-light: #f8fef9;
    --text:        #333333;
    --text-muted:  #666666;
    --text-light:  #999999;
    --border:      #e0e0e0;
    --bg:          #FBF9F6;
    --bg-grey:     rgba(230, 230, 230, 0.4);
    --white:       #ffffff;
    --radius-sm:   10px;
    --radius-md:   12px;
    --radius-lg:   20px;
    --font-serif: Arial, sans-serif;
    --font-sans:  Arial, sans-serif;
    --shadow-sm:   0 1px 6px rgba(0, 0, 0, 0.08);
    --shadow-md:   0 5px 20px rgba(0, 0, 0, 0.15);
    --transition:  0.3s ease;

    /* Tamaños unificados para títulos y descripciones de sección */
    --section-title-size: 1.8rem;
    --section-desc-size:  0.95rem;
}

/* ── Reset base ─────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar-custom {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 0.25rem 0;
    position: relative;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
}



.navbar-brand {
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--green) !important;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand img {
    width: 110px;
    height: 60px;
    object-fit: contain;
}

.nav-link {
    color: var(--green) !important;
    font-weight: 500;
    margin: 0 0.4rem;
    transition: color var(--transition);
}
.nav-link:hover { color: var(--green-dark) !important; }

.language-selector {
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    padding: 0.4rem;
    background-color: var(--white);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.back-btn {
    background-color: var(--white);
    color: var(--text-muted);
    border: 1px solid rgba(0, 0, 0, 0.15);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color var(--transition), color var(--transition);
}
.back-btn:hover {
    background-color: #f5f5f5;
    color: var(--text);
}

.navbar-toggler { border-color: rgba(0, 0, 0, 0.2); }
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(102,102,102,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important;
        align-items: center;
        flex-grow: 1;
    }
    .navbar-toggler { display: none !important; }
}

/* ── Fix menú colapsado en móvil: que no se superponga al hero ── */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        box-shadow: var(--shadow-md);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        padding: 1rem 1.5rem;
        z-index: 1050;
    }
    .navbar-collapse .navbar-nav {
        flex-direction: column;
        gap: 0.5rem;
        margin: 0 !important;
        text-align: left;
    }
    .navbar-collapse .nav-link {
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--bg);
    }
    .navbar-collapse .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    .navbar-collapse .d-flex {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.main-section {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 2rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.main-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.3) 0%,
        rgba(255,255,255,0.1) 50%,
        rgba(0,0,0,0.05) 100%
    );
    z-index: 1;
}

.content-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding-right: 4rem;
}

.right-side {
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    max-width: 540px;
    margin-left: auto;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: var(--section-desc-size);
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.location-form { margin-bottom: 1.5rem; }

.btn-cta {
    background-color: var(--green);
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color var(--transition), box-shadow var(--transition);
}
.btn-cta:hover {
    background-color: var(--green-dark);
    box-shadow: 0 4px 15px rgba(36,159,95,0.3);
}
.btn-cta--lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ============================================================
   SPINNER OVERLAY
   ============================================================ */
.spinner-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.spinner-overlay.active { display: flex; }
.spinner-content { text-align: center; }
.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-text {
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* ============================================================
   MODALES
   ============================================================ */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
}
.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.search-input-wrap {
    position: relative;
    margin-bottom: 1rem;
}
.search-input-wrap .icon-left {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.search-input-wrap input {
    width: 100%;
    padding: 1rem 3rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input-wrap input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(36,159,95,0.1);
}
.search-input-wrap .btn-clear {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    display: none;
}
.search-input-wrap .btn-clear.show { display: block; }

.btn-location {
    width: 100%;
    padding: 1rem;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
    text-align: left;
}
.btn-location:hover {
    border-color: var(--green);
    background: var(--green-light);
}
.btn-location .icon-circle {
    width: 40px;
    height: 40px;
    background: var(--green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}
.btn-location .label-main { font-weight: 500; color: var(--text); }
.btn-location .label-sub  { font-size: 0.85rem; color: var(--text-light); }

/* Modal "no llegamos" — ícono y botón en verde */
.modal-error-icon {
    width: 80px;
    height: 80px;
    background: #e8f5ee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}
.modal-error-icon i { font-size: 2.5rem; color: var(--green); }

.btn-modal-pink {
    background: var(--green);
    color: var(--white);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    width: 100%;
    transition: background var(--transition);
}
.btn-modal-pink:hover { background: var(--green-dark); color: var(--white); }

#map {
    width: 100%;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.address-confirm-bar {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.address-confirm-bar span { flex: 1; font-weight: 500; }

/* ============================================================
   GOOGLE PLACES AUTOCOMPLETE
   ============================================================ */
.pac-container {
    z-index: 10000 !important;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-top: 5px;
    border: none;
}
.pac-item {
    padding: 0.8rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-family: var(--font-sans);
}
.pac-item:hover { background-color: #f8f9fa; }
.pac-matched { font-weight: 700; color: var(--green); }

/* ============================================================
   EMPLOYEE SECTION
   ============================================================ */
.employee-section {
    padding: 3rem 0;
    background-color: var(--bg);
}

.employee-content,
.availability-content {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-image {
    flex: 1;
    height: 300px;
    overflow: hidden;
    border-radius: 0;
}
.section-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.section-text { flex: 1; }

/* Títulos y descripciones de sección: tamaño unificado en todo el sitio */
.section-title {
    font-family: var(--font-serif);
    font-size: var(--section-title-size);
    font-weight: 600;
    color: #000;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.section-desc {
    font-size: var(--section-desc-size);
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* ============================================================
   AVAILABILITY SECTION
   ============================================================ */
.availability-section {
    padding: 3rem 0;
    background-color: var(--bg-grey);
}

.notify-link {
    color: var(--green);
    text-decoration: underline;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color var(--transition);
}
.notify-link:hover { color: var(--green-dark); }

/* ============================================================
   SEGUNDA SECCIÓN CTA (fooder)
   ============================================================ */
.cta-section {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--white);
}
.cta-section__bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.cta-section__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
    border-radius: 0;
}
.cta-section__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 3rem 5%;
}
.cta-section__card {
    max-width: 500px;
    background-color: rgba(255,255,255,0.7);
    padding: 2rem;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(5px);
}

/* Usa el mismo tamaño de título de sección que el resto */
.cta-section__title {
    font-family: var(--font-serif);
    font-size: var(--section-title-size);
    font-weight: 700;
    color: #000;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .main-section {
        min-height: auto;
        padding: 2rem 1rem;
        justify-content: center;
    }
    .content-container {
        flex-direction: column;
        max-width: 600px;
        padding-right: 0;
        justify-content: center;
    }
    .right-side {
        max-width: none;
        width: 100%;
        background: rgba(255,255,255,0.95);
        border-radius: 15px;
        padding: 2rem 1.5rem;
        margin-left: 0;
        text-align: center;
    }
    .hero-title { font-size: 1.7rem; }
    .employee-content,
    .availability-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {

    .cta-section__title { font-size: 1.3rem; text-align: center; }
    .cta-section__card { text-align: center; }

    .right-side    { padding: 1.5rem; }
    .hero-title    { font-size: 1.4rem; }
    .hero-subtitle { font-size: 0.9rem; }
    .btn-cta       { font-size: 0.9rem; padding: 0.8rem 1.5rem; }

    .section-title { font-size: 1.3rem; }
}