/* 
 * Playground Youth Work - Global Styles
 * Theme: Energetic and playful, professionally balanced.
 * Palette: Primary Blue (#004494), White (#FFFFFF), Accent Yellow (#FFD700), Accent Green (#28A745)
 */

:root {
    --primary-blue: #004494;
    --primary-blue-dark: #003377;
    --accent-yellow: #FFD700;
    --playful-yellow: #FFD54F;
    /* New Playful Yellow */
    --accent-green: #28A745;
    --blob-blue: #E1F5FE;
    /* New Blob Blue */
    --border-blue: #99CCFF;
    --text-color: #333333;
    --bg-light: #E6F3FF;
    --white: #FFFFFF;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --spacing: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden !important;
    position: relative;
    max-width: 100vw;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-green);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing);
    width: 100%;
    box-sizing: border-box;
}

/* Header & Nav */
header {
    background-color: var(--primary-blue);
    /* Changed to blue as requested */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 100px;
    /* Thinner white line */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    /* Context for absolute logo */
    height: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Allow logo to overlap */
    position: absolute;
    top: 10px;
    /* Adjust as needed */
    left: 20px;
    /* Keep alignment */
    z-index: 1001;
}

.logo-img {
    height: 220px !important;
    /* Slightly larger, override inline */
    max-width: none;
    border-radius: 50%;
    /* Make background transparent/circular */
    transition: transform 0.3s ease;
    cursor: pointer;
}

.logo-img:hover {
    transform: scale(1.05);
    /* Grow on hover */
}

nav {
    margin-left: auto;
    /* Push nav to right since logo is absolute */
    padding-right: 20px;
}

nav ul {
    display: flex;
    gap: 20px;
}

nav a {
    font-weight: 700;
    color: var(--white);
    /* White text on blue header */
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

nav a::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Home */
nav a[href*="index"]::before {
    content: '';
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI0ZGRDU0RiI+PHBhdGggZD0iTTEyIDNMMiAxMmgzdjhoNnYtNmgydjZoNnYtOGgzTDEyIDN6Ii8+PC9zdmc+");
}

/* Partners (Consortium) - Collaboration Icon */
nav a[href*="partners"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFD54F'%3E%3Cpath d='M20 6h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-6 0h-4V4h4v2z'/%3E%3C/svg%3E");
}

/* Videos (Video Camera Icon) */
nav a[href*="videos"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFD54F'%3E%3Cpath d='M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z'/%3E%3C/svg%3E");
}

/* Curriculum (Book) */
nav a[href*="curriculum"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFD54F'%3E%3Cpath d='M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z'/%3E%3C/svg%3E");
}

/* News (Newspaper) */
nav a[href*="news"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFD54F'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 13H5v-2h10v2zm0-4H5v-2h10v2zm4 4h-2v-2h2v2zm0-4h-2v-2h2v2zM5 8h14V6H5v2z'/%3E%3C/svg%3E");
}

/* Contact (Envelope) */
nav a[href*="contact"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFD54F'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}

nav a:hover,
nav a.active {
    background-color: var(--accent-green);
    color: var(--white);
}

/* Mobile Nav Toggle */
/* Mobile Nav Toggle */
.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--white);
    z-index: 10001;
    /* Above overlay */
}

/* Hero Section */
/* Hero Section */
/* Hero Section New Design */
.hero {
    background-color: #E6F3FF;
    /* Sky Blue */
    /* removed radial-gradients */
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 50/50 Split */
    gap: 40px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    align-items: center;
}

/* Left Side - Text */
.hero-text-side {
    text-align: left;
}

.hero-text-side h1 {
    color: var(--primary-blue-dark);
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-text-side p {
    font-size: 1.15rem;
    color: var(--text-color);
    margin-bottom: 20px;
    max-width: 500px;
}

/* Right Side - White Blob */
.hero-blob-side {
    background: var(--white);
    padding: 50px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    /* More organic blob */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    position: relative;
}

.hero-blob-side h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.hero-blob-side h3 .star {
    color: var(--primary-blue);
    margin-left: 5px;
}

.hero-objectives {
    list-style: none;
    margin-top: 20px;
}

.hero-objectives li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    text-align: left;
}

.hero-objectives li::before {
    content: '★';
    color: var(--playful-yellow);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

/* 3D Blocks Decoration */
.hero-deco {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.block {
    position: absolute;
    width: 80px;
    height: 80px;
    background-image: url('../assets/lego-block.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    mix-blend-mode: screen;
    /* Fix for black bg */
}

.block-blue {
    filter: hue-rotate(200deg);
    /* Shift yellow to blue */
    top: 20%;
    left: 10%;
    transform: rotate(-10deg);
}

.block-yellow {
    /* Native color */
    bottom: 20%;
    left: 20%;
    width: 100px;
    height: 100px;
    /* Larger */
    transform: rotate(10deg);
}

.block-white {
    filter: grayscale(100%) brightness(200%);
    /* Make white/bright */
    top: 50%;
    left: 5%;
    width: 60px;
    height: 60px;
    transform: rotate(5deg);
    opacity: 0.9;
}

@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
    }

    .hero-content-box {
        margin: 20px;
        padding: 40px;
        border-radius: 30px;
    }

    .block {
        display: none;
    }
}

/* Sections */
.section {
    padding: 4rem 0;
}

/* Cards */
.playful-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid var(--border-blue);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.playful-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.news-card {
    background: var(--white);
    border-radius: 20px;
    /* overflow: hidden; Removed to allow internal spacing */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 2px solid var(--border-blue);
    padding: 15px;
    /* Added whitespace around content */
}

.news-card img {
    border-radius: 12px;
    /* Smooth corners for the image inside */
    width: 100%;
    height: 200px;
    /* Force height for consistency? Or auto? Let's check main.js rendering */
    object-fit: cover;
    margin-bottom: 10px;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
    color: var(--primary-blue);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 6px;
    background-color: var(--accent-green);
    border-radius: 10px;
    /* Soft rounded line */
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--playful-yellow);
    /* new playful yellow */
    color: var(--primary-blue);
    /* high contrast text */
    padding: 15px 40px;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 800;
    /* Bold/Friendly */
    font-size: 1.1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    /* Sunny glow */
}

.btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
    color: var(--primary-blue);
}

/* Footer */
footer {
    background-color: var(--primary-blue-dark);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
    margin-top: auto;
}

.eu-disclaimer {
    max-width: 800px;
    margin: 0 auto;
    font-size: 0.9rem;
    opacity: 0.8;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    margin-top: 2rem;
}

.footer-logos img {
    height: 80px;
    /* Decreased to 80px */
    margin: 0 10px;
    display: inline-block;
    background: white;
    /* Enforce visibility for transparent PNGs on dark bg */
    padding: 5px;
    border-radius: 4px;
}

/* Contact Page */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    /* Center vertically */
    max-width: 1000px;
    margin: 0 auto;
}

.contact-form-card {
    background: var(--white);
    border: 2px solid var(--border-blue);
    /* Light border */
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.contact-info-side {
    display: flex;
    align-items: center;
    gap: 20px;
}

.envelope-icon {
    width: 80px;
    height: 80px;
    fill: var(--primary-blue);
    /* Blue Icon */
}

/* Responsive */
@media (max-width: 768px) {
    .contact-layout {
        grid-template-columns: 1fr;
        /* Stack on mobile */
        gap: 40px;
        text-align: center;
    }

    .contact-info-side {
        flex-direction: column;
        justify-content: center;
    }

    .menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
        text-align: center;
    }

    nav ul.show {
        display: flex;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .header-inner {
        flex-wrap: wrap;
    }
}

/* Playful Icons Animation */
@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

.playful-icon {
    position: absolute;
    z-index: 1;
    /* Behind text (z-index 2) */
    pointer-events: none;
    opacity: 0.6;
}

/* =========================================
   DEEP STRUCTURAL MOBILE FIX (STRICT)
   ========================================= */

html,
body {
    overflow-x: hidden !important;
    position: relative;
    max-width: 100vw;
}

@media (max-width: 768px) {

    /* Force Responsive Width for Major Containers */
    .hero-blob-right,
    .hero-text-side,
    .hero-top p,
    .hero-split,
    .hero-content-box {
        width: 90% !important;
        max-width: 90% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    /* Reset Flex/Grid for Mobile Stack */
    .hero-container,
    .hero-split {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        padding: 0 !important;
        gap: 20px !important;
    }

    /* Hamburger Menu Priority */
    .menu-toggle {
        display: block !important;
        position: absolute !important;
        right: 20px !important;
        top: 30px !important;
        /* Aligned with logo center roughly */
        z-index: 9999 !important;
        color: white !important;
    }

    /* Logo Resize & positioning */
    .header-inner {
        justify-content: flex-start !important;
        padding: 0 10px !important;
    }

    .logo-container {
        position: static !important;
        margin: 0 !important;
        padding: 10px !important;
    }

    .logo-img {
        max-width: 150px !important;
        height: auto !important;
        margin: 0 !important;
    }

    /* Text Wrapping Fixes */
    .hero-top h1 {
        font-size: 24px !important;
        /* Prevent overlap */
        line-height: 1.2 !important;
        padding: 0 10px !important;
    }

    .section-title {
        font-size: 28px !important;
    }

    /* Ensure Nav Overlay works with new toggle z-index */
    /* Updated Mobile Navigation */
    nav {
        position: static !important;
        /* Let UL take over fixed pos */
    }

    nav ul {
        display: none !important;
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100vw !important;
        height: 100vh !important;
        background-color: var(--primary-blue) !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 30px !important;
        z-index: 10000 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    nav ul.show {
        display: flex !important;
    }

    nav a {
        color: var(--white) !important;
        font-size: 1.5rem !important;
        font-weight: bold !important;
        padding: 10px 30px !important;
        display: block !important;
        text-align: center !important;
        width: 100%;
    }

    nav a:hover,
    nav a:active {
        background-color: var(--playful-yellow) !important;
        color: var(--primary-blue-dark) !important;
    }

    /* Close Button Styling */
    .close-menu {
        position: absolute;
        top: 25px;
        right: 25px;
        font-size: 2.5rem;
        color: var(--white);
        /* Dark from Logo */
        background: transparent;
        border: none;
        cursor: pointer;
        line-height: 1;
        z-index: 10001;
    }

    /* Generalized Width Fix for All Pages */
    .section,
    main {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 20px !important;
        box-sizing: border-box !important;
    }

    .contact-layout,
    .contact-form-card,
    .news-card,
    .partner-card,
    .video-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    /* Ensure Header Inner allows Row layout for Logo/Burger */
    .header-inner {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 20px !important;
    }

    .hero-container,
    .hero-split {
        /* Keep previous stack rule */
        width: 90% !important;
    }
}