:root {
    --primary-color: #0056b3;
    --secondary-color: #f8f9fa;
    --accent-color: #ffd700;
    --text-color: #333;
    --white: #ffffff;
    --font-main: 'Prompt', sans-serif;
}

body {
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: var(--secondary-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 86, 179, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.logo a:hover {
    transform: scale(1.02);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: 1.05rem;
    white-space: nowrap;
    padding: 10px 18px;
    border-radius: 8px;
}

.nav-links a:hover {
    color: var(--primary-color);
    background: rgba(0, 86, 179, 0.08);
}

.nav-links a.active {
    color: white;
    background: var(--primary-color);
}

.nav-links a.btn-login {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
}

.nav-links a.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, #FFE44D 0%, #FFB733 100%);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 86, 179, 0.8), rgba(0, 86, 179, 0.6)), url('https://placehold.co/1600x900?text=School+Image');
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
    padding: 40px 0;
    /* Reduced from 100px */
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #FFE44D 0%, #FFB733 100%);
}

/* Section General */
section {
    padding: 30px 0;
    /* Reduced from 60px */
}

h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
}

/* News Cards */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-content {
    padding: 20px;
}

.news-date {
    color: #666;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 40px 0 20px;
    text-align: center;
}

/* =========================================
   RESPONSIVE DESIGN - Mobile First
   ========================================= */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        width: 95%;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile & Small Tablets (Disabled by setting to 20px) */
@media (max-width: 20px) {

    /* Navigation */
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 5px 0;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 12px 20px !important;
        width: 100%;
    }

    .mobile-menu-btn {
        display: block;
        font-size: 1.8rem;
        padding: 8px;
    }

    /* Logo and School Name */
    .logo a {
        font-size: 1rem;
    }

    .logo img {
        max-height: 50px !important;
    }

    /* Hero Section */
    .hero {
        padding: 30px 0 !important;
    }

    .hero h1 {
        font-size: 1.8rem !important;
        line-height: 1.3 !important;
        margin-bottom: 15px !important;
    }

    .hero p {
        font-size: 0.95rem !important;
        margin-bottom: 20px !important;
    }

    /* News Grid - Single Column */
    .news-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* News Section Spacing */
    .news-section {
        padding: 30px 0 !important;
    }

    /* Typography */
    h2 {
        font-size: 1.5rem !important;
        margin-bottom: 20px !important;
    }

    h3 {
        font-size: 1.2rem !important;
    }

    /* Sections */
    section {
        padding: 30px 0;
    }

    /* Container */
    .container {
        width: 100%;
        padding: 0 15px;
    }

    /* Buttons */
    .btn {
        font-size: 1rem !important;
        padding: 12px 25px !important;
        width: auto !important;
        display: inline-block !important;
    }
}

/* Marquee */
.marquee-container {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    padding: 10px 0;
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 20s linear infinite;
    font-weight: 500;
}

@keyframes marquee {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-100%, 0);
    }
}

/* =========================================
   Global Responsive Improvements
   ========================================= */

/* Ensure all elements respect box model */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Images and Media scalable */
img,
video,
iframe,
svg {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal overflow */
body {
    overflow-x: hidden;
    width: 100%;
}

/* Additional Mobile Optimizations */
@media screen and (max-width: 768px) {

    /* Responsive Tables */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Adjust input sizes - Prevent iOS zoom */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="date"],
    select,
    textarea {
        width: 100% !important;
        font-size: 16px !important;
        padding: 12px !important;
        box-sizing: border-box;
    }

    /* Stack flex containers */
    .hero-layout,
    .row,
    .form-grid {
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
    }

    /* Form adjustments */
    .form-card,
    .edit-card,
    .login-card {
        padding: 20px !important;
        width: 100% !important;
        margin: 10px 0 !important;
    }

    /* Data tables */
    th,
    td {
        padding: 8px !important;
        font-size: 0.85rem !important;
    }

    /* Button groups */
    .btn-group {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .btn-group .btn {
        width: 100% !important;
    }

    /* Images - Ensure responsive */
    img {
        max-width: 100%;
    }

    /* Cards spacing */
    .card,
    .news-card {
        margin: 10px 0 !important;
    }
}

/* Small Mobile Devices (max-width: 480px) */
@media screen and (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem !important;
    }

    .hero p {
        font-size: 0.9rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.2rem !important;
    }

    .btn {
        padding: 10px 20px !important;
        font-size: 0.95rem !important;
    }

    /* Tighter spacing for small screens */
    section {
        padding: 30px 0 !important;
    }

    .container {
        padding: 0 10px !important;
    }
}