/* ---------- Base / Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

:root{
    --primary: #3a86ff;
    --secondary: #ff9e00;
    --accent: #ff006e;
    --light: #f8f9fa;
    --light-2: #c0c0c0;
    --dark: #212529;
    --success: #38b000;
    --muted: #6c757d;
    --border: #eaebec;
    --background: #ffffff;
    --foreground: #212529;
    --card-bg: #ffffff;
    --footer-bg: #f8f9fa;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Dark Mode */
[data-theme="dark"] {
    --primary: #5a9fff;
    --light: #1a1a2e;
    --light-2: #4a4a5a;
    --dark: #f8f9fa;
    --muted: #a0a0b0;
    --border: #2a2a3e;
    --background: #0f0f1a;
    --foreground: #e8e8f0;
    --card-bg: #1a1a2e;
    --footer-bg: #1a1a2e;
    --shadow: rgba(0, 0, 0, 0.3);
}

html, body { 
    height: 100%; 
    scroll-behavior: smooth;
}
body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  color: var(--foreground);
  background-color: var(--background);
  line-height:1.6;
}

.container {
    width: 100%;
    /* max-width: 1440px; */
    max-width: 768px;
    margin: 0 auto;
    padding: 0 20px;
}

.more-articles .container {
    max-width: 560px;
}

/* ---------- Header Styles - Mobile First ---------- */
.site-header {
    background-color: var(--background);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.5rem 0;
}

.site-header .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 0.5rem;
}

.logo__name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 1rem 2rem;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--background);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

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

.nav-link {
    padding: 0.75rem 0;
    text-decoration: none;
    color: var(--foreground);
    font-weight: 500;
    text-align: center;
    border-radius: 10px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-link:hover {
    background-color: var(--primary);
    color: white;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: none; */
    height: 30px;
    width: 30px;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
    transition: background-color 0.2s, color 0.2s;
}

.mobile-menu-btn:hover {
    background-color: var(--primary);
    color: white;
    border-radius: 4px;
}

/* ---------- Article Styles ---------- */
.article-main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.article-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.article-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.article-meta .highlight {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
}

.article-meta .highlight:hover {
    text-decoration: underline;
    cursor: pointer;
}

.article-link {
    display: flex;
    justify-content: center;
    align-items: center;
}

.article-reference {
    text-decoration: none;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--muted);
    font-style: italic;
}

.article-reference:hover {
    text-decoration: underline;
}

.article-hero-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: 0rem;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-section {
    margin-bottom: 2.5rem;
}

.article-section h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.article-section h3 {
    font-size: 1.4rem;
    color: var(--dark);
    margin: 1.5rem 0 0.75rem 0;
}

.article-section p {
    margin-bottom: 1rem;
    color: var(--foreground);
}

.article-section ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.article-section li {
    margin-bottom: 0.75rem;
    color: var(--foreground);
}

.key-points {
    background-color: var(--light);
    padding: 1.5rem 2rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary);
}

.key-points li {
    font-weight: 500;
}

.article-media {
    margin: 2rem 0;
    text-align: center;
}

.article-inline-image {
    width: 100%;
    max-width: 700px;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.article-inline-image:hover {
    transform: scale(1.02);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0.75rem;
}

.media-caption {
    font-size: 0.9rem;
    color: var(--muted);
    font-style: italic;
    margin-top: 0.75rem;
    text-align: center;
}

.highlight-link {
    color: var(--primary);
    text-decoration: none;
}

.highlight-link:hover {
    text-decoration: underline;
}

.article-cta {
    background-color: var(--light);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    margin-top: 3rem;
}

.article-cta h3 {
    color: var(--primary);
    margin-top: 0;
}

.btn-back {
    display: inline-block;
    text-decoration: none;
    color: var(--light);
    background: var(--primary);
    border-radius: 0.5rem;
    padding: 0.75rem 2rem;
    margin-top: 1rem;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-back:hover {
    background-color: var(--dark);
    transform: translateY(-2px);
}

/* ---------- More Articles Styles - Mobile First ---------- */
.section-title {
    text-align: center;
    font-size: 2rem;
    margin: 2rem 0 1rem 0;
    color: var(--primary);
}

.more-articles__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem 2rem 1rem;
}

.card {
    display: grid;
    grid-template-rows: 200px auto 1fr auto;
    /* grid-template-rows: repeat(auto, 1fr); */
    background-color: var(--light);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

.card:hover img {
    transform: scale(1.05);
}

.card h4 {
    margin: 1rem;
    color: var(--dark);
    font-size: 1.25rem;
    align-self: start;
    min-height: 4rem;
}

.card p { 
    margin: 0 1rem 1rem 1rem;
    /* background-color: red; */
    color: var(--muted);
    align-self: start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1rem;
}

.card img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    transition: transform 0.2s ease;
}

.btn-read-article {
    margin: 0 1rem 1rem;
    text-decoration: none;
    align-self: end;
    text-align: center;
    background: var(--border);
    color: var(--foreground);
    border-radius: 0.5rem;
    padding: 0.6rem 2rem;
    width: calc(100% - 2rem);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.btn-read-article:hover {
    background-color: var(--primary);
    border: none;
    color: white;
}

/* ---------- Scroll to Top Button ---------- */
#scrollToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #212529;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

[data-theme="dark"] #scrollToTopBtn {
    background-color: #f8f9fa;
    color: #0f0f1a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#scrollToTopBtn.show {
    opacity: 1;
    visibility: visible;
}

#scrollToTopBtn:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

[data-theme="dark"] #scrollToTopBtn:hover {
    color: white;
}

#scrollToTopBtn:active {
    transform: translateY(-1px);
}

/* ---------- Footer Styles ---------- */
.site-footer {
    background-color: var(--footer-bg);
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

.btn-contact-us {
    display: inline-block;
    text-decoration: none;
    color: var(--light);
    background: var(--dark);
    border-radius: 0.5rem;
    padding: 0.6rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-contact-us:hover {
    background-color: var(--primary);
    border: none;
    transform: translateY(-2px);
}


/* ---------- Responsive Styles ---------- */
@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }

    .container {
        max-width: 768px;
    }

    .more-articles .container {
        max-width: 768px;
    }

    .site-header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        padding: 0.5rem 0;
        width: auto;
        justify-content: flex-start;
    }

    .main-nav {
        display: flex !important;
        position: static;
        top: 0;
        box-shadow: none;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        width: auto;
        padding: 0;
        gap: 2rem;
    }

    .nav-link {
        padding: 0.5rem 0;
        transition: color 0.2s;
    }

    .nav-link:hover {
        color: var(--primary);
        background: transparent;
        transform: translateY(-2px);
        transition: transform 0.2s;
    }

    .article-container {
        max-width: 768px;
    }

    .article-title {
        font-size: 3rem;
    }

    .more-articles__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 1rem 2rem 1rem;
        max-width: 768px;
    }

    .site-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem;
        background: var(--footer-bg);
    }

    .site-footer .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--footer-bg)
    }
}

@media (min-width: 1200px) {
    .mobile-menu-btn {
        display: none;
    }

    .container {
        max-width: 1200px;
    }

    .more-articles .container {
        max-width: 1200px;
    }

    .site-header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        padding: 0.5rem 0;
        width: auto;
        justify-content: flex-start;
    }

    .main-nav {
        display: flex !important;
        position: static;
        top: 0;
        box-shadow: none;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        width: auto;
        padding: 0;
        gap: 2rem;
    }

    .nav-link {
        padding: 0.5rem 0;
        transition: color 0.2s;
    }

    .nav-link:hover {
        background-color: transparent;
        color: var(--primary);
        transform: translateY(-2px);
        transition: transform 0.2s;
    }

    .article-container {
        max-width: 1000px;
    }

    .article-title {
        font-size: 3.5rem;
    }

    .article-image-container {
        display: flex;
        justify-content: center;
    }

    .article-hero-image {
        width: 100%;
        max-height: 400px;
        max-width: 768px;
        object-fit: cover;
        border-radius: 1rem;
        margin-bottom: 0rem;
    }

    .article-content {
        font-size: 1.15rem;
    }

    .more-articles__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        padding: 0 1rem 2rem 1rem;
        max-width: 1200px;
    }

    .article-section h2 {
        font-size: 2rem;
    }

    .article-section h3 {
        font-size: 1.5rem;
    }

    .site-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem;
        background: var(--footer-bg);
    }

    .site-footer .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--footer-bg);
    }
}

@media (min-width: 1440px) {
    .container {
        max-width: 1440px;
    }

    .more-articles .container {
        max-width: 1440px;
    }

    .article-container {
        max-width: 1100px;
    }

    .article-title {
        font-size: 4rem;
    }

    .article-content {
        font-size: 1.2rem;
    }

    .article-section h2 {
        font-size: 2.2rem;
    }

    .article-section h3 {
        font-size: 1.6rem;
    }

    .more-articles__grid {
        max-width: 1440px;
    }
}


/* ---------- Theme Toggle ---------- */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    font-size: 1.25rem;
}

.theme-toggle:hover {
    background-color: var(--light);
}

.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }

[data-theme="dark"] .theme-toggle .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }

/* ---------- Breadcrumb Styles ---------- */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--muted);
}

.breadcrumb-current {
    color: var(--foreground);
    font-weight: 500;
}

/* ---------- Scroll Progress Indicator ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary);
    z-index: 1001;
    transition: width 0.1s ease-out;
}
