/* ====================================
   RESET & BASE STYLES
   ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0052a3;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ====================================
   CONTAINER & LAYOUT
   ==================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* ====================================
   HEADER STYLES
   ==================================== */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 12px 15px;
    gap: 10px;
}

.logo {
    flex: 1 1 auto;
    min-width: 150px;
}

.logo h1 {
    font-size: clamp(18px, 5vw, 28px);
    color: #0066cc;
    margin: 0;
}

.logo .tagline {
    font-size: 11px;
    color: #666;
    margin: 2px 0 0 0;
}

.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1 1 auto;
    justify-content: flex-end;
    align-items: center;
}

.nav-link {
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: clamp(11px, 3vw, 14px);
    padding: 5px 8px;
    white-space: nowrap;
}

.nav-link:hover {
    color: #0066cc;
}

.language-toggle {
    background: #0066cc;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: clamp(11px, 3vw, 14px);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-left: 10px;
}

.language-toggle:hover {
    background: #0052a3;
}

/* ====================================
   CATEGORY NAVIGATION
   ==================================== */
.category-nav {
    background-color: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 0;
    overflow-x: auto;
}

.category-nav .container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 0 15px;
}

.category-link {
    padding: 8px 12px;
    border-radius: 20px;
    background-color: #f0f0f0;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.category-link:hover,
.category-link.active {
    background-color: #0066cc;
    color: #fff;
}

/* ====================================
   MAIN CONTENT LAYOUT
   ==================================== */
.main-content {
    padding: 30px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

/* ====================================
   FEATURED ARTICLE
   ==================================== */
.featured-article {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    align-items: center;
}

.featured-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.featured-content {
    display: flex;
    flex-direction: column;
}

.featured-content h2 {
    font-size: clamp(20px, 5vw, 28px);
    margin: 0 0 15px 0;
    color: #1a1a1a;
    line-height: 1.3;
}

.featured-content .category-tag {
    display: inline-block;
    margin-bottom: 10px;
}

.featured-content p {
    margin: 10px 0;
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}

.publish-date {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* ====================================
   ARTICLES GRID
   ==================================== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.article-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 24px;
    max-width: 780px;
    margin: 0 auto;
    font-size: 16px;
    color: #333;
}

.article-content h3,
.article-content h2 {
    font-size: 20px;
    margin: 18px 0 10px;
    color: #111;
    line-height: 1.35;
}

.article-content p {
    font-size: 16px;
    color: #333;
    margin: 18px 0;
    line-height: 1.75;
    text-align: justify;
    text-justify: inter-word;
}

/* ====================================
   CATEGORY TAG & READ MORE
   ==================================== */
.category-tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e3f2fd;
    color: #0066cc;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    color: #0066cc;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: #0052a3;
    transform: translateX(3px);
}

/* ====================================
   LOAD MORE BUTTON
   ==================================== */
.load-more-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.load-more-btn {
    padding: 12px 40px;
    background-color: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.load-more-btn:hover {
    background-color: #0052a3;
}

/* ====================================
   SIDEBAR WIDGETS
   ==================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.ad-space {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-height: auto;
}

/* Top page ad banner (inserted on every page) */
.page-ad {
    background-color: #fff;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
    margin: 14px 0;
}
.page-ad .adsbygoogle { display:block; margin:0 auto; max-width:980px; }


.ad-placeholder {
    color: #999;
    font-size: 12px;
    padding: 40px 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    border: 1px dashed #ddd;
}

.widget {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.widget h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #1a1a1a;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 10px;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: #0066cc;
    font-size: 14px;
}

.widget a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.count {
    color: #999;
    font-size: 12px;
    margin-left: 5px;
}

/* ====================================
   NEWSLETTER FORM
   ==================================== */
.newsletter form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter input[type="email"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.newsletter input[type="email"]:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 4px rgba(0, 102, 204, 0.2);
}

.subscribe-btn {
    padding: 10px;
    background-color: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.subscribe-btn:hover {
    background-color: #0052a3;
}

/* ====================================
   ARTICLE DETAIL PAGE STYLES
   ==================================== */
.article-detail {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    padding: clamp(20px, 5vw, 40px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-header {
    margin-bottom: 30px;
}

.article-header h1 {
    font-size: clamp(24px, 7vw, 36px);
    color: #1a1a1a;
    margin: 10px 0;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    gap: clamp(10px, 3vw, 20px);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
    flex-wrap: wrap;
}

.publish-date,
.read-time {
    font-size: 12px;
    color: #999;
}

.article-featured-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
}

.article-image-container {
    margin: 25px 0;
    width: 100%;
}

.article-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.image-caption {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 8px;
    padding: 10px;
    background-color: #f5f5f5;
    border-left: 3px solid #0066cc;
}

.article-section {
    margin: 25px 0;
}

.article-section h2 {
    font-size: clamp(20px, 5vw, 28px);
    color: #1a1a1a;
    margin: 25px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #0066cc;
}

.article-section h3 {
    font-size: clamp(16px, 4vw, 20px);
    color: #333;
    margin: 15px 0 10px 0;
}

.article-section p {
    font-size: clamp(14px, 2.5vw, 16px);
    line-height: 1.8;
    color: #444;
    margin-bottom: 15px;
}

.article-section ul {
    margin-left: 25px;
    margin-bottom: 15px;
}

.article-section ul li {
    font-size: clamp(14px, 2.5vw, 16px);
    line-height: 1.8;
    color: #444;
    margin-bottom: 8px;
}

.ad-inline {
    margin: 30px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-left: 4px solid #0066cc;
}

.share-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.share-section h3 {
    font-size: clamp(18px, 4vw, 20px);
    margin-bottom: 15px;
    color: #1a1a1a;
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-block;
    padding: clamp(8px, 2vw, 10px) clamp(15px, 3vw, 20px);
    background-color: #0066cc;
    color: #fff;
    border-radius: 4px;
    font-size: clamp(12px, 2vw, 14px);
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.share-btn:hover {
    background-color: #0052a3;
    transform: translateY(-2px);
}

.share-btn.twitter {
    background-color: #1DA1F2;
}

.share-btn.twitter:hover {
    background-color: #1a91da;
}

.share-btn.facebook {
    background-color: #4267B2;
}

.share-btn.facebook:hover {
    background-color: #365899;
}

.share-btn.linkedin {
    background-color: #0A66C2;
}

.share-btn.linkedin:hover {
    background-color: #084da3;
}

/* ====================================
   FOOTER STYLES
   ==================================== */
.footer {
    background-color: #1a1a1a;
    color: #fff;
    padding: clamp(30px, 5vw, 40px) 0 20px;
    margin-top: 40px;
    width: 100%;
}

.footer .container {
    padding: 0 15px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: clamp(20px, 5vw, 30px);
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: clamp(16px, 4vw, 18px);
    margin-bottom: 15px;
    color: #0066cc;
}

.footer-section p {
    font-size: clamp(12px, 2vw, 14px);
    line-height: 1.6;
    color: #ccc;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    padding: 5px 0;
    font-size: clamp(12px, 2vw, 14px);
}

.footer-section a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #0066cc;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    color: #999;
    font-size: clamp(11px, 2vw, 13px);
}

/* ====================================
   RESPONSIVE DESIGN - TABLET (768px and below)
   ==================================== */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 15px;
        gap: 12px;
    }

    .logo {
        min-width: auto;
    }

    .logo h1 {
        font-size: 24px;
        margin: 0;
    }

    .nav {
        justify-content: center;
        gap: 12px;
        width: 100%;
    }

    .nav-link {
        font-size: 13px;
        padding: 8px 10px;
    }

    .main-content {
        padding: 20px 0;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .sidebar {
        order: 2;
        width: 100%;
    }

    .featured-article {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
        margin-bottom: 25px;
    }

    .featured-image {
        height: auto;
        max-height: 250px;
        order: -1;
    }

    .featured-content h2 {
        font-size: 22px;
        margin: 10px 0;
    }

    .featured-content p {
        margin: 8px 0;
        font-size: 14px;
    }

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .article-card {
        display: flex;
        flex-direction: column;
    }

    .article-card img {
        height: 180px;
    }

    .article-content {
        padding: 12px;
    }

    .article-content h3 {
        font-size: 16px;
        margin: 8px 0;
    }

    .article-content p {
        font-size: 13px;
        margin: 8px 0;
    }

    .article-card:hover {
        transform: translateY(-3px);
    }

    /* Article Detail Page */
    .article-detail {
        padding: 20px 15px;
        border-radius: 6px;
    }

    .article-header h1 {
        font-size: 28px;
        margin: 10px 0;
    }

    .article-meta {
        gap: 12px;
        font-size: 13px;
    }

    .article-featured-image {
        max-height: 300px;
        margin-bottom: 15px;
    }

    .article-section {
        margin: 20px 0;
    }

    .article-section h2 {
        font-size: 22px;
        margin: 20px 0 15px 0;
    }

    .article-section h3 {
        font-size: 18px;
        margin: 12px 0 8px 0;
    }

    .article-section p {
        font-size: 14px;
        margin: 10px 0;
        line-height: 1.6;
    }

    .article-image {
        max-height: 280px;
    }

    .image-caption {
        font-size: 12px;
        margin-top: 8px;
        padding: 8px;
    }

    /* Ads and Widgets */
    .ad-space {
        padding: 12px;
        margin-bottom: 15px;
    }

    .widget {
        padding: 12px;
        margin-bottom: 15px;
    }

    .widget h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    /* Share buttons */
    .share-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .share-btn {
        width: 100%;
        padding: 10px;
        font-size: 13px;
    }

    /* Category nav */
    .category-nav .container {
        gap: 10px;
        padding: 0 10px;
    }

    .category-link {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* ====================================
   RESPONSIVE DESIGN - MOBILE (480px and below)
   ==================================== */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .header .container {
        padding: 10px 12px;
        gap: 8px;
    }

    .logo h1 {
        font-size: 18px;
        margin: 0;
    }

    .logo .tagline {
        font-size: 10px;
        margin: 2px 0 0 0;
    }

    .nav {
        gap: 6px;
        width: 100%;
        justify-content: space-around;
    }

    .nav-link {
        font-size: 11px;
        padding: 5px 6px;
    }

    .main-content {
        padding: 15px 0;
    }

    .content-wrapper {
        gap: 15px;
        padding: 0 12px;
        max-width: 100%;
        margin: 0 auto;
    }

    .sidebar {
        width: 100%;
    }

    /* Center align content on mobile */
    .featured-content,
    .article-content,
    .article-header,
    .article-section,
    .widget,
    .ad-space,
    .share-section,
    .newsletter-form,
    .email-form,
    .footer-section {
        text-align: center;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .featured-article {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
        margin-bottom: 15px;
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
    }

    .featured-image {
        height: auto;
        max-height: 200px;
        border-radius: 4px;
    }

    .featured-content h2 {
        font-size: 18px;
        margin: 8px 0;
        line-height: 1.3;
    }

    .featured-content p {
        font-size: 13px;
        margin: 6px 0;
    }

    .category-tag {
        font-size: 11px;
        padding: 4px 8px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .article-card {
        display: flex;
        flex-direction: column;
        margin: 0 auto;
        max-width: 100%;
    }

    .article-card img {
        height: 160px;
        object-fit: cover;
    }

    .article-content {
        padding: 10px;
    }

    .article-content h3 {
        font-size: 14px;
        margin: 6px 0;
        line-height: 1.3;
    }

    .article-content p {
        font-size: 12px;
        margin: 6px 0;
    }

    .read-more {
        font-size: 12px;
        margin-top: 6px;
    }

    .load-more-btn {
        padding: 10px 30px;
        font-size: 14px;
    }

    /* Article Detail Page */
    .article-detail {
        padding: 12px 10px;
        border-radius: 4px;
    }

    .article-header h1 {
        font-size: 20px;
        margin: 8px 0 10px 0;
        line-height: 1.3;
    }

    .article-meta {
        flex-direction: column;
        gap: 4px;
        font-size: 11px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #e0e0e0;
    }

    .publish-date,
    .read-time {
        font-size: 11px;
    }

    .article-featured-image {
        max-height: 220px;
        margin-bottom: 12px;
        border-radius: 4px;
    }

    .article-section {
        margin: 15px 0;
        text-align: center;  /* Center align article sections */
    }

    .article-section h2 {
        font-size: 18px;
        margin: 15px 0 10px 0;
        padding-bottom: 8px;
        line-height: 1.3;
    }

    .article-section h3 {
        font-size: 15px;
        margin: 10px 0 6px 0;
    }

    .article-section p {
        font-size: 13px;
        margin: 8px 0;
        line-height: 1.6;
    }

    .article-image-container {
        margin: 15px 0;
    }

    .article-image {
        max-height: 180px;
        border-radius: 4px;
    }

    .image-caption {
        font-size: 11px;
        margin-top: 6px;
        padding: 8px;
    }

    /* Ads and Widgets */
    .ad-space {
        padding: 10px;
        margin-bottom: 12px;
    }

    .ad-placeholder {
        padding: 30px 8px;
        font-size: 11px;
    }

    .widget {
        padding: 10px;
        margin-bottom: 12px;
    }

    .widget h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .widget ul {
        padding-left: 16px;
    }

    .widget li {
        margin: 8px 0;
        font-size: 12px;
    }

    /* Forms */
    .email-form {
        flex-direction: column;
    }

    .email-input {
        width: 100%;
        padding: 8px;
        font-size: 13px;
        margin-bottom: 8px;
    }

    .subscribe-btn {
        width: 100%;
        padding: 8px;
        font-size: 13px;
    }

    /* Share buttons */
    .share-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .share-btn {
        width: 100%;
        padding: 8px;
        font-size: 12px;
    }

    /* Center align additional elements */
    .share-section,
    .newsletter-form,
    .email-form {
        text-align: center;
    }

    /* Category nav */
    .category-nav .container {
        gap: 6px;
        padding: 0 8px;
    }

    .category-link {
        padding: 5px 8px;
        font-size: 11px;
    }

    /* Footer */
    .footer-content {
        gap: 10px;
    }

    .footer-section h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .footer-section p,
    .footer-section li {
        font-size: 12px;
        margin: 6px 0;
    }

    /* Center align footer content */
    .footer-section {
        text-align: center;
    }

    .share-section {
        margin-top: 30px;
        padding-top: 20px;
    }

    .share-section h3 {
        font-size: 16px;
    }

    .share-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .share-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ====================================
   PRINT STYLES
   ==================================== */
@media print {
    .header,
    .category-nav,
    .sidebar,
    .footer {
        display: none;
    }

    body {
        background-color: #fff;
    }

    .article-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
