/* Festival Carnival Style - Lotto Australia */

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box !important;
}

html, body {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100% !important;
}

/* Import Festive Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&family=Nunito:wght@300;400;600;700;800&display=swap');

/* Festival Carnival Color Palette */
:root {
    --festival-purple: #8B5CF6;
    --festival-pink: #EC4899;
    --festival-yellow: #FDE047;
    --festival-orange: #FB923C;
    --festival-red: #EF4444;
    --festival-green: #22C55E;
    --festival-blue: #3B82F6;
    --festival-white: #FFFFFF;
    --festival-dark: #1F2937;
    --festival-light: #F8FAFC;
    --festival-confetti: linear-gradient(45deg, var(--festival-purple), var(--festival-pink), var(--festival-yellow));
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--festival-light);
    color: var(--festival-dark);
    line-height: 1.6;
    font-weight: 400;
    position: relative;
    overflow-x: hidden;
}

/* Festive Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(253, 224, 71, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: festiveFloat 10s ease-in-out infinite;
}

@keyframes festiveFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-10px, -10px) rotate(1deg); }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Fredoka', cursive;
    font-weight: 600;
    color: var(--festival-purple);
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    background: var(--festival-confetti);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    animation: celebrationBounce 2s ease-in-out infinite;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--festival-pink);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--festival-purple);
}

p {
    margin-bottom: 1.5rem;
    color: var(--festival-dark);
    font-size: 1.1rem;
    word-wrap: break-word;
    line-height: 1.7;
}

/* Animations */
@keyframes celebrationBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-5px) scale(1.02); }
}

@keyframes confettiSpin {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-20px) rotate(360deg); }
}

@keyframes partyPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 40px rgba(236, 72, 153, 0.5);
        transform: scale(1.05);
    }
}

/* Header & Navigation - Компактный согласно ТЗ */
.header {
    background: linear-gradient(135deg, var(--festival-purple), var(--festival-pink));
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    min-height: 60px;
    max-height: 80px;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto; /* лого | пространство | бургер */
    align-items: center;
    height: 70px;
    gap: 2rem;
}

.logo {
    font-family: 'Fredoka', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--festival-white);
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    justify-content: flex-start;
}

.nav-link {
    text-decoration: none;
    color: var(--festival-white);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.nav-link:hover {
    background: rgba(253, 224, 71, 0.9);
    color: var(--festival-purple);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(253, 224, 71, 0.4);
}

/* Burger Menu - Строго справа согласно ТЗ */
.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    justify-self: end; /* Строго справа */
    margin-right: 1rem;
}

.burger span {
    width: 25px;
    height: 3px;
    background: var(--festival-white);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.burger:hover {
    background: rgba(253, 224, 71, 0.8);
    transform: scale(1.1);
}

.burger:hover span {
    background: var(--festival-purple);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--festival-purple), var(--festival-pink));
    z-index: 999;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.mobile-menu.active {
    display: block;
    animation: slideDownFestive 0.3s ease;
}

@keyframes slideDownFestive {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu .nav-link {
    display: block;
    padding: 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    font-size: 1rem;
}

/* Hero Section - С правильным padding согласно ТЗ */
.hero {
    padding: 12rem 2rem 8rem; /* Минимум 8rem + запас */
    background: linear-gradient(135deg, var(--festival-light) 0%, #FFF7ED 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '🎉🎊🎪🎨🎭';
    position: absolute;
    top: 20%;
    left: 0;
    right: 0;
    font-size: 4rem;
    opacity: 0.1;
    animation: confettiSpin 8s linear infinite;
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    animation: celebrationBounce 1.5s ease;
}

.hero h1 {
    margin-bottom: 2rem;
}

.hero p {
    font-size: 1.3rem;
    color: var(--festival-purple);
    margin-bottom: 3rem;
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 25px;
    font-family: 'Fredoka', cursive;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.5s ease;
    transform: translate(-50%, -50%);
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--festival-purple), var(--festival-pink));
    color: var(--festival-white);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(139, 92, 246, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--festival-purple);
    border: 3px solid var(--festival-purple);
}

.btn-secondary:hover {
    background: var(--festival-purple);
    color: var(--festival-white);
    transform: translateY(-3px);
}

/* Content Sections */
.section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--festival-purple);
    font-size: 1.2rem;
    font-weight: 500;
}

/* Adaptive Cards - Согласно новым правилам ТЗ */
.draws-grid, .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Автоподстройка */
    gap: 2rem;
    margin-top: 3rem;
}

.draw-card, .stat-item {
    background: var(--festival-white);
    padding: 2.5rem;
    border-radius: 20px;
    border: 3px solid transparent;
    background-clip: padding-box;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
}

.draw-card::before, .stat-item::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--festival-confetti);
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.draw-card:hover::before, .stat-item:hover::before {
    opacity: 1;
}

.draw-card:hover, .stat-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
    animation: partyPulse 1s ease-in-out;
}

.draw-date {
    font-family: 'Fredoka', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--festival-pink);
    margin-bottom: 0.5rem;
}

.draw-time {
    color: var(--festival-purple);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.draw-prize {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--festival-purple);
    font-family: 'Fredoka', cursive;
}

/* Statistics */
.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--festival-pink);
    margin-bottom: 0.5rem;
    font-family: 'Fredoka', cursive;
}

.stat-label {
    color: var(--festival-purple);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Article Content - Читаемый согласно ТЗ */
.article-content, .text-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--festival-white);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.article-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--festival-purple), var(--festival-pink), var(--festival-yellow));
    border-radius: 20px;
    z-index: -1;
}

.article-content h3 {
    color: var(--festival-purple);
    margin-bottom: 1.5rem;
}

.article-content p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Forms */
.form-container {
    max-width: 600px;
    margin: 3rem auto;
    background: var(--festival-white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.2);
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.form-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--festival-confetti);
    border-radius: 20px;
    z-index: -1;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--festival-purple);
    font-family: 'Fredoka', cursive;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 3px solid var(--festival-purple);
    border-radius: 15px;
    font-size: 1rem;
    font-family: 'Nunito', sans-serif;
    transition: all 0.3s ease;
    background: var(--festival-light);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--festival-pink);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
    background: var(--festival-white);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--festival-purple), var(--festival-pink));
    color: var(--festival-white);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-nav a {
    color: var(--festival-white);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 15px;
}

.footer-nav a:hover {
    background: rgba(253, 224, 71, 0.9);
    color: var(--festival-purple);
    transform: translateY(-2px);
}

/* Disclaimer Section - Логотипы видимы согласно ТЗ */
.disclaimer {
    background: var(--festival-light);
    padding: 3rem 2rem;
    text-align: center;
    border-top: 3px solid var(--festival-purple);
}

.disclaimer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.disclaimer p {
    color: var(--festival-dark);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.disclaimer-phone {
    font-weight: 700;
    color: var(--festival-purple);
    margin: 2rem 0;
    font-size: 1.2rem;
    font-family: 'Fredoka', cursive;
}

.disclaimer-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* Автоподстройка */
    gap: 2rem;
    margin-top: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.disclaimer-logo {
    background: var(--festival-white);
    padding: 1.5rem;
    border-radius: 15px;
    border: 3px solid var(--festival-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.2);
}

.disclaimer-logo:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
    border-color: var(--festival-pink);
}

.disclaimer-logo img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
}

/* Инверсия для светлых логотипов согласно ТЗ */
.disclaimer-logo img[src*="VictorianGovernment"],
.disclaimer-logo img[src*="reset"],
.disclaimer-logo img[src*="gamblershelp"] {
    filter: invert(1);
}

.age-badge {
    background: linear-gradient(45deg, var(--festival-purple), var(--festival-pink));
    color: var(--festival-white);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.4rem;
    margin: 2rem auto;
    border: 4px solid var(--festival-white);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    font-family: 'Fredoka', cursive;
    animation: partyPulse 2s ease-in-out infinite;
}

/* Popups */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem;
}

.popup {
    background: var(--festival-white);
    padding: 3rem;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    border: 3px solid var(--festival-purple);
    animation: celebrationBounce 0.5s ease;
}

.popup h3 {
    color: var(--festival-purple);
    margin-bottom: 1.5rem;
}

.popup p {
    color: var(--festival-dark);
    margin-bottom: 2rem;
}

.popup-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cookie-popup {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--festival-white);
    padding: 2rem;
    border-radius: 15px;
    max-width: 350px;
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.3);
    border: 3px solid var(--festival-purple);
    z-index: 9999;
    animation: slideInFromRight 0.5s ease;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cookie-popup p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--festival-dark);
}

.cookie-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cookie-buttons .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    min-width: auto;
    border-radius: 15px;
}

/* Mobile Responsiveness */
@media (max-width: 899px) {
    .nav-menu {
        display: none;
    }
    
    .burger {
        display: flex;
    }
    
    .hero {
        padding: 10rem 1rem 6rem; /* Уменьшенный padding для мобильных */
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .section {
        padding: 4rem 1rem;
    }
    
    /* Читаемые статьи на мобильных согласно ТЗ */
    .article-content, .text-content {
        width: 95%;
        padding: 1.5rem;
        font-size: 16px;
        line-height: 1.6;
    }
    
    .article-content h1, .article-content h2 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .article-content h3 {
        font-size: 1.4rem;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cookie-popup {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 1rem;
        grid-template-columns: auto 1fr auto;
        justify-items: center;
    }
    
    .burger {
        justify-self: end;
        margin-right: 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 9rem 1rem 5rem; /* Минимальный padding для очень малых экранов */
    }
    
    .form-container {
        margin: 2rem 1rem;
        padding: 2rem 1.5rem;
    }
}

/* Horizontal Scroll Protection */
html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

* {
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word;
}

/* Viewport meta enforcement */
@media screen and (max-width: 100vw) {
    body {
        width: 100vw;
        overflow-x: hidden !important;
    }
}
