/* Dynamic Home Page Styles - With Higher Specificity */

/* Reset and base styles */
body:has(.dynamic-home-container) {
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

body:has(.dynamic-home-container) main {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Override old home container styles */
.dynamic-home-container .home-container {
    display: block !important;
    min-height: auto !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
    gap: 0 !important;
}

/* Main container */
.dynamic-home-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

/* Gradient background system */
.gradient-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.gradient-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.gradient-layer.active {
    opacity: 1;
}

/* Individual gradient definitions */
.gradient-alexandria {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-justtalk {
    background: linear-gradient(135deg, #8B5CF6 0%, #EF4444 100%);
}

.gradient-social {
    background: linear-gradient(135deg, #6772e5 0%, #1a1f36 100%);
}

.gradient-misc {
    background: linear-gradient(135deg, #000000 0%, #1a237e 100%);
}

/* Sections wrapper */
.home-sections-wrapper {
    position: relative;
    z-index: 1;
}

/* Individual sections - Override existing styles */
.dynamic-home-container .home-section {
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2rem !important;
    position: relative !important;
    flex: none !important;
    max-width: none !important;
    height: auto !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    cursor: default !important;
    overflow: visible !important;
    transform: none !important;
    text-decoration: none !important;
}

.dynamic-home-container .home-section:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

/* Section container for centering */
.section-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Section content - Override existing styles - FIXED POSITION */
.dynamic-home-container .section-content {
    text-align: center !important;
    color: white !important;
    width: 100% !important;
    padding: 2rem !important;
    position: relative !important;
    z-index: auto !important;
    display: block !important;
    flex-direction: initial !important;
    align-items: initial !important;
    justify-content: initial !important;
    height: auto !important;
    transform: none !important; /* Keep content fixed */
}

/* Typography - Large and centered - Override existing */
.dynamic-home-container .section-main-title,
.dynamic-home-container .section-title {
    font-size: 6rem !important;
    font-weight: 700 !important;
    margin-bottom: 2rem !important;
    letter-spacing: -0.03em !important;
    text-shadow: 0 6px 30px rgba(0, 0, 0, 0.3) !important;
    line-height: 1 !important;
    opacity: 0;
    animation: fadeInScale 0.8s ease-out 0.2s forwards;
    animation-fill-mode: forwards; /* Keep final state */
    color: white !important;
    position: static !important;
    display: block !important;
    transition: none !important;
}

.dynamic-home-container .section-tagline {
    font-size: 2rem !important;
    font-style: italic !important;
    margin-bottom: 2.5rem !important;
    font-weight: 300 !important;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.25) !important;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    animation-fill-mode: forwards; /* Keep final state */
    line-height: 1.3 !important;
    color: rgba(255, 255, 255, 0.95) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    height: auto !important;
    display: block !important;
    align-items: initial !important;
    justify-content: initial !important;
    text-align: center !important;
}

.section-description {
    font-size: 1.3rem;
    line-height: 1.8;
    max-width: 650px;
    margin: 0 auto 3rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    animation-fill-mode: forwards; /* Keep final state */
    font-weight: 400;
}

/* CTA Buttons */
.section-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.3rem 3rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 60px;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.02em;
}

.section-cta-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    /* Shadow removed - no box-shadow on hover */
}

.section-cta-button .arrow-icon {
    transition: transform 0.3s ease;
}

.section-cta-button:hover .arrow-icon {
    transform: translateX(6px);
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.scroll-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.scroll-dot.active {
    background: white;
    transform: scale(1.4);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

.scroll-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

/* Add tooltips to scroll dots */
.scroll-dot::after {
    content: attr(data-target);
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    text-transform: capitalize;
}

.scroll-dot:hover::after {
    opacity: 1;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Section visibility states */
.home-section.visible .section-content {
    opacity: 1;
}

/* Subtle entrance animation for sections */
.home-section {
    transition: opacity 0.5s ease;
}

.home-section.visible {
    opacity: 1;
}

/* Responsive design - Override existing media queries */
@media (max-width: 1200px) {
    .dynamic-home-container .section-main-title,
    .dynamic-home-container .section-title {
        font-size: 5rem !important;
    }
    
    .dynamic-home-container .section-tagline {
        font-size: 1.8rem !important;
    }
    
    .dynamic-home-container .section-description {
        font-size: 1.2rem !important;
    }
}

@media (max-width: 968px) {
    .dynamic-home-container .section-main-title,
    .dynamic-home-container .section-title {
        font-size: 4.5rem !important;
    }
    
    .dynamic-home-container .section-tagline {
        font-size: 1.6rem !important;
    }
    
    .dynamic-home-container .section-description {
        font-size: 1.15rem !important;
    }
    
    .scroll-indicator {
        right: 2rem;
    }
}

@media (max-width: 768px) {
    .dynamic-home-container .home-section {
        padding: 2rem 1rem !important;
        height: auto !important;
    }
    
    .dynamic-home-container .section-main-title,
    .dynamic-home-container .section-title {
        font-size: 3.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .dynamic-home-container .section-tagline {
        font-size: 1.4rem !important;
        margin-bottom: 2rem !important;
    }
    
    .dynamic-home-container .section-description {
        font-size: 1.1rem !important;
        margin-bottom: 2.5rem !important;
    }
    
    .section-cta-button {
        padding: 1.1rem 2.5rem;
        font-size: 1.1rem;
    }
    
    .scroll-indicator {
        right: 1.5rem;
    }
    
    .scroll-dot {
        width: 10px;
        height: 10px;
    }
    
    .scroll-dot::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .dynamic-home-container .home-section {
        padding: 2rem 1rem !important;
        height: auto !important;
    }
    
    .dynamic-home-container .section-main-title,
    .dynamic-home-container .section-title {
        font-size: 2.8rem !important;
        margin-bottom: 1.2rem !important;
    }
    
    .dynamic-home-container .section-tagline {
        font-size: 1.2rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .dynamic-home-container .section-description {
        font-size: 1rem !important;
        margin-bottom: 2rem !important;
        padding: 0 0.5rem !important;
    }
    
    .dynamic-home-container .section-cta-button {
        padding: 1rem 2rem !important;
        font-size: 1rem !important;
    }
    
    .dynamic-home-container .home-section {
        padding: 2rem 1rem !important;
    }
    
    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 380px) {
    .dynamic-home-container .section-main-title,
    .dynamic-home-container .section-title {
        font-size: 2.3rem !important;
    }
    
    .dynamic-home-container .section-tagline {
        font-size: 1.1rem !important;
    }
    
    .dynamic-home-container .section-description {
        font-size: 0.95rem !important;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Content stays fixed - no parallax or movement */
.section-content {
    will-change: auto !important; /* Disable movement optimization */
    transition: none !important; /* No transition effects */
    transform: none !important; /* Keep content fixed */
}

/* Loading state optimization */
.gradient-layer {
    will-change: opacity;
}

/* Performance optimization */
.home-section {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Enhanced focus states for accessibility */
.section-cta-button:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 4px;
}

.scroll-dot:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 3px;
}

/* Print styles */
@media print {
    .gradient-background,
    .scroll-indicator {
        display: none;
    }
    
    .home-section {
        page-break-after: always;
        min-height: auto;
        background: white !important;
    }
    
    .section-content {
        color: black !important;
    }
}