html {
    scroll-behavior: smooth;
}

html[lang="ta"] body {
    line-height: 1.65;
    letter-spacing: -0.2px;
}

html[lang="ta"] .nav-links {
    gap: 20px;
    font-size: 0.92rem;
    text-decoration: underline;
}

html[lang="ta"] .nav-links a {
    text-decoration: underline;
    text-underline-offset: 5px;
}

html[lang="ta"] .nav-actions {
    font-size: 0.92rem;
}

.lang-btn,
.share-btn,
.donate-btn {
    min-width: 78px;
    text-align: center;
}

.lang-btn {
    min-width: 82px;
}

.redirect-card,
.topic-card {
    min-height: 280px;
}

/* After Adding All HTML */
.page-hero {
    padding: 72px 32px 48px;
}

.page-hero h1 {
    max-width: 900px;
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 18px;
    color: #1f3d24;
}

.page-hero p {
    max-width: 760px;
    color: #1f3d24;
}

.content-section,
.media-section,
.conclusion-section {
    padding: 56px 32px;
}

.topic-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.topic-card {
    padding: 24px;
    border: 1px solid rgba(31, 61, 36, 0.18);
    border-radius: 24px;
    background-color: rgba(255, 255, 255, 0.45);
}

.topic-card h3 {
    margin-bottom: 12px;
    color: #1f3d24;
}

.topic-card p {
    color: #1f3d24;
}

.topic-card a {
    display: inline-block;
    margin-top: 16px;
    color: #1f3d24;
    font-weight: bold;
}

.media-placeholder {
    min-height: 320px;
    border: 2px dashed rgba(31, 61, 36, 0.35);
    border-radius: 24px;
    background-color: rgba(255, 255, 255, 0.35);
}

.conclusion-section {
    max-width: 900px;
}

.conclusion-section h2 {
    margin-bottom: 14px;
    color: #1f3d24;
}

.conclusion-section p {
    color: #1f3d24;
}

/* Before Adding All HTML */
.site-footer {
    padding: 32px;
    background-color: #8cc090;
    box-shadow: 0 -8px 24px rgba(31, 61, 36, 0.12);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.footer-brand h2 {
    color: #1f3d24;
}

.footer-brand p,
.footer-note {
    color: #1f3d24;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.footer-links a {
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

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

body {
    min-height: 100vh;
    line-height: 2;
    background-color: rgb(246, 248, 241);
    font-family: "Lato", sans-serif;
    /* font-weight: 500; */
}

::selection {
    background-color: #2f6f3e;
    color: #f6fff4;
}

::-moz-selection {
    background-color: #2f6f3e;
    color: #f6fff4;
}

h1,
h2,
h3,
.logo {
    font-family: "Merriweather", serif;
}

.site-header {
    width: 100%;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 32px;
    background-color: #8cc090;
    box-shadow:
        0 8px 24px rgba(31, 61, 36, 0.18),
        inset 0 0 26px #394c3a41;
}

.logo {
    font-weight: bold;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 29px;

}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo,
.nav-links a,
.footer-links a {
    color: #1f3d24;
}

.nav-links a {
    font-weight: 500;
}

.nav-links a:hover {
    text-decoration: underline;
}

.lang-btn,
.share-btn,
.donate-btn {
    position: relative;
    overflow: hidden;

    border: none;
    border-radius: 999px;
    padding: 7px 16px;

    background-color: #2f6f3e;
    color: #f6fff4;
    font-weight: 600;

    box-shadow: 0 4px 10px rgba(31, 61, 36, 0.18);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background-color 0.25s ease;
}

.donate-btn {
    font-weight: bold;
}

img,
video,
iframe {
    max-width: 100%;
}

a {
    text-decoration: none;
}

button,
a {
    font: inherit;
}

button {
    cursor: pointer;
}

/* Mobile */

@media (max-width: 900px) {
    .navbar {
        flex-wrap: wrap;
        justify-content: center;
        padding: 14px 20px;
    }

    .logo {
        width: 100%;
        text-align: center;
    }

    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 16px;
    }

    .nav-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

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

@media (max-width: 600px) {
    .navbar {
        gap: 14px;
        padding: 12px 16px;
    }

    .nav-links {
        gap: 12px;
        font-size: 0.95rem;
    }

    .lang-btn,
    .share-btn,
    .donate-btn {
        padding: 5px 12px;
    }

    .page-hero,
    .content-section,
    .media-section,
    .conclusion-section {
        padding: 44px 20px;
    }

    .topic-list {
        grid-template-columns: 1fr;
    }

    .media-placeholder {
        min-height: 220px;
    }
}

/* for class active link */
.nav-links a {
    color: #1f3d24;
    font-weight: 500;
    display: inline-block;
    transition:
        color 0.25s ease,
        transform 0.25s ease;
}

.nav-links a:hover {
    color: #0f5c2a;
    transform: scale(1.06);
}

/* Button Change */

.lang-btn,
.share-btn,
.donate-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;

    border: none;
    border-radius: 999px;
    padding: 7px 16px;

    background-color: rgba(246, 248, 241, 0.22);
    color: #1f3d24;
    box-shadow: none;
    font-weight: 600;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background-color 0.25s ease;
}

/* Shared pattern layers */
.lang-btn::before,
.share-btn::before,
.donate-btn::before,
.lang-btn::after,
.share-btn::after,
.donate-btn::after {
    position: absolute;
    inset: -40px;
    z-index: -1;

    color: rgba(190, 235, 165, 0.45);
    font-size: 0.85rem;
    line-height: 1;

    opacity: 0;
    white-space: pre;

    pointer-events: none;

    transition: opacity 0.25s ease;
}

/* Smooth moving leaf layers */
.lang-btn::before,
.share-btn::before,
.donate-btn::before,
.lang-btn::after,
.share-btn::after,
.donate-btn::after {
    position: absolute;
    inset: -40px;
    z-index: -1;

    color: rgba(190, 235, 165, 0.75);
    font-size: 0.85rem;
    line-height: 1.8;
    letter-spacing: 18px;

    opacity: 0;
    white-space: pre;
    pointer-events: none;

    transition: opacity 0.25s ease;
}

/* Layer 1: moves down-right */
.lang-btn::before,
.share-btn::before,
.donate-btn::before {
    content:
        "🌿      🌿      🌿      🌿      🌿\A"
        "   🌿      🌿      🌿      🌿      \A"
        "🌿      🌿      🌿      🌿      🌿\A"
        "   🌿      🌿      🌿      🌿      ";
    animation: leafFlowOne 6s linear infinite;
}

/* Layer 2: same idea, opposite direction for cross movement */
.lang-btn::after,
.share-btn::after,
.donate-btn::after {
    content:
        "   🌿      🌿      🌿      🌿      \A"
        "🌿      🌿      🌿      🌿      🌿\A"
        "   🌿      🌿      🌿      🌿      \A"
        "🌿      🌿      🌿      🌿      🌿";
    color: rgba(220, 255, 210, 0.663);
    animation: leafFlowTwo 6s linear infinite;
}

.lang-btn:hover::before,
.share-btn:hover::before,
.donate-btn:hover::before,
.lang-btn:hover::after,
.share-btn:hover::after,
.donate-btn:hover::after,
.donate-btn.active-link::before,
.donate-btn.active-link::after {
    opacity: 0.55;
}

@keyframes leafFlowOne {
    from {
        transform: translate(-60px, -36px);
    }

    to {
        transform: translate(60px, 36px);
    }
}

@keyframes leafFlowTwo {
    from {
        transform: translate(60px, -36px);
    }

    to {
        transform: translate(-60px, 36px);
    }
}

/* Click leaf pop effect */
.leaf-pop {
    position: fixed;
    z-index: 9999;
    pointer-events: none;

    font-size: 1rem;

    animation: leafJump 0.7s ease-out forwards;
}

@keyframes leafJump {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0.8) rotate(0deg);
    }

    60% {
        opacity: 1;
        transform: translateY(-28px) scale(1.2) rotate(18deg);
    }

    100% {
        opacity: 0;
        transform: translateY(-48px) scale(0.6) rotate(35deg);
    }
}

/* After that animation Mess */
@media (max-width: 600px) {

    .page-hero,
    .content-section,
    .media-section,
    .conclusion-section {
        padding: 44px 20px;
    }

    .topic-list {
        grid-template-columns: 1fr;
    }

    .media-placeholder {
        min-height: 220px;
    }

    .page-hero h1 {
        font-size: 2.2rem;
    }
}

/* After Mobile Fix */
.media-placeholder,
.intro-media,
.explainer-media {
    overflow: hidden;
}

.media-placeholder img,
.intro-media img,
.explainer-media img,
.media-placeholder iframe,
.intro-media iframe,
.explainer-media iframe {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border: 0;
}

/* Kyboard Focusing */
a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(31, 61, 36, 0.75);
    outline-offset: 4px;
}

/* Changing action color */
.lang-btn:hover,
.share-btn:hover,
.donate-btn:hover,
.donate-btn.active-link {
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(31, 61, 36, 0.12);
}

/* hero button effect */
.primary-link,
.secondary-link,
.topic-card a {
    position: relative;
    display: inline-block;
    overflow: hidden;

    border-radius: 999px;
    padding: 9px 18px;

    background-color: rgba(246, 248, 241, 0.35);
    color: #1f3d24;
    font-weight: 700;

    box-shadow: 0 4px 12px rgba(31, 61, 36, 0.10);

    transition:
        transform 0.25s ease,
        background-color 0.25s ease,
        box-shadow 0.25s ease,
        color 0.25s ease;
}

.primary-link:hover,
.secondary-link:hover,
.topic-card a:hover {
    transform: translateY(-2px);
    background-color: rgba(140, 192, 144, 0.35);
    color: #123d1f;
    box-shadow: 0 8px 18px rgba(31, 61, 36, 0.16);
}

.primary-link::before,
.secondary-link::before,
.topic-card a::before {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(120deg,
            transparent 0%,
            rgba(246, 255, 244, 0.38) 45%,
            transparent 70%);

    transform: translateX(-100%);
    transition: transform 0.45s ease;

    pointer-events: none;
}

.primary-link:hover::before,
.secondary-link:hover::before,
.topic-card a:hover::before {
    transform: translateX(100%);
}

/* Card Effects */
.redirect-card,
.topic-card {
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease,
        background-color 0.25s ease;
}

.redirect-card:hover,
.topic-card:hover {
    transform: translateY(-6px);
    border-color: rgba(31, 61, 36, 0.32);
    background-color: rgba(255, 255, 255, 0.62);
    box-shadow:
        0 12px 28px rgba(31, 61, 36, 0.027),
        0 0 14px rgba(140, 192, 144, 0.061);
}

/* ============================= */
/* MOBILE OPTIMIZATION - COMMON */
/* ============================= */

@media (max-width: 900px) {
    body {
        line-height: 1.7;
    }

    .navbar {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
        padding: 14px 20px;
    }

    .logo {
        width: 100%;
        text-align: center;
        font-size: 1.15rem;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 14px 18px;
        font-size: 0.95rem;
    }

    .nav-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .lang-btn,
    .share-btn,
    .donate-btn {
        padding: 6px 14px;
        font-size: 0.95rem;
    }

    .page-hero {
        padding: 56px 24px 36px;
    }

    .page-hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .content-section,
    .media-section,
    .conclusion-section {
        padding: 44px 24px;
    }

    .topic-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .topic-card {
        padding: 20px;
    }

    .site-footer {
        padding: 28px 24px;
    }

    .footer-links {
        gap: 14px;
    }
}

@media (max-width: 600px) {
    body {
        line-height: 1.65;
    }

    .navbar {
        padding: 12px 16px;
        gap: 12px;
    }

    .logo {
        font-size: 1.05rem;
    }

    .nav-links {
        gap: 10px 14px;
        font-size: 0.9rem;
    }

    .nav-links a:hover {
        transform: none;
    }

    .nav-actions {
        gap: 8px;
    }

    .lang-btn,
    .share-btn,
    .donate-btn {
        padding: 5px 12px;
        font-size: 0.88rem;
    }

    .page-hero {
        padding: 44px 20px 28px;
    }

    .page-hero h1 {
        font-size: 2rem;
        line-height: 1.15;
    }

    .page-hero p {
        font-size: 0.95rem;
    }

    .content-section,
    .media-section,
    .conclusion-section {
        padding: 36px 20px;
    }

    .section-heading h2 {
        font-size: 1.8rem;
    }

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

    .topic-card {
        padding: 18px;
        border-radius: 18px;
    }

    .media-placeholder {
        min-height: 220px;
        border-radius: 18px;
    }

    .site-footer {
        padding: 28px 20px;
    }

    .footer-content {
        gap: 14px;
    }

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

    .footer-brand h2 {
        font-size: 1.3rem;
    }
}

/* Fix mobile horizontal overflow */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Causes Content */
/* Article Page Layout */
.article-hero {
    padding: 56px 28px 28px;
    max-width: 1050px;
}

.article-hero h1 {
    max-width: 1010px;
    font-size: 80px;
    line-height: 1.08;
    margin-bottom: 18px;
    color: #1f3d24;
}

.hero-intro {
    max-width: 1010px;
    font-size: 1.08rem;
    line-height: 1.75;
    margin-bottom: 14px;
    color: #1f3d24;
}

.article-content {
    max-width: 1010px;
    margin: 0 auto;
    padding: 16px 28px 56px;
}

.article-section {
    margin-bottom: 44px;
}

.article-section h2 {
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    line-height: 1.18;
    margin-bottom: 16px;
    color: #1f3d24;
}

.article-section p {
    font-size: 1.03rem;
    line-height: 1.78;
    margin-bottom: 15px;
    color: #253f29;
}

.watch-section {
    margin-top: 24px;
}

.video-resource-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 22px;
}

.video-resource {
    padding: 20px;
    border-radius: 18px;
    background-color: rgba(140, 192, 144, 0.16);
    border: 1px solid rgba(31, 61, 36, 0.16);
}

.video-resource .resource-label {
    margin-bottom: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: #2f6f3e;
}

.video-resource h3 {
    margin-bottom: 10px;
    color: #1f3d24;
    line-height: 1.3;
}

.video-resource p {
    font-size: 0.96rem;
    line-height: 1.65;
    margin-bottom: 14px;
}

.video-resource a {
    display: inline-block;
    color: #1f3d24;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 5px;
}

@media (max-width: 700px) {
    .article-hero {
        padding: 44px 20px 24px;
    }

    .article-content {
        padding: 12px 20px 46px;
    }

    .article-section {
        margin-bottom: 36px;
    }

    .article-section p {
        font-size: 0.98rem;
        line-height: 1.7;
    }

    .video-resource-list {
        grid-template-columns: 1fr;
    }
}

.youtube-embed {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-top: 14px;
    border-radius: 16px;
    overflow: hidden;
    background-color: #101810;
    box-shadow: 0 10px 24px rgba(31, 61, 36, 0.12);
}

.youtube-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.video-resource h3,
.featured-video h3,
.inline-video h3 {
    font-family: "Merriweather", serif;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.35;
    margin-bottom: 10px;
    color: #1f3d24;
}

/* ============================= */
/* REDIRECT / CONTINUE CARDS */
/* ============================= */

.page-cards {
    width: min(1120px, calc(100% - 56px));
    margin: 48px auto;
    padding: 36px 0;
}

.page-cards .section-heading {
    max-width: 760px;
    margin-bottom: 28px;
}

.page-cards .section-heading h2 {
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.15;
    margin-bottom: 12px;
    color: #1f3d24;
}

.page-cards .section-heading p:not(.section-label) {
    font-size: 1.02rem;
    line-height: 1.7;
    color: #253f29;
}

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

.redirect-card {
    display: flex;
    flex-direction: column;

    min-height: 270px;
    padding: 22px;

    border: 1px solid rgba(31, 61, 36, 0.16);
    border-radius: 22px;

    box-shadow:
        0 10px 26px rgba(31, 61, 36, 0.08),
        inset 0 0 22px rgba(255, 255, 255, 0.28);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease,
        background-color 0.25s ease;
}

.redirect-card:hover {
    transform: translateY(-6px);
    border-color: rgba(31, 61, 36, 0.32);
    box-shadow:
        0 18px 38px rgba(31, 61, 36, 0.14),
        inset 0 0 26px rgba(255, 255, 255, 0.32);
}

.redirect-card h3 {
    margin-bottom: 12px;
    color: #1f3d24;
    font-size: 1.18rem;
    line-height: 1.3;
}

.redirect-card p {
    color: #253f29;
    font-size: 0.96rem;
    line-height: 1.65;
    margin-bottom: 18px;
}

.redirect-card a {
    width: fit-content;
    margin-top: auto;

    color: #1f3d24;
    font-weight: 800;

    text-decoration: underline;
    text-underline-offset: 5px;

    transition:
        transform 0.25s ease,
        color 0.25s ease;
}

.redirect-card a:hover {
    color: #0f5c2a;
    transform: translateX(4px);
}

/* Tablet */
@media (max-width: 950px) {
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .redirect-card {
        min-height: 240px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .page-cards {
        width: min(100% - 40px, 1120px);
        margin: 34px auto;
        padding: 24px 0;
    }

    .page-cards .section-heading {
        margin-bottom: 22px;
    }

    .page-cards .section-heading h2 {
        font-size: 1.75rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .redirect-card {
        min-height: auto;
        padding: 20px;
        border-radius: 18px;
    }

    .redirect-card h3 {
        font-size: 1.12rem;
    }

    .redirect-card p {
        font-size: 0.94rem;
        line-height: 1.6;
    }
}

/* ============================= */
/* ARTICLE HERO MOBILE FIX */
/* ============================= */

.article-hero {
    width: min(1050px, calc(100% - 56px));
    margin: 0 auto;
    padding: 56px 0 28px;
    display: block;
}

.article-hero .section-label {
    margin-bottom: 12px;
}

.article-hero h1 {
    width: 100%;
    max-width: 1010px;
    font-size: clamp(2.4rem, 7vw, 5rem);
    line-height: 1.08;
    margin-bottom: 18px;
    color: #1f3d24;
}

.article-hero .hero-intro {
    width: 100%;
    max-width: 920px;
    font-size: 1.08rem;
    line-height: 1.75;
    margin-bottom: 14px;
    color: #1f3d24;
}

/* Tablet */
@media (max-width: 900px) {
    .article-hero {
        width: min(100% - 44px, 1050px);
        padding: 46px 0 24px;
    }

    .article-hero h1 {
        font-size: clamp(2.15rem, 9vw, 3.6rem);
        line-height: 1.12;
    }

    .article-hero .hero-intro {
        font-size: 1rem;
        line-height: 1.68;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .article-hero {
        width: min(100% - 36px, 1050px);
        padding: 36px 0 18px;
    }

    .article-hero h1 {
        font-size: clamp(2rem, 12vw, 3rem);
        line-height: 1.1;
        margin-bottom: 14px;
        overflow-wrap: break-word;
    }

    .article-hero .hero-intro {
        font-size: 0.96rem;
        line-height: 1.62;
        margin-bottom: 12px;
    }
}

/* Extra small phones */
@media (max-width: 380px) {
    .article-hero {
        width: min(100% - 28px, 1050px);
    }

    .article-hero h1 {
        font-size: 2rem;
    }
}