/**
 * Text Overlays Styles
 * CSS cho text overlays trên các section
 * 
 * @package SCode_Theme
 */

/* Text Overlay Base */
.text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}

.text-overlay-content {
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 20px;
    pointer-events: auto;
}

/* Text Overlay Typography */
.text-overlay-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.text-overlay-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #f0f0f0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.text-overlay-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #e0e0e0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Text Overlay Button */
.text-overlay-button {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.text-overlay-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.4);
    background: linear-gradient(135deg, #f7931e, #ff6b35);
    color: white;
    text-decoration: none;
}

.text-overlay-button:active {
    transform: translateY(-1px);
}

/* Section-specific Text Overlay Styles */
.flash-sale .text-overlay-title {
    color: #ff4757;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.flash-sale .text-overlay-button {
    background: linear-gradient(135deg, #ff4757, #ff3838);
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.3);
}

.flash-sale .text-overlay-button:hover {
    background: linear-gradient(135deg, #ff3838, #ff4757);
    box-shadow: 0 12px 35px rgba(255, 71, 87, 0.4);
}

.robot-vacuum-mop .text-overlay-title {
    color: #ff6b35;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.robot-vacuum-mop .text-overlay-button {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

.vacuum-handheld .text-overlay-title {
    color: #ffa726;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.vacuum-handheld .text-overlay-button {
    background: linear-gradient(135deg, #ffa726, #ff9800);
    box-shadow: 0 8px 25px rgba(255, 167, 38, 0.3);
}

.xiaomi-tv-banner .text-overlay-title {
    color: #ff9800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.xiaomi-tv-banner .text-overlay-button {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.3);
}

.air-purifier-banner .text-overlay-title {
    color: #00bcd4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.air-purifier-banner .text-overlay-button {
    background: linear-gradient(135deg, #00bcd4, #0097a7);
    box-shadow: 0 8px 25px rgba(0, 188, 212, 0.3);
}

.services-section .text-overlay-title {
    color: #4caf50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.services-section .text-overlay-button {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .text-overlay-content {
        padding: 15px;
        max-width: 90%;
    }
    
    .text-overlay-title {
        font-size: 2.2rem;
        margin-bottom: 0.8rem;
    }
    
    .text-overlay-subtitle {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    .text-overlay-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .text-overlay-button {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .text-overlay-content {
        padding: 10px;
    }
    
    .text-overlay-title {
        font-size: 1.8rem;
        margin-bottom: 0.6rem;
    }
    
    .text-overlay-subtitle {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }
    
    .text-overlay-description {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
    }
    
    .text-overlay-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-overlay-content {
    animation: fadeInUp 0.8s ease-out;
}

/* Hover Effects */
.text-overlay:hover .text-overlay-title {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.text-overlay:hover .text-overlay-button {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* Loading State */
.text-overlay.loading {
    opacity: 0.7;
}

.text-overlay.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
