:root {
    /* Colors derived from Expo2025 JPAA inspiration */
    --color-navy: #121334;     /* Deep navy for strong contrast */
    --color-teal: #8ADCD5;     /* Light, airy teal accent */
    --color-teal-light: #C9F1EE;
    --color-blue: #1473C2;     /* Corporate blue for action buttons */
    --color-blue-hover: #0c5694;
    --color-bg-start: #f8fdfe;
    --color-bg-end: #e6f6f9;
    --color-white: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;
    
    /* Pop Typography */
    --font-sans: 'Zen Maru Gothic', sans-serif;
    --font-heading: 'M PLUS Rounded 1c', sans-serif;
    --font-num: 'Fredoka', sans-serif;

    /* Pop Spacing & Borders (Rounder) */
    --border-radius-lg: 60px;
    --border-radius-md: 30px;
    --border-radius-pill: 100px;
    --shadow-soft: 0 20px 40px rgba(18, 19, 52, 0.08);
    --shadow-hover: 0 30px 60px rgba(18, 19, 52, 0.15);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent global horizontal scroll */
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: linear-gradient(180deg, var(--color-bg-start) 0%, var(--color-bg-end) 100%);
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    width: 100%; /* Explicitly set width to prevent scroll issues */
}

h1, h2, h3, h4, .hero-tag {
    font-family: var(--font-heading);
    color: var(--color-navy);
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; }

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.text-center { text-align: center; }
.text-accent { color: var(--color-blue); }

.section {
    padding: 80px 0;
    position: relative;
    overflow: hidden; /* Prevent background decor from causing scroll issues */
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-family: var(--font-heading);
    font-weight: 900;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
    color: var(--color-navy);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--color-teal);
    border-radius: 2px;
}

.section-desc {
    font-size: 1.2rem;
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Base Card Style */
.card {
    background: var(--color-white);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-blue);
    color: var(--color-white);
    padding: 16px 40px;
    border-radius: var(--border-radius-pill);
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid var(--color-blue);
    cursor: pointer;
}

.btn:hover {
    background: var(--color-blue-hover);
    border-color: var(--color-blue-hover);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(20, 115, 194, 0.4);
}

.btn:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-outline {
    background: transparent;
    color: var(--color-blue);
}

.btn-outline:hover {
    background: var(--color-blue);
    color: var(--color-white);
}

.btn-sm {
    padding: 10px 24px;
    font-size: 0.95rem;
}

.btn-large {
    padding: 20px 60px;
    font-size: 1.3rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: background 0.3s ease;
}

.blur-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.5);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-num);
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--color-navy);
}

.header-logo {
    height: 60px;
    width: auto;
    display: block;
    object-fit: contain;
}

@media (max-width: 768px) {
    .header-logo {
        height: 32px; /* Further reduced to ensure space for button */
        max-width: 180px; /* Prevent long logo from pushing button out */
    }
    .header-container {
        padding: 0 10px !important; /* Force tight padding on mobile monitor */
    }
    .header .btn-sm {
        display: none !important; /* Hide original button in header on mobile to avoid cutoff */
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    padding-bottom: 60px;
    /* Slightly softer overlay to reveal more of the background image */
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%), url('../images/Gemini_Generated_Image1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll; /* Change from fixed to scroll for better mobile compatibility */
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 720px; /* Increased slightly to prevent accidental wrapping of title lines on wide monitors */
    position: relative;
    z-index: 2;
    padding: 30px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: var(--border-radius-md);
}

@media (max-width: 900px) {
    .hero {
        background-position: center;
        /* Mobile needs more overlay to keep text readable over the entire image */
        background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%), url('../images/Gemini_Generated_Image1.png');
    }
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
        background: transparent;
        backdrop-filter: none;
    }
}

.hero-tag {
    display: inline-block;
    background: var(--color-teal-light);
    color: var(--color-navy);
    padding: 8px 16px;
    border-radius: var(--border-radius-pill);
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 24px;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-light);
    margin-bottom: 40px;
    line-height: 1.8;
}

/* Local Navigation */
.local-nav {
    background: var(--color-white);
    padding: 20px 0;
    box-shadow: 0 10px 30px rgba(18, 19, 52, 0.05);
    position: relative;
    z-index: 10;
}

.local-nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

@media (min-width: 1000px) {
    .local-nav-container {
        flex-wrap: nowrap;
    }
}

.local-nav .btn {
    flex: 1 1 auto;
    text-align: center;
    white-space: nowrap;
    padding: 14px 20px;
    font-size: 1rem;
}

/* Decor Elements for Background */
.bg-decor {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: float 15s infinite ease-in-out alternate;
}

.bg-circle-1 {
    width: 400px;
    height: 400px;
    background: var(--color-teal);
    top: -100px;
    right: -100px;
}

.bg-circle-2 {
    width: 500px;
    height: 500px;
    background: #e1f0fc;
    bottom: 20%;
    left: -200px;
    animation-delay: -5s;
}

.bg-line {
    position: absolute;
    top: 20%;
    right: 15%;
    width: 2px;
    height: 200px;
    background: var(--color-teal);
    border-radius: 0;
    filter: none;
    opacity: 0.8;
}

@keyframes float-diag {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50px, -50px) rotate(15deg); }
}

@keyframes float-slow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-30px, 40px); }
}

/* Base Decor for Sections */
.bg-decor {
    position: absolute;
    z-index: 0;
    pointer-events: none;
}

.decor-blob {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--color-teal-light) 0%, transparent 70%);
    filter: blur(40px);
    opacity: 0.15;
    animation: float-diag 20s infinite alternate ease-in-out;
}

.decor-circle {
    border: 2px solid var(--color-teal);
    border-radius: 50%;
    opacity: 0.1;
    animation: float-slow 25s infinite alternate ease-in-out;
}

.decor-dot-grid {
    background-image: radial-gradient(var(--color-teal) 1px, transparent 1px);
    background-size: 30px 30px;
    width: 200px;
    height: 200px;
    opacity: 0.2;
}

/* Merit Section Redesign */
.merit-section {
    position: relative;
    padding: 100px 0;
    background: radial-gradient(circle at top right, var(--color-teal-light) 0%, transparent 40%),
                radial-gradient(circle at bottom left, #eef7ff 0%, transparent 40%);
    overflow: hidden;
}

/* New Message Box (Refined - No Background) */
.message-box {
    max-width: 1000px;
    margin: 0 auto 80px;
    padding: 0;
    position: relative;
    text-align: center;
    background: transparent;
    box-shadow: none;
    border: none;
}

.message-box::before {
    content: 'VISION';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15rem;
    font-family: var(--font-num);
    font-weight: 900;
    color: var(--color-teal);
    opacity: 0.05;
    z-index: -1;
    letter-spacing: 0.2em;
}

.message-tag {
    display: inline-block;
    color: var(--color-blue);
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-bottom: 30px;
    position: relative;
}

.message-tag::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--color-teal);
    border-radius: 2px;
}

.message-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.2;
    margin-bottom: 30px;
    color: var(--color-navy);
    font-weight: 900;
}

.message-text {
    font-size: 1.3rem;
    color: var(--color-text-light);
    max-width: 1100px;
    margin: 0 auto;
    line-height: 1.8;
    font-weight: 500;
}

.merit-header {
    text-align: center;
    margin-bottom: 50px;
}

.merit-section-subtitle {
    font-size: 1.4rem;
    color: var(--color-navy);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.merit-section-subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 3px;
    background: var(--color-teal);
    border-radius: 2px;
}

/* Merit Grid & Cards */
.merit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.merit-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.merit-card:hover {
    background: var(--color-white);
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(18, 19, 52, 0.12);
}

.merit-icon-wrapper {
    margin-bottom: 24px;
    position: relative;
}

.merit-number {
    font-family: var(--font-num);
    font-weight: 900;
    font-size: 3rem;
    line-height: 1;
    color: var(--color-teal);
    opacity: 0.2;
    transition: opacity 0.3s ease;
    position: absolute;
    top: -10px;
    right: 0;
    z-index: 0;
}

.merit-icon {
    width: 85px;
    height: 85px;
    background-image: url('../images/icon.jpg');
    background-size: 500% auto;
    background-repeat: no-repeat;
    position: relative;
    z-index: 1;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(18, 19, 52, 0.1);
    border: 3px solid var(--color-white);
}

/* Sprite Mapping Calibrated */
.icon-1 { background-position: 1% 32%; }
.icon-2 { background-position: 26% 32%; }
.icon-3 { background-position: 51% 32%; }
.icon-4 { background-position: 76% 32%; }
.icon-5 { background-position: 101% 32%; }

.merit-card:hover .merit-number {
    opacity: 0.5;
}

.merit-title {
    font-size: 1.45rem;
    margin-bottom: 16px;
    color: var(--color-navy);
}

.merit-text {
    color: var(--color-text-light);
    line-height: 1.7;
    margin: 0;
    font-size: 0.95rem;
}

@media (min-width: 1100px) {
    /* Special layout for 5 cards: 3 in first row, 2 in second row centered */
    .merit-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .merit-card:nth-child(1),
    .merit-card:nth-child(2),
    .merit-card:nth-child(3) {
        grid-column: span 2;
    }
    .merit-card:nth-child(4) {
        grid-column: 2 / 4;
    }
    .merit-card:nth-child(5) {
        grid-column: 4 / 6;
    }
}

@media (max-width: 768px) {
    .merit-grid {
        grid-template-columns: 1fr;
    }
    .message-box {
        padding: 40px 20px;
    }
    .message-box::before {
        font-size: 5rem;
        top: 10px;
        left: 20px;
    }
    .merit-card {
        padding: 30px;
    }
}

/* Divisions Section */
.division-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 768px) {
    .division-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.division-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: var(--border-radius-lg);
}

.division-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    font-family: var(--font-num);
    font-weight: 900;
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.tech-icon {
    background: linear-gradient(135deg, var(--color-teal), #65cebf);
    color: var(--color-white);
}

.biz-icon {
    background: linear-gradient(135deg, var(--color-blue), #0b5aa3);
    color: var(--color-white);
}

.division-title {
    font-size: 2rem;
    margin-bottom: 8px;
}

.division-theme {
    font-weight: bold;
    color: var(--color-navy);
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.division-text {
    flex: 1;
    color: var(--color-text-light);
    margin-bottom: 24px;
}

.division-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.division-tags li {
    background: #f0f4f8;
    color: var(--color-blue);
    padding: 6px 14px;
    border-radius: var(--border-radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Organizer's message theme - Updated to match Hero */
.purpose-section {
    background: radial-gradient(circle at top right, var(--color-teal-light) 0%, transparent 40%),
                radial-gradient(circle at bottom left, #eef7ff 0%, transparent 40%);
    color: var(--color-text);
    margin: 0; /* Remove top margin to flow from hero/nav */
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.purpose-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    color: var(--color-text);
    text-align: center;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 80px clamp(20px, 4vw, 60px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 2;
}

.purpose-title {
    color: var(--color-navy);
    margin-bottom: 32px;
    font-size: 2.4rem;
    font-weight: 900;
    position: relative;
    display: inline-block;
}

.purpose-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 6px;
    background: var(--color-teal);
    border-radius: 3px;
}

.purpose-card p {
    color: var(--color-text-light);
    font-size: clamp(0.9rem, 1.8vw, 1.15rem);
    line-height: 2.2;
    font-weight: 500;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

@media (max-width: 768px) {
    .purpose-title {
        font-size: 2rem;
    }
    .purpose-card p {
        font-size: 1.1rem;
    }
}

/* CTA */
.cta-section {
    padding: 100px 0;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
}

/* Rewards Section */
.rewards-section {
    background: #fdfdfd;
}

.rewards-card {
    padding: 60px 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid rgba(0, 107, 122, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.rewards-total {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--navy);
}

.rewards-total .text-accent {
    font-size: 3.5rem;
    color: var(--teal);
    margin: 0 10px;
}

.rewards-breakdown {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.reward-item { text-align: center; }
.reward-label { font-size: 1rem; color: var(--text-gray); margin-bottom: 5px; }
.reward-amount { font-size: 1.8rem; font-weight: 700; color: var(--navy); }
.reward-note { font-size: 0.9rem; color: var(--text-gray); }

/* Schedule Section */
.schedule-timeline {
    position: relative;
    padding: 60px 40px;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    margin-bottom: 40px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-date {
    flex: 0 0 150px;
    font-weight: 700;
    color: var(--teal);
    font-size: 1.1rem;
}

.timeline-content {
    flex: 1;
    padding-left: 30px;
    border-left: 2px solid rgba(0, 107, 122, 0.2);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--teal);
    border-radius: 50%;
}

.timeline-heading {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--navy);
}

/* Info Section */
.info-card {
    padding: 50px 40px;
    background: #f0f4f5;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.info-item { text-align: center; }
.info-item strong {
    display: block;
    font-size: 0.9rem;
    color: var(--color-teal);
    margin-bottom: 15px;
    font-weight: 800;
}

/* Footer Section */
.footer {
    background: var(--color-navy);
    color: var(--color-white);
    padding: 80px 0 60px;
    margin-top: 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-logo {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.footer-info p { color: rgba(255, 255, 255, 0.85); margin-bottom: 8px; font-size: 1rem; line-height: 1.6; }
.mt-10 { margin-top: 10px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.text-sm { font-size: 0.85rem; }

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.footer-hlink {
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.copyright {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 40px;
}

/* Animations */
.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.pulse-animation {
    animation: pulse 2s infinite;
}

.bounce-animation {
    animation: bounce 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(20, 115, 194, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(20, 115, 194, 0); }
    100% { box-shadow: 0 0 0 0 rgba(20, 115, 194, 0); }
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .rewards-breakdown { flex-direction: column; gap: 15px; }
    
    /* Schedule Mobile Optimization */
    .timeline-item { 
        flex-direction: column; 
        margin-bottom: 25px;
    }
    .timeline-date { 
        flex: none;
        margin-bottom: 2px; /* Content immediately under date */
        font-size: 1rem;
    }
    .timeline-content { 
        padding-left: 0; 
        border-left: none; 
        padding-bottom: 0; 
    }
    .timeline-content::before {
        display: none; /* Remove left dot to save horizontal space on mobile */
    }
    .timeline-heading {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }

    .info-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; align-items: center; text-align: center; }
    .footer-links { align-items: center; }
}

/* 
   Floating Action Button (FAB) for Mobile
   Ensure it's only visible on mobile screens.
*/
.fab-container {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
}

.fab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-blue);
    color: var(--color-white);
    padding: 18px 24px;
    border-radius: var(--border-radius-pill);
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(20, 115, 194, 0.5);
    text-decoration: none;
    font-size: 1rem;
    animation: fab-float 3s infinite ease-in-out;
    transition: transform 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.fab-btn:active {
    transform: scale(0.95);
}

@keyframes fab-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (max-width: 768px) {
    .fab-container {
        display: block;
    }
}

/* Animations Fix */
.fade-in-up {
    opacity: 1 !important;
    transform: none !important;
}
