/* ==============================================
   IMPROVED RESPONSIVE LANDING PAGE
   ============================================== */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition-theme);
    overflow-x: hidden;
}

/* Landing Hero Section - Perfect Background */
.landing-hero {
    min-height: 100vh;
    background: 
        linear-gradient(
            135deg, 
            rgba(59, 130, 246, 0.8) 0%, 
            rgba(147, 51, 234, 0.6) 50%, 
            rgba(59, 130, 246, 0.8) 100%
        ),
        url('./background.jpg') center/cover no-repeat,
        url('./DSC_7939.jpg') center/cover no-repeat,
        url('./sama.png') center/cover no-repeat,
        linear-gradient(135deg, #3b82f6, #9333ea);
    background-attachment: fixed;
    background-blend-mode: overlay;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Dark theme hero adjustments */
[data-theme="dark"] .landing-hero {
    background: 
        linear-gradient(
            135deg, 
            rgba(30, 41, 59, 0.9) 0%, 
            rgba(51, 65, 85, 0.8) 50%, 
            rgba(15, 23, 42, 0.9) 100%
        ),
        url('./background.jpg') center/cover no-repeat,
        url('./DSC_7939.jpg') center/cover no-repeat,
        url('./sama.png') center/cover no-repeat,
        linear-gradient(135deg, #1e293b, #334155);
}

/* Animated background pattern */
.landing-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    z-index: 1;
}

/* Container styles */
.landing-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
    width: 100%;
}

/* SAMA Logo */
.sama-logo {
    max-width: 400px;
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
    animation: logoFloat 6s ease-in-out infinite;
    transition: var(--transition-theme);
}

[data-theme="dark"] .sama-logo {
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5)) brightness(1.1);
}

/* Typography */
.landing-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.1;
    animation: slideInUp 1s ease-out 0.2s both;
}

[data-theme="dark"] .landing-title {
    background: linear-gradient(135deg, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-subtitle {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    animation: slideInUp 1s ease-out 0.4s both;
}

.landing-description {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.7;
    text-shadow: 0 1px 5px rgba(0,0,0,0.2);
    animation: slideInUp 1s ease-out 0.6s both;
}

/* Registration Notice */
.registration-notice {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 600px;
    animation: pulse 3s ease-in-out infinite, slideInUp 1s ease-out 0.8s both;
}

[data-theme="dark"] .registration-notice {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.registration-notice h3 {
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    margin-bottom: 1rem;
    color: #ffffff;
}

.registration-notice p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

/* Call to Action Buttons */
.landing-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    animation: slideInUp 1s ease-out 1s both;
}

.cta-button {
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-size: clamp(1rem, 2vw, 1.1rem);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    min-width: 200px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.6);
    background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.2));
}

.cta-button:active {
    transform: translateY(-2px) scale(1.02);
}

.cta-button.secondary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(147, 51, 234, 0.8));
    border-color: rgba(59, 130, 246, 0.5);
}

.cta-button.secondary:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(147, 51, 234, 0.9));
    border-color: rgba(59, 130, 246, 0.8);
}

/* Feature Cards */
.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
    animation: slideInUp 1s ease-out 1.2s both;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .feature-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6, #9333ea);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .feature-card:hover {
    background: rgba(30, 41, 59, 0.8);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6, #9333ea);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
}

.feature-title {
    font-size: clamp(1.3rem, 3vw, 1.5rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

.feature-text {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    animation: bounce 2s infinite;
    cursor: pointer;
    z-index: 3;
}

.scroll-indicator:hover {
    color: #ffffff;
}

/* Animations */
@keyframes logoFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 0 20px rgba(59, 130, 246, 0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(1deg); }
    50% { transform: translateY(-5px) rotate(0deg); }
    75% { transform: translateY(-15px) rotate(-1deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .landing-container {
        max-width: 1000px;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .landing-hero {
        background-attachment: scroll;
        min-height: 100svh; /* Use svh for better mobile support */
    }
    
    .landing-container {
        padding: 1rem;
    }
    
    .sama-logo {
        max-width: 300px;
        margin-bottom: 1.5rem;
    }
    
    .landing-cta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-button {
        width: 100%;
        max-width: 300px;
        padding: 1rem 2rem;
    }
    
    .landing-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 3rem 0;
    }
    
    .feature-card {
        padding: 2rem 1.5rem;
    }
    
    .registration-notice {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }
}

@media (max-width: 480px) {
    .landing-container {
        padding: 0.75rem;
    }
    
    .sama-logo {
        max-width: 250px;
    }
    
    .landing-features {
        margin: 2rem 0;
    }
    
    .feature-card {
        padding: 1.5rem 1rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .registration-notice {
        padding: 1rem;
    }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .landing-hero {
        background-image: 
            linear-gradient(
                135deg, 
                rgba(59, 130, 246, 0.8) 0%, 
                rgba(147, 51, 234, 0.6) 50%, 
                rgba(59, 130, 246, 0.8) 100%
            ),
            url('./background.jpg'),
            url('./DSC_7939.jpg'),
            url('./sama.png'),
            linear-gradient(135deg, #3b82f6, #9333ea);
    }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .landing-hero::before,
    .sama-logo,
    .scroll-indicator,
    .feature-icon,
    .registration-notice {
        animation: none;
    }
    
    .cta-button,
    .feature-card {
        transition: none;
    }
    
    .cta-button:hover,
    .feature-card:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .landing-hero {
        background: #3b82f6 !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    
    .scroll-indicator {
        display: none;
    }
}