/* 1. Global & Background */
body { 
    margin: 0; 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
    color: #111827; 
    line-height: 1.6; 
    overflow-x: hidden; 
    
    background-color: #f1f3f0; 
    
    background-image: 
        url("/static/circuit.svg"), 
        radial-gradient(circle at center, rgba(17, 24, 39, 0) 0%, rgba(17, 24, 39, 0.05) 100%);
    
    background-repeat: repeat, no-repeat;
    background-attachment: fixed, fixed;
    
    animation: fadeInPage 0.4s ease-out;
}

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

.icon-sm { font-size: 18px; vertical-align: text-bottom; }
.icon-md { font-size: 24px; vertical-align: middle; color: #3b82f6; }

/* --- Text Selection Control --- */

img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-select: none;
}

header, 
.btn-nav, 
.lang-switcher {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.material-symbols-outlined {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}

::selection {
    background: #3b82f6; 
    color: #ffffff;
}

::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9; 
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1; 
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3b82f6; 
}

/* 2. Header & Navigation */
header { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); padding: 15px 50px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e2e8f0; }
.logo-container { display: flex; align-items: center; gap: 12px; font-size: 24px; letter-spacing: -0.5px; z-index: 1001; text-transform: uppercase; transition: transform 0.2s ease; }
.logo-container:hover { transform: scale(1.03); }
.logo-container img { height: 42px; object-fit: contain; }
.logo-text-dark { font-weight: 900; color: #111827; } .logo-text-blue { font-weight: 900; color: #3b82f6; }
.nav-links { display: flex; align-items: center; gap: 40px; }
nav a { position: relative; text-decoration: none; color: #475569; font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; transition: color 0.2s; } nav a:hover { color: #111827; }
nav a:not(.btn-nav):not(.lang-btn)::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: #3b82f6; transition: width 0.3s ease; }
nav a:not(.btn-nav):not(.lang-btn):hover::after { width: 100%; }
.hamburger { display: none; cursor: pointer; color: #111827; z-index: 1001; }

/* 3. Buttons & Controls */
.btn-nav { background: #3b82f6; color: white !important; padding: 10px 28px; border-radius: 6px; transition: all 0.2s; font-weight: 700; border: none; }
.btn-nav:hover { background: #2563eb; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }

/* Hero Section Buttons */
.hero-buttons { display: flex; flex-direction: column; align-items: center; gap: 15px; margin-top: 20px; }
    
.btn-hero-primary { 
    display: inline-block; 
    background: #111827; 
    color: white !important; 
    padding: 20px 50px; 
    border-radius: 8px; 
    font-weight: 800; 
    font-size: 18px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    text-decoration: none; 
    transition: all 0.2s; 
    cursor: pointer; 
    border: 2px solid #111827; 
    box-shadow: 6px 6px 0px rgba(59, 130, 246, 0.4); 
}
.btn-hero-primary:hover { 
    background: white; 
    color: #111827 !important; 
    transform: translate(-3px, -3px); 
    box-shadow: 9px 9px 0px rgba(59, 130, 246, 0.6); 
}
.btn-hero-primary:active { 
    transform: translate(2px, 2px); 
    box-shadow: 2px 2px 0px rgba(59, 130, 246, 0.4); 
}

.btn-hero-secondary { 
    display: inline-block; 
    color: #64748b !important; 
    font-size: 14px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    text-decoration: none; 
    padding: 5px 20px; 
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}
.btn-hero-secondary:hover { 
    color: #3b82f6 !important; 
    border-bottom: 2px solid #3b82f6;
}

.btn-nav:active { transform: translateY(2px); box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2); }

/* 4. Language Switcher */
.lang-switcher { display: flex; align-items: center; background: #f1f5f9; padding: 4px; border-radius: 6px; margin-left: 10px; border: 1px solid #e2e8f0; }
.lang-btn { text-decoration: none !important; color: #64748b !important; font-size: 13px !important; font-weight: 700 !important; padding: 6px 14px !important; border-radius: 4px; transition: all 0.2s ease !important; }
.lang-btn:hover { color: #111827 !important; }
.lang-btn.active { background: white; color: #3b82f6 !important; box-shadow: 0 1px 3px rgba(0,0,0,0.1); border: 1px solid #e2e8f0; }

/* 5. Layout & Sections */
section { max-width: 1100px; margin: 0 auto 100px; padding: 0 20px; }
h2.section-title { font-size: 42px; text-align: center; margin-bottom: 50px; color: #111827; font-weight: 900; letter-spacing: -1px; text-transform: uppercase; }

/* 6. Hero Section */
#hero { text-align: center; padding: 40px 20px; min-height: calc(100vh - 75px); display: flex; flex-direction: column; justify-content: center; align-items: center; box-sizing: border-box; }
.badge { display: inline-block; background: rgba(59, 130, 246, 0.1); color: #3b82f6; font-weight: 800; font-size: 14px; padding: 6px 16px; border-radius: 4px; margin-bottom: 20px; border: 1px solid #3b82f6; font-family: monospace; letter-spacing: 1px; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); } }
#hero h1 { margin-top: 0; font-size: 84px; margin-bottom: 20px; color: #111827; font-weight: 900; line-height: 1; letter-spacing: -2px; text-transform: uppercase; }
.text-gradient { background: linear-gradient(90deg, #3b82f6, #eab308); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
#hero p.subtitle { font-size: 18px; color: #475569; margin-bottom: 30px; max-width: 700px; }
.hero-meta { display: flex; justify-content: center; align-items: center; gap: 15px; margin-bottom: 40px; color: #475569; font-weight: 600; font-size: 15px; flex-wrap: wrap; text-transform: uppercase; }
.hero-meta .dot { color: #cbd5e1; }

/* 7. Micro-Story (About) */
.story-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.story-block { background: white; padding: 35px; border-radius: 8px; border: 1px solid #cbd5e1; transition: transform 0.2s; box-shadow: 4px 4px 0px rgba(17, 24, 39, 0.05); }
.story-block:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0px rgba(59, 130, 246, 0.15); border-color: #3b82f6; }
.story-block h3 { color: #111827; font-size: 20px; margin-top: 0; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; text-transform: uppercase; }
.story-block p { font-size: 16px; color: #475569; margin: 0; }
.story-block.full { grid-column: 1 / -1; background: #f8fafc; border-left: 4px solid #3b82f6; }

/* 8. Formats & Disciplines */
.cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.card { background: white; border-radius: 8px; padding: 35px; border: 1px solid #cbd5e1; box-shadow: 4px 4px 0px rgba(17, 24, 39, 0.05); transition: all 0.2s ease; display: flex; flex-direction: column; }
.card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0px rgba(59, 130, 246, 0.15); border-color: #3b82f6; }
.card-icon { margin-bottom: 20px; display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; background: #eff6ff; border-radius: 8px; border: 1px solid #bfdbfe; transition: all 0.3s ease; }
.card:hover .card-icon { transform: scale(1.1) rotate(5deg); background: #bfdbfe; border-color: #3b82f6; box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2); }
.card h3 { margin: 0 0 15px 0; font-size: 24px; color: #111827; text-transform: uppercase; font-weight: 800; }
.card p { margin: 0 0 20px 0; color: #475569; font-size: 15px; flex-grow: 1; }

/* 9. Schedule */
.schedule-grid-new { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; align-items: stretch; }
.schedule-day-card { background: white; border-radius: 8px; padding: 25px; border: 1px solid #cbd5e1; box-shadow: 4px 4px 0px rgba(17, 24, 39, 0.05); display: flex; flex-direction: column; height: 100%; box-sizing: border-box; }
.day-header { display: inline-flex; align-items: center; gap: 8px; background: white; color: #3b82f6; padding: 6px 16px; border-radius: 4px; font-weight: 700; font-size: 14px; margin-bottom: 20px; align-self: flex-start; border: 1px solid #3b82f6; text-transform: uppercase; }
.event-row { display: flex; align-items: center; padding: 15px 20px; background-color: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; margin-bottom: 12px; transition: border-color 0.2s, background 0.2s; }
.event-row:hover { border-color: #94a3b8; background-color: #f1f5f9; }
.event-row:last-child { margin-bottom: 0; }
.event-time { color: #111827; font-weight: 700; width: 140px; flex-shrink: 0; font-size: 14px; display: flex; align-items: center; gap: 8px; font-family: monospace; }
.event-desc { color: #334155; font-size: 15px; font-weight: 500; }

/* 10. Entities (Organizers & Participants) */
.entities-grid { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.entity-link { text-decoration: none; display: block; transition: transform 0.2s; } .entity-link:hover { transform: translateY(-5px); }
.entity-card { display: flex; flex-direction: column; align-items: center; gap: 15px; width: 180px; }
.entity-logo-wrapper { width: 120px; height: 120px; border-radius: 50%; background: white; display: flex; align-items: center; justify-content: center; border: 2px solid #e2e8f0; transition: border-color 0.2s, box-shadow 0.2s; }
.entity-link:hover .entity-logo-wrapper { border-color: #3b82f6; box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15); }
.entity-logo-wrapper img { max-width: 80px; max-height: 80px; object-fit: contain; filter: grayscale(100%); opacity: 0.6; transition: all 0.3s ease; }
.entity-name { font-size: 14px; font-weight: 700; color: #475569; text-align: center; line-height: 1.3; text-transform: uppercase; } 
.entity-link:hover .entity-name { color: #111827; }
.entity-link:hover .entity-logo-wrapper img { filter: grayscale(0%); opacity: 1; }

/* 11. Sponsors */
.sponsors-grid { display: flex; justify-content: center; gap: 60px; flex-wrap: wrap; align-items: center; padding: 20px 0; }
.sponsor-link { display: block; transition: transform 0.2s, filter 0.2s; filter: grayscale(100%); opacity: 0.6; }
.sponsor-link:hover { transform: scale(1.05); filter: grayscale(0%); opacity: 1; }
.sponsor-link img { max-width: 200px; max-height: 70px; object-fit: contain; }

/* 12. Footer */
.site-footer { background-color: #111827; color: #f8fafc; padding: 60px 20px 40px; margin-top: 100px; font-size: 14px; border-top: 4px solid #3b82f6; }
.footer-container { max-width: 1250px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 40px; }
.footer-col h4 { font-size: 16px; font-weight: 800; margin-bottom: 20px; color: white; letter-spacing: 1px; text-transform: uppercase; }
.footer-col p { color: #94a3b8; line-height: 1.6; margin-bottom: 12px; } .footer-col span.icon { color: #3b82f6; margin-right: 8px; }
.footer-org-block { display: flex; align-items: center; justify-content: flex-start; gap: 20px; margin-top: 5px; }
.footer-org-text { color: #94a3b8; line-height: 1.6; text-align: left; } .footer-kmad-link { flex-shrink: 0; }
.footer-kmad-logo { height: 55px; width: auto; background: white; border-radius: 50%; padding: 4px; transition: transform 0.2s; }
.footer-kmad-link:hover .footer-kmad-logo { transform: scale(1.08); }

/* Center Odd Last Elements */
.cards-grid > .card:last-child:nth-child(odd),
.schedule-grid-new > .schedule-day-card:last-child:nth-child(odd) {
    grid-column: 1 / -1; 
    width: calc(50% - 15px); 
    margin: 0 auto; 
}

/* 13. Responsive Design */
@media (max-width: 768px) {
    header { padding: 15px 20px; } .hamburger { display: block; }
    .nav-links { position: fixed; top: 72px; right: -100%; width: 100%; height: calc(100vh - 72px); background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px); flex-direction: column; align-items: center; padding-top: 50px; transition: right 0.3s ease; gap: 30px; border-top: 1px solid #e2e8f0; }
    .nav-links.active { right: 0; } .nav-links a { font-size: 20px; width: 100%; text-align: center; } 
    .btn-nav { text-align: center; width: 80%; max-width: 300px; padding: 15px; }
    .lang-switcher { margin: 0; width: auto; justify-content: center; padding: 6px; } .lang-btn { padding: 10px 30px !important; font-size: 16px !important; }
    #hero { min-height: auto; }
    #hero h1 { font-size: 50px; } .cards-grid, .schedule-grid-new, .story-container { grid-template-columns: 1fr; } .footer-container { grid-template-columns: 1fr; }
    .cards-grid > .card:last-child:nth-child(odd), .schedule-grid-new > .schedule-day-card:last-child:nth-child(odd) { width: 100%; }
    .footer-org-block { flex-direction: column; align-items: flex-start; text-align: left; }
}