
/* =========================================
   NARADA CENTRAL COLLEGE - NEWS PAGE
   Premium Green & Gold Theme
   ========================================= */

:root {
    --primary: #0a3221;
    --primary-dark: #051d13;
    --primary-light: #0b8d66;
    --accent: #e0a96d;
    --accent-hover: #dd994b;
    --background: #ffffff;
    --card-sub-bg: #f8f9fa;
    --text-main: #334155;
    --text-muted: #616e7d;
    --footer-bg: #012412;
}

/* =========================================
   GLOBAL STYLES
   ========================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--primary);
    overflow-x: hidden;
    line-height: 1.6;
}

img {
    max-width: 100%;
}

/* =========================================
   HEADER
   ========================================= */

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    padding: 15px 5%;
    position: relative;
    z-index: 1010;
    overflow: visible;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* School branding */

.header-branding {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.header-logo {
    display: block;
    width: 70px;
    height: auto;
    flex-shrink: 0;
}

.header-title {
    min-width: 0;
}

.header-title h2 {
    font-size: 20px;
    color: #062b1a;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.header-title p {
    font-size: 11px;
    color: #0e845c;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 4px;
    text-transform: uppercase;
}

/* =========================================
   DESKTOP NAVIGATION
   ========================================= */

nav {
    background: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(10, 50, 33, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

nav a {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 20px 60px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
}

header nav#mainNav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 4px;
    background-color: var(--accent);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

header nav#mainNav a:hover,
header nav#mainNav a.active {
    color: var(--accent);
    background-color: rgba(255, 255, 255, 0.05);
}

header nav#mainNav a:hover::after,
header nav#mainNav a.active::after {
    width: 70%;
}

/* Hamburger hidden on desktop */

header .menu-toggle {
    display: none;
}

/* =========================================
   PAGE TITLE
   ========================================= */

.page-title {
    text-align: center;
    margin: 40px 0 20px;
    padding: 0 15px;
}

.page-title h1 {
    display: inline-block;
    position: relative;
    padding-bottom: 10px;
    color: var(--primary);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.page-title h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
}

/* =========================================
   NEWS CONTAINER
   ========================================= */

.news-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 5%;
}

/* Featured news */

.featured-news {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
    background: var(--card-sub-bg);
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(10, 50, 33, 0.03);
}

.featured-news:hover {
    border-color: var(--accent);
    box-shadow: 0 12px 35px rgba(10, 50, 33, 0.08);
}

.featured-img img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 350px;
    object-fit: cover;
}

.featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
}

.news-badge {
    align-self: flex-start;
    margin-bottom: 15px;
    padding: 5px 15px;
    background: var(--primary);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-date {
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
}

.featured-content h2 {
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 26px;
    font-weight: 800;
}

.featured-content p {
    margin-bottom: 20px;
    color: #4a5568;
    font-size: 16px;
}

/* Read more button */

.btn-read {
    display: inline-block;
    align-self: flex-start;
    padding-bottom: 3px;
    color: var(--primary);
    border-bottom: 2px solid var(--accent);
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
}

.btn-read:hover {
    padding-left: 5px;
    color: var(--primary-light);
    border-color: var(--primary-light);
}

/* Article details */

.news-container details {
    margin-top: 12px;
}

.news-container details summary {
    display: inline-block;
    color: var(--primary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 3px;
}

.news-container details summary:hover {
    color: var(--primary-light);
}

.detailed-box {
    margin-top: 15px;
    padding: 15px;
    color: var(--text-main);
    background: #ffffff;
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

/* =========================================
   NEWS GRID
   ========================================= */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.news-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(10, 50, 33, 0.08);
}

.card-img img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
    padding: 25px;
}

.card-content h3 {
    margin: 10px 0;
    color: var(--primary);
    font-size: 19px;
    font-weight: 700;
}

.card-content p {
    flex-grow: 1;
    margin-bottom: 20px;
    color: #4a5568;
    font-size: 14px;
}

/* =========================================
   FOOTER
   ========================================= */

footer {
    padding: 50px 5% 20px;
    background-color: var(--primary);
    color: #ffffff;
    border-top: 4px solid var(--accent);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 30px;
}

.footer-col.brand-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 250px;
    gap: 15px;
}

.footer-logo {
    width: 100px !important;
    max-width: 100px !important;
    height: auto !important;
    padding: 5px;
    background: #ffffff;
    border-radius: 8px;
    object-fit: contain;
}

.brand-text h2 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.footer-links-wrapper {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    flex: 2;
    gap: 50px;
}

.footer-col {
    min-width: 180px;
}

.footer-col h3 {
    display: inline-block;
    margin-bottom: 15px;
    padding-bottom: 4px;
    color: var(--accent);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a,
.footer-col p {
    color: #cbd5e1;
    font-size: 14px;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.footer-col ul li a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.social-icons {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 50%;
    font-size: 16px;
    text-decoration: none;
}

.social-icons a:hover {
    background: var(--accent);
    color: var(--primary);
}

.footer-bottom {
    padding-top: 20px;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 13px;
}

.footer-bottom p {
    overflow-wrap: anywhere;
}

/* =========================================
   TABLET
   ========================================= */

@media screen and (max-width: 900px) {

    .featured-news {
        grid-template-columns: 1fr;
    }

    .featured-img img {
        min-height: 250px;
        max-height: 400px;
    }

    .featured-content {
        padding: 25px;
    }

    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .footer-content {
        grid-template-columns: 1fr !important;
    }

    .footer-links-wrapper {
        gap: 30px;
    }

    header nav#mainNav a {
        padding-right: 18px;
        padding-left: 18px;
    }
}

/* =========================================
   MOBILE HAMBURGER MENU
   Reference button size: 45px x 45px
   Full-width dropdown
   ========================================= */

@media screen and (max-width: 768px) {

    /* Header row */

    header {
        position: sticky;
        top: 0;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 15px 20px;
        text-align: left;
        z-index: 1010;
    }

    /* Logo and school name */

    header .header-branding {
        display: flex !important;
        flex: 1 1 auto;
        align-items: center !important;
        gap: 9px !important;
        min-width: 0;
    }

    header .header-logo {
        display: block;
        width: 50px;
        height: auto;
        flex-shrink: 0;
    }

    header .header-title {
        min-width: 0;
    }

    header .header-title h2 {
        font-size: 15px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    header .header-title p {
        margin-top: 4px;
        font-size: 9px;
        letter-spacing: 0.4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Hamburger button */

    header .menu-toggle {
         display: flex;
        position: relative;
        width: 45px;
        height: 45px;
        min-width: 45px;
        padding: 8px;
        margin: 0 0 0 10px;
        background: var(--primary);
        border: 2px solid var(--accent);
        border-radius: 10px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 1020;
        flex-shrink: 0;
    }

    /* Three gold lines */

    header .menu-toggle span {
         display: block;
        width: 24px;
        height: 3px;
        min-height: 3px;
        flex-shrink: 0;
        background: var(--accent);
        border-radius: 3px;
        opacity: 1;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    /* Full-width dropdown: closed state */

    header nav#mainNav {
        position: absolute;
        top: calc(100% + 8px);
        left: 15px;
        right: 15px;
        width: auto;
        margin: 0;
        padding: 8px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 2px;
        background: var(--primary);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(10, 50, 33, 0.30);
        overflow: hidden;

        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);

        transition:
            opacity 0.25s ease,
            transform 0.25s ease,
            visibility 0.25s ease;

        z-index: 1015;
    }

    /* Dropdown open */

    header nav#mainNav.active {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

  header nav#mainNav a {
        display: block;
        width: 100%;
        flex: none;
        padding: 14px 18px;
        margin: 0;
        color: rgba(255, 255, 255, 0.95);
        text-align: center;
        font-size: 14px;
        font-weight: 600;
        border-radius: 10px;
        background: transparent;
    }

    header nav#mainNav a:hover,
    header nav#mainNav a.active {
        color: var(--accent);
        background-color: rgba(255, 255, 255, 0.08);
    }

    header nav#mainNav a::after {
        bottom: 4px;
        height: 3px;
    }

    /* Hamburger changes into X */

    header .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg) !important;
    }

    header .menu-toggle.active span:nth-child(2) {
        opacity: 0 !important;
    }

    header .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg) !important;
    }

    /* Mobile news layout */

    .news-container {
        padding: 20px 15px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-title {
        margin: 30px 0 20px;
    }

    .page-title h1 {
        font-size: 26px;
    }

    .featured-content {
        padding: 22px;
    }

    .featured-content h2 {
        font-size: 23px;
    }

    .featured-img img {
        min-height: 220px;
        max-height: 350px;
    }

    .card-img img {
        height: 200px;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .footer-col.brand-col {
        width: 100%;
        min-width: 0;
        flex-direction: column;
        align-items: center;
    }

    .footer-links-wrapper {
        justify-content: center;
        gap: 30px;
        width: 100%;
    }

    .footer-col {
        min-width: 0;
        max-width: 100%;
    }

    .footer-bottom {
        line-height: 1.7;
    }
}

/* =========================================
   SMALL PHONES
   Button size: 42px x 42px
   ========================================= */

@media screen and (max-width: 380px) {

    header {
        padding: 12px !important;
        gap: 8px;
    }

    header .header-logo {
        width: 42px;
    }

    header .header-branding {
        gap: 7px !important;
    }

    header .header-title h2 {
        font-size: 12px;
    }

    header .header-title p {
        font-size: 7px;
        letter-spacing: 0.2px;
    }

    header .menu-toggle {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
    }

    header .menu-toggle span {
        width: 22px !important;
    }

    .page-title h1 {
        font-size: 23px;
    }

    .featured-content {
        padding: 18px;
    }

    .featured-content h2 {
        font-size: 21px;
    }

    .card-content {
        padding: 20px;
    }

    .news-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-links-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .footer-col {
        width: 100%;
    }
}

/* =========================================
   REDUCE MOTION ACCESSIBILITY
   ========================================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    header nav#mainNav,
    header nav#mainNav a,
    header .menu-toggle span,
    .news-card {
        transition: none !important;
    }
}
