/* 
 * index.css - Homepage specific styling
 * Uses main.css for base styles and variables
 */

/* Loading overlay specific to index page */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 87, 34, 0.3);
    border-top: 4px solid #FF5722;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #FF5722;
    margin-top: 20px;
    font-size: 18px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

/* Main content styling */
#main-content {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#main-content.ready {
    opacity: 1;
}

/* Header container */
#header-container {
    background: transparent;
    position: relative;
    z-index: 999;
}

/* Loading indicators for sections */
.section-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    flex-direction: column;
}

.section-loading .spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

.section-loading p {
    margin-top: 15px;
    color: #666;
}

/* Container sections */
.container-section {
    min-height: 200px;
}

/* Error message styling */
#error-message {
    background-color: #dc3545;
    color: white;
    padding: 15px;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: none;
}

/* Section spacing for homepage */
.section {
    padding: 70px 0;
    position: relative;
    overflow: hidden;
}

/* Enhanced section animation */
.section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* WhatsApp button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25), 0 0 15px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn:active {
    transform: scale(0.95);
}

.whatsapp-btn img {
    height: 60px;
    width: auto;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 10px;
    background: var(--accent-gold, #f8b400);
    color: var(--dark-color, #121212);
    padding: 10px 15px;
    border-radius: 5px;
    z-index: 10000;
    transition: top 0.3s ease;
    font-weight: 600;
}

.skip-link:focus {
    top: 10px;
    box-shadow: 0 0 0 3px rgba(var(--accent-gold-rgb, 248, 180, 0), 0.5);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .section {
        padding: 60px 0;
    }
    
    .spinner {
        width: 45px;
        height: 45px;
    }
    
    .loading-text {
        font-size: 16px;
    }
    
    .whatsapp-btn img {
        height: 55px;
    }
}

@media (max-width: 767.98px) {
    .section {
        padding: 50px 0;
    }
    
    .spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }
    
    .loading-text {
        font-size: 14px;
    }
    
    .whatsapp-btn {
        bottom: 25px;
        right: 25px;
    }
    
    .whatsapp-btn img {
        height: 50px;
    }
    
    .section-loading {
        min-height: 250px;
    }
}

@media (max-width: 575.98px) {
    .section {
        padding: 40px 0;
    }
    
    .loading-text {
        font-size: 12px;
    }
    
    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-btn img {
        height: 45px;
    }
    
    .section-loading {
        min-height: 200px;
    }
    
    .section-loading .spinner {
        width: 35px;
        height: 35px;
    }
}
