:root {
    --bg-color: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --accent: #3d1c12;
    --border: #eeeeee;
    --card-bg: #fafafa;
    --font-serif: 'Merriweather', Georgia, serif;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Source Serif 4', 'Merriweather', Georgia, serif;
    --font-news-title: 'Merriweather', Georgia, serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.8;
    overflow-x: hidden;
}

h1,
h2,
h3,
.serif {
    font-family: var(--font-serif);
    font-weight: 700;
}

input,
textarea,
button,
select {
    font-family: var(--font-sans);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

header {
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
}

.header-top-row .logo {
    min-width: 0;
    flex-shrink: 1;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
    border-top: 1px solid #eee;
    padding-top: 2rem;
}

.footer-links a {
    color: #333;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--accent);
    letter-spacing: -1px;
    min-width: 0;
    /* Allow shrinking */
}

.logo-img {
    height: 60px;
    width: auto;
    display: block;
    border-radius: 4px;
    flex-shrink: 0;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    /* Allow text to shrink/wrap */
}

.logo-title {
    font-size: 2.25rem;
    font-weight: 600;
    color: #3d1c12;
    font-family: 'Zilla Slab', serif;
    letter-spacing: 0.01em;
    line-height: 1.1;
}

.logo-tagline {
    font-size: 0.75rem;
    font-weight: 500;
    color: #5a3e36;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333333;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a.active {
    color: var(--accent);
    box-shadow: 0 2px 0 var(--accent);
}

.nav-links a:hover {
    color: var(--accent);
}

.header-search {
    display: flex;
    align-items: center;
    position: relative;
    width: 220px;
}

.header-search input {
    width: 100%;
    padding: 0.4rem 2.2rem 0.4rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: var(--font-sans);
    outline: none;
    transition: all 0.3s ease;
}

.header-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(61, 28, 18, 0.1);
}

.header-search button {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.header-search button:hover {
    color: var(--accent);
}

.mobile-nav-search {
    display: none;
}

.ad-slot {
    background: var(--card-bg);
    border: 1px dashed #cccccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999999;
    font-size: 0.8rem;
    margin: 1rem 0;
    min-height: 80px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin: 1rem 0 3rem 0;
}

.featured-main img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.post-meta {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.featured-main h1 {
    font-size: 1.8rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: sticky;
    top: 6rem;
    /* Adjust based on header height */
    align-self: flex-start;
}

.news-item {
    display: flex;
    gap: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.news-item:last-child {
    border-bottom: none;
}

.news-item-img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 2px;
}

.news-item-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

footer {
    border-top: 1px solid var(--border);
    padding: 4rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-muted);
}

a {
    color: inherit;
    text-decoration: none;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 1rem;
    transition: transform 0.2s;
}

.read-more:hover {
    transform: translateX(5px);
}

.read-more span {
    font-size: 1.2rem;
}

.news-item h3 a:hover,
.featured-main h1 a:hover,
.video-item h3 a:hover,
.post-title-link:hover {
    text-decoration: underline !important;
}

/* Base Grid */
.grid {
    display: grid;
    gap: 2rem;
}

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

@media (min-width: 768px) {
    .md-grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .lg-grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Pagination Styling */
/* Trix Content Styles */
.post-body img,
.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.post-body figure,
.page-content figure {
    margin: 2rem 0;
    padding: 0;
}

.post-body figcaption,
.page-content figcaption {
    display: none;
}

.post-body h2,
.page-content h2 {
    margin: 2.5rem 0 1rem 0;
    font-size: 1.5rem;
}

.post-body ul,
.page-content ul {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.post-body li,
.page-content li {
    margin-bottom: 0.5rem;
}

.pagination-wrapper {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.pagination li a,
.pagination li span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
}

.pagination li.active span {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Home Page Item Spacing */
.featured-item:not(:last-child) {
    margin-bottom: 1rem;
}

.featured-item:not(:first-child) {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ===================== */
/* HAMBURGER MENU BUTTON */
/* ===================== */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 200;
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* ========================== */
/* MOBILE RESPONSIVE STYLES   */
/* ========================== */

/* Tablet and below (< 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.25rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .news-list {
        position: static;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.85rem;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    /* --- Header --- */
    header {
        padding: 0.5rem 0;
    }

    .header-top-row {
        flex-wrap: nowrap;
        gap: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .header-top-row .logo {
        flex: 1 1 0;
        min-width: 0;
        max-width: calc(100% - 50px);
    }

    .header-right {
        display: none;
    }

    .hamburger-btn {
        display: block;
        flex-shrink: 0;
    }

    .logo-title {
        font-size: 1.35rem !important;
        /* Increased size */
        line-height: 1.1 !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        display: block !important;
    }

    .logo-tagline {
        font-size: 0.5rem !important;
        white-space: normal !important;
        line-height: 1.2 !important;
    }

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

    /* Mobile Nav Toggle */
    .nav-links {
        display: none;
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0;
        border-top: 1px solid #eee;
    }

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

    .nav-links a {
        padding: 0.4rem 0;
        /* Reduced padding */
        font-size: 0.95rem;
        border-bottom: 1px solid #f5f5f5;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    /* Header Search - move into nav */
    .header-search {
        width: 100%;
    }

    .mobile-nav-search {
        display: block;
        padding-top: 0.75rem;
    }

    /* --- Hero Grid --- */
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 0.5rem 0 2rem 0;
    }

    /* --- Ad Slots --- */
    .ad-slot {
        min-height: 60px;
        margin: 0.75rem 0;
        font-size: 0.7rem;
    }

    /* --- Typography --- */
    .featured-main h1 {
        font-size: 1.4rem;
    }

    .featured-main-title {
        font-size: 1.5rem !important;
    }

    .featured-sub-title {
        font-size: 1.1rem !important;
    }

    .news-item-content h3 {
        font-size: 1rem;
    }

    /* --- Sidebar --- */
    .news-list {
        position: static;
        gap: 0.25rem;
    }

    .news-item {
        gap: 1rem;
    }

    .news-item-img {
        width: 90px;
        height: 60px;
    }

    /* --- Footer --- */
    footer {
        padding: 2rem 0;
        margin-top: 2rem;
    }

    .footer-links {
        gap: 0.75rem;
        padding-top: 1.5rem;
    }

    .footer-links a {
        font-size: 0.8rem;
    }

    /* --- Read More links --- */
    .read-more {
        font-size: 0.85rem;
    }

    /* --- Pagination --- */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination li a,
    .pagination li span {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    /* --- Post Body --- */
    .post-body img,
    .page-content img {
        margin: 1rem 0;
        border-radius: 4px;
    }

    .post-body h2,
    .page-content h2 {
        font-size: 1.25rem;
        margin: 1.5rem 0 0.75rem 0;
    }

    /* --- Page Titles --- */
    .post-page-title {
        font-size: 1.6rem !important;
        margin-bottom: 0.75rem !important;
    }

    /* --- Post Gallery --- */
    .post-gallery {
        grid-template-columns: 1fr !important;
    }

    /* --- Internship Form --- */
    .internship-form-container {
        padding: 1.5rem !important;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .logo-title {
        font-size: 1.2rem !important;
        /* Increased size */
        white-space: normal !important;
        line-height: 1.1 !important;
    }

    .logo-tagline {
        font-size: 0.5rem !important;
        letter-spacing: 0.02em !important;
        white-space: normal !important;
        line-height: 1.2 !important;
    }

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

    .featured-main h1 {
        font-size: 1.25rem;
    }

    .featured-main-title {
        font-size: 1.3rem !important;
    }

    .featured-sub-title {
        font-size: 1rem !important;
    }

    .news-item-content h3 {
        font-size: 0.9rem;
    }

    .news-item-img {
        width: 80px;
        height: 55px;
    }

    .read-more {
        font-size: 0.8rem;
    }

    .post-meta {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .post-page-title {
        font-size: 1.35rem !important;
    }
}