/* =========================================
   ORANGE CARTOONISH POP THEME CSS
   ========================================= */

/* --- GOOGLE FONTS LINK (Add this to your HTML <head>) ---
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&family=Quicksand:wght@500;600;700&display=swap" rel="stylesheet">
----------------------------------------------------------- */

:root {
    /* --- Palette Pop Oren --- */
    --primary: #FF9F43;
    /* Bright Orange */
    --secondary: #FDC500;
    /* Pop Yellow */
    --accent: #FF6B6B;
    /* Soft Red */
    --accent-blue: #48DBFB;
    /* Sky Blue */
    --accent-purple: #5F27CD;
    /* Purple */

    /* --- Backgrounds & Borders --- */
    --bg-color: #FFF8F0;
    /* Warm Cream */
    --bg-white: #ffffff;
    --border-color: #3E2723;
    /* Dark Brown/Black Border */
    --text-main: #4E342E;
    /* Dark Brown Text */
    --text-white: #ffffff;

    /* --- Effects --- */
    --shadow-hard: 5px 5px 0px var(--border-color);
    --shadow-hover: 7px 7px 0px var(--border-color);
    --radius-sm: 10px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --transition: all 0.2s ease;

    /* --- Day Specific Colors (Pop Style) --- */
    --senin-color: #54a0ff;
    --selasa-color: #1dd1a1;
    --rabu-color: #ff6b6b;
    --kamis-color: #5f27cd;
    --jumat-color: #ff9f43;
}

/* --- Global Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Quicksand', sans-serif;
    /* Polka Dot Pattern Background */
    background-color: var(--bg-color);
    background-image: radial-gradient(var(--secondary) 15%, transparent 16%), radial-gradient(var(--secondary) 15%, transparent 16%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    color: var(--text-main);
    padding: 10px;
    min-height: 100vh;
    line-height: 1.6;
}

/* --- Main Container --- */
.container {
    max-width: 1000px;
    margin: 20px auto;
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hard);
    border: 4px solid var(--border-color);
    padding: 30px 20px;
    position: relative;
    overflow: hidden;
}

/* --- Header Styles --- */
.header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 4px dashed var(--border-color);
    position: relative;
}

.header h1 {
    font-family: 'Fredoka', sans-serif;
    color: var(--primary);
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px #fff, 4px 4px 0px var(--border-color);
    letter-spacing: 1px;
}

.header h2 {
    font-family: 'Fredoka', sans-serif;
    color: var(--accent);
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    font-weight: 700;
}

/* --- Schedule Grid --- */
.schedule-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.jam {
    margin: 0 0 25px 0;
    background: #FFF8E1;
    /* Light Yellow */
    border-left: 5px solid var(--secondary);
    padding: 15px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.jam::before {
    content: '\f0a1';
    /* Info Icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--secondary);
}

/* --- Footer --- */
.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 4px dotted var(--border-color);
    color: #888;
    font-size: 0.9rem;
    font-weight: 600;
}

.subject-limit {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    background: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}



/* --- Back to Top Button --- */
#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 999;
    background: var(--secondary);
    color: var(--text-main);
    border: 3px solid var(--border-color);
    border-radius: 50%;
    width: 55px;
    height: 55px;
    cursor: pointer;
    box-shadow: var(--shadow-hard);
    transition: var(--transition);
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

#backToTopBtn:hover {
    transform: translateY(-5px);
    background: var(--primary);
}

/* --- Hamburger Menu --- */
.hamburger-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--bg-white);
    color: var(--text-main);
    border: 3px solid var(--border-color);
    border-radius: 50%;
    width: 55px;
    height: 55px;
    z-index: 1001;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-hard);
    transition: var(--transition);
}

.hamburger-menu:hover {
    background: var(--primary);
    color: white;
}

.hamburger-menu i {
    font-size: 1.4rem;
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: var(--bg-white);
    border-right: 4px solid var(--border-color);
    box-shadow: var(--shadow-hard);
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    /* Bouncy transition */
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 25px;
    background: var(--primary);
    color: var(--text-white);
    text-align: center;
    font-family: 'Fredoka', sans-serif;
    border-bottom: 4px solid var(--border-color);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.3rem;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
}

.sidebar a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-main);
    text-decoration: none;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    border-bottom: 2px dashed #eee;
    transition: var(--transition);
}

.sidebar a i {
    margin-right: 15px;
    color: var(--primary);
    font-size: 1.1rem;
}

.sidebar a:hover {
    background: #FFF3E0;
    color: var(--primary);
    padding-left: 25px;
    border-bottom: 2px dashed var(--primary);
}

.sidebar-footer {
    padding: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    background: #eee;
    border-top: 4px solid var(--border-color);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(62, 39, 35, 0.5);
    /* Semi-transparent border color */
    z-index: 998;
    backdrop-filter: blur(2px);
}

/* --- Responsive Design --- */
@media (max-width: 968px) {
    .container {
        margin: 0;
        border-radius: 0;
        border: none;
        padding: 20px 15px;
        min-height: 100vh;
        background: var(--bg-color);
        /* Show dots on body */
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .mini-section-buttons {
        gap: 10px;
    }

    .mini-btn {
        width: 50px;
        height: 50px;
        font-size: 0.9rem;
    }

    .mobile-nav {
        display: flex;
        /* Show nav on mobile */
    }

    .hamburger-menu {
        display: flex;
        /* Show hamburger on mobile */
    }

    .subject-item {
        padding: 12px;
    }

    .subject-teacher {
        font-size: 0.85rem;
    }

    #backToTopBtn {
        bottom: 110px;
        width: 45px;
        height: 45px;
    }
}

@media (min-width: 969px) {
    .schedule-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* --- Print Styles (Clean & Flat) --- */
@media print {
    body {
        background: none;
        color: black;
    }

    .container {
        box-shadow: none;
        background: white;
        border: none;
    }

    .mobile-nav,
    .hamburger-menu,
    #backToTopBtn {
        display: none !important;
    }

    .day-header {
        color: black;
        background: none;
        border-bottom: 2px solid black;
    }

    .subject-item {
        border: 1px solid #ccc;
    }
}