/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #FBF9F6;
    color: #333333;
    overflow-x: hidden;
}

/* ========================================
   HEADER / NAVBAR
   ======================================== */
.navbar-custom {
    background-color: transparent;
    padding: 0.8rem 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #555555 !important;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.navbar-brand img {
    width: 80px;
    height: 80px;
    margin-right: 12px;
    object-fit: contain;
}

.nav-link {
    color: #666666 !important;
    font-weight: 500;
    margin: 0 0.4rem;
    transition: color 0.3s ease;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.nav-link:hover {
    color: #249F5F !important;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.7);
}

.language-selector {
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    padding: 0.4rem;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #666666;
    font-size: 0.9rem;
}

.language-selector option {
    background-color: #FFFFFF;
    color: #666666;
}

.back-btn {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #666666;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    margin-right: 1rem;
}

.back-btn:hover {
    background-color: rgba(255, 255, 255, 1);
    color: #333333;
    border-color: rgba(0, 0, 0, 0.2);
}

/* Navbar toggler para móviles */
.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");
}

/* ========================================
   MAIN SECTION (HERO)
   ======================================== */
.main-section {
    min-height: calc(100vh - 80px);
    display: flex;
    position: relative;
    align-items: center;
    justify-content: flex-end;
    padding: 2rem 0;
    /* background-image se define inline en el HTML con Django template */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.main-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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 {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    height: auto;
    max-width: 540px;
    margin-left: auto;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-align: left;
}

.hero-subtitle {
    font-size: 1rem;
    color: #666666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-align: left;
}

.location-form {
    margin-bottom: 1.5rem;
}

.form-control-custom {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.95rem;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.form-control-custom:focus {
    outline: none;
    border-color: #249F5F;
    box-shadow: 0 0 0 3px rgba(36, 159, 95, 0.1);
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #249F5F;
    font-size: 1.1rem;
    z-index: 10;
    pointer-events: none;
}

/* ========================================
   LOADING SPINNER
   ======================================== */
.spinner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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: 5px solid #249F5F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-text {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ========================================
   MODALES
   ======================================== */
.modal-content {
    border-radius: 20px;
    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;
    order: 1;
}

.btn-close {
    order: 2;
    margin: 0;
}

.card-header-custom {
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-btn-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn-circle:hover {
    background: #e0e0e0;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.card-body-custom {
    padding: 2rem;
}

/* Search Input en Modal */
.search-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #249F5F;
    box-shadow: 0 0 0 3px rgba(36, 159, 95, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

.clear-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    display: none;
}

.clear-btn.show {
    display: block;
}

/* Current Location Button */
.current-location-btn {
    width: 100%;
    padding: 1rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.current-location-btn:hover {
    border-color: #249F5F;
    background: #f8fef9;
}

.location-icon {
    width: 40px;
    height: 40px;
    background: #249F5F;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Error Modal */
.error-icon {
    width: 80px;
    height: 80px;
    background: #ffebee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.error-icon i {
    font-size: 2.5rem;
    color: #e91e63;
}

.modal-title-custom {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal-text {
    color: #666;
    margin-bottom: 1.5rem;
}

.btn-retry {
    background: #e91e63;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-weight: 500;
    width: 100%;
}

.btn-retry:hover {
    background: #c2185b;
    color: white;
}

/* Confirm Modal con Mapa */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.direccion-confirm {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.direccion-text {
    flex: 1;
    font-weight: 500;
}

.btn-confirm {
    background: #e91e63;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-weight: 500;
    width: 100%;
}

.btn-confirm:hover {
    background: #c2185b;
    color: white;
}

/* ========================================
   GOOGLE PLACES AUTOCOMPLETE
   ======================================== */
.pac-container {
    z-index: 10000 !important;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    margin-top: 5px;
}

.pac-item {
    padding: 0.8rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.pac-item:hover {
    background-color: #f8f9fa;
}

.pac-matched {
    font-weight: 700;
    color: #249F5F;
}

/* ========================================
   EMPLOYEE SECTION
   ======================================== */
.employee-section {
    padding: 3rem 0;
    background-color: #FBF9F6;
}

.employee-content {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.employee-image {
    flex: 1;
    border-radius: 15px;
    height: 300px;
    overflow: hidden;
}

.employee-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.employee-text {
    flex: 1;
}

.employee-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.employee-subtitle {
    font-size: 0.95rem;
    color: #666666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* ========================================
   AVAILABILITY SECTION
   ======================================== */
.availability-section {
    padding: 3rem 0;
    background-color: rgba(230, 230, 230, 0.4);
}

.availability-content {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.availability-text {
    flex: 1;
}

.availability-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.availability-description {
    font-size: 0.95rem;
    color: #666666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.notify-link {
    color: #249F5F;
    text-decoration: underline;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.notify-link:hover {
    color: #1e8a4f;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 992px) {
    .main-section {
        min-height: auto;
        padding: 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;
    }

    .hero-title {
        font-size: 2rem;
        text-align: center;
    }

    .hero-subtitle {
        text-align: center;
    }
    
    .employee-content,
    .availability-content {
        flex-direction: column;
        text-align: center;
    }
    
    .employee-title,
    .availability-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 576px) {
    .right-side {
        padding: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .form-control-custom {
        padding: 0.8rem 2.8rem 0.8rem 2.8rem;
        font-size: 0.85rem;
    }
}