/* =====================
   CSS Variables & Reset
   ===================== */
:root {
    --primary: #59bca4;
    --primary-dark: #3fa08c;
    --primary-light: #d6efed;
    --text-dark: #2a3b4c;
    --text-mid: #445566;
    --text-light: #778899;
    --bg-light: #f4f8f7;
    --white: #ffffff;
    --border: #e0eae8;
    --fb: #3b5998;
    --tw: #1da1f2;
    --pin: #bd081c;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 18px rgba(0, 0, 0, 0.09);
    --shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.14);
    --radius: 10px;
    --radius-sm: 6px;
    --transition: all 0.28s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    overflow-x: hidden;
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    background: var(--white);
    font-size: 15px;
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

button {
    font: inherit;
}

ul {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* =====================
   Shared Utilities
   ===================== */
.container {
    width: min(100%, 1140px);
    margin: 0 auto;
    padding-inline: 18px;
}

.section-title {
    position: relative;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    color: var(--text-dark);
    font-size: clamp(1.125rem, 1rem + 0.35vw, 1.25rem);
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary);
}

/* =====================
   PAGE BACKGROUND TINT
   ===================== */
.page-background {
    position: fixed;
    inset: 0 0 auto;
    height: 620px;
    background: linear-gradient(180deg, #c5e9e4 0%, rgba(255, 255, 255, 0) 90%);
    z-index: -1;
    pointer-events: none;
}

/* =====================
   HEADER
   ===================== */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.logo-icon svg {
    width: 38px;
    height: 38px;
}

.logo-text h1 {
    color: var(--primary);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1;
}

.logo-text p {
    margin-top: 2px;
    color: var(--text-light);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.top-socials {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    color: var(--text-light);
    font-size: 15px;
}

.top-socials i {
    cursor: pointer;
}

.top-socials i:hover {
    color: var(--primary);
}

/* =====================
   NAV BAR
   ===================== */
.main-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--primary);
    box-shadow: 0 2px 10px rgba(89, 188, 164, 0.3);
}

.nav-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--white);
    transition: var(--transition);
}

.nav-toggle[aria-expanded='true'] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded='true'] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links li {
    flex-shrink: 0;
}

.nav-links li a {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 13px 18px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14.5px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.nav-links li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 2px 2px 0 0;
}

.nav-arrow {
    margin-left: 4px;
    font-size: 9px;
    vertical-align: middle;
    opacity: 0.85;
}

/* =====================
   PAGE LAYOUT
   ===================== */
.page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
    padding-top: 24px;
    padding-bottom: 40px;
}

.content-left,
.sidebar-right {
    min-width: 0;
}

/* =====================
   HERO BANNER
   ===================== */
.hero {
    position: relative;
    height: clamp(320px, 34vw, 420px);
    margin-bottom: 32px;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(30, 60, 55, 0.72) 38%, rgba(0, 0, 0, 0) 75%);
    pointer-events: none;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 2;
    max-width: min(100%, 420px);
    transform: translateY(-50%);
    padding: clamp(24px, 3vw, 36px);
}

.hero-content h2 {
    margin-bottom: 10px;
    color: #fff;
    font-size: clamp(2rem, 1.5rem + 1vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-content p {
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    line-height: 1.6;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 50px;
    padding: 10px 22px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(89, 188, 164, 0.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    background: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(89, 188, 164, 0.5);
}

/* =====================
   ARTICLE CARDS GRID
   ===================== */
.latest-articles {
    margin-bottom: 36px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.card-img-wrap {
    position: relative;
    overflow: hidden;
}

.card-img-wrap img {
    width: 100%;
    height: 168px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-img-wrap img {
    transform: scale(1.04);
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    border-radius: 50px;
    padding: 3px 10px;
    background: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: capitalize;
}

.card-body {
    padding: 14px 16px 16px;
}

.card-body h4 {
    margin-bottom: 6px;
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.card-body p {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 12px;
    color: var(--text-light);
    font-size: 12.5px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.btn-read-more {
    display: inline-block;
    border-radius: 50px;
    padding: 7px 16px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-read-more:hover {
    background: var(--primary-dark);
}

/* =====================
   CATEGORY GRID
   ===================== */
.browse-categories {
    margin-bottom: 10px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.cat-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.cat-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cat-card:hover img {
    transform: scale(1.06);
}

.cat-card span {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 10px 10px 8px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.65) 0%, transparent 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-align: center;
}

/* =====================
   SIDEBAR
   ===================== */
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.widget {
    padding: 18px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.widget-title {
    position: relative;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 700;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.social-stats {
    display: flex;
    gap: 10px;
}

.stat-box {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 14px 8px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-2px);
    opacity: 0.88;
}

.stat-box span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.stat-box.fb {
    background: var(--fb);
}

.stat-box.tw {
    background: var(--tw);
}

.stat-box.pin {
    background: var(--pin);
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.post-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.post-item:hover .title {
    color: var(--primary);
}

.post-item img {
    width: 56px;
    height: 50px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.post-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.post-info .title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-dark);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
    transition: var(--transition);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.post-info .date {
    color: var(--text-light);
    font-size: 11px;
}

.small-link {
    margin-left: 3px;
    color: var(--primary);
    font-size: 9px;
}

.cat-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cat-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-mid);
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
}

.cat-list li a i {
    width: 18px;
    color: var(--primary);
    font-size: 13px;
    text-align: center;
}

.cat-list li a:hover {
    padding-left: 16px;
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* =====================
   FOOTER
   ===================== */
.footer {
    margin-top: 48px;
    background: linear-gradient(135deg, #1e4f47 0%, #2a6b60 40%, #3a8a7a 100%);
    color: rgba(255, 255, 255, 0.88);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 36px;
    padding: 48px 18px 36px;
}

.footer-col h4 {
    position: relative;
    margin-bottom: 16px;
    padding-bottom: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 36px;
    height: 2px;
    background: var(--primary);
}

.footer-col p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 12.5px;
    line-height: 1.75;
}

.footer-col-offset {
    padding-top: 35px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links li a {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    transition: var(--transition);
}

.footer-links li a::before {
    content: '';
    width: 5px;
    height: 5px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--primary);
}

.footer-links li a:hover {
    padding-left: 4px;
    color: #fff;
}

.footer-socials {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-socials a {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    transition: var(--transition);
}

.footer-socials a i {
    display: flex;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-size: 12px;
}

.footer-socials a:hover {
    color: #fff;
}

.footer-socials a:hover i {
    background: var(--primary);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.55);
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: #fff;
}

/* =====================
   TABLET
   ===================== */
@media (max-width: 1024px) {
    .page-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero {
        height: clamp(320px, 44vw, 400px);
    }

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

    .sidebar-right {
        gap: 18px;
    }

    .footer-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 24px;
    }

    .footer-col-offset {
        padding-top: 0;
    }
}

/* =====================
   PHONE
   ===================== */
@media (max-width: 767px) {
    .container {
        padding-inline: 16px;
    }

    .page-background {
        height: 520px;
    }

    .top-bar {
        align-items: flex-start;
        flex-wrap: wrap;
        padding-block: 15px;
    }

    .top-socials {
        width: 100%;
        justify-content: flex-start;
        gap: 16px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 10px);
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        gap: 0;
        padding: 10px;
        border: 1px solid rgba(89, 188, 164, 0.22);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: var(--shadow-hover);
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links li,
    .nav-links li a {
        width: 100%;
    }

    .nav-links li a {
        justify-content: space-between;
        padding: 13px 14px;
        border-radius: 12px;
        color: var(--text-dark);
    }

    .nav-links li a:hover,
    .nav-links li a.active {
        background: var(--primary);
        color: #fff;
    }

    .nav-links li a.active::after {
        display: none;
    }

    .hero {
        height: clamp(360px, 92vw, 460px);
    }

    .hero::after {
        background: linear-gradient(180deg, rgba(17, 43, 39, 0.18) 0%, rgba(17, 43, 39, 0.86) 74%, rgba(17, 43, 39, 0.92) 100%);
    }

    .hero-content {
        top: auto;
        bottom: 0;
        max-width: 100%;
        transform: none;
        padding: 24px 20px;
    }

    .hero-content h2 {
        font-size: clamp(1.9rem, 7vw, 2.4rem);
        line-height: 1.18;
    }

    .hero-content p {
        max-width: 30ch;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .card-img-wrap img {
        height: 210px;
    }

    .widget {
        padding: 16px 15px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        padding: 42px 16px 32px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =====================
   SMALL PHONE
   ===================== */
@media (max-width: 480px) {
    .container {
        padding-inline: 14px;
    }

    .page-background {
        height: 470px;
    }

    .top-bar {
        gap: 14px;
        padding-block: 14px;
    }

    .logo {
        align-items: flex-start;
        gap: 8px;
    }

    .logo-icon svg {
        width: 34px;
        height: 34px;
    }

    .logo-text h1 {
        font-size: 22px;
    }

    .logo-text p {
        font-size: 10px;
    }

    .nav-links {
        right: 14px;
        left: 14px;
    }

    .page-layout {
        gap: 20px;
        padding-top: 18px;
        padding-bottom: 32px;
    }

    .hero {
        height: clamp(330px, 95vw, 400px);
        margin-bottom: 24px;
    }

    .hero-content {
        padding: 20px 16px;
    }

    .hero-content h2 {
        font-size: 1.75rem;
    }

    .hero-content p {
        margin-bottom: 16px;
        font-size: 12.5px;
    }

    .btn {
        padding: 9px 18px;
        font-size: 12.5px;
    }

    .card-img-wrap img {
        height: 190px;
    }

    .card-body {
        padding: 14px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .cat-card img {
        height: 140px;
    }

    .social-stats {
        gap: 8px;
    }

    .stat-box {
        padding: 12px 6px;
        font-size: 18px;
    }

    .footer {
        margin-top: 40px;
    }

    .footer-bottom-links {
        flex-wrap: wrap;
        row-gap: 4px;
    }
}
