:root {
    --color-green: #009C3B;
    --color-yellow: #FFDF00;
    --color-blue: #002776;
    --color-white: #FFFFFF;
    --color-text: #202124;
    --color-bg: #f8f9fa;
    --color-text-muted: #444;
    --color-subtitle: #666;
    --color-border: #eee;
    --color-hover: #f1f8f4;
}

[data-theme="dark"] {
    --color-bg: #121212;
    --color-text: #e0e0e0;
    --color-white: #1e1e1e;
    --color-blue: #66b2ff;
    --color-text-muted: #b0b0b0;
    --color-subtitle: #999;
    --color-border: #333;
    --color-hover: #2a2a2a;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header {
    background: linear-gradient(135deg, var(--color-green) 0%, #007A2E 100%);
    padding: 15px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-bottom: 6px solid var(--color-yellow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.progress-bar-container {
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 6px;
    background-color: transparent;
    z-index: 102;
}

.progress-bar {
    height: 100%;
    background-color: var(--color-yellow);
    width: 0%;
    transition: width 0.15s ease-out;
}

.theme-toggle {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 101;
    transition: transform 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-50%) scale(1.15);
}

.logo-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
    position: relative;
}

.logo {
    max-height: 110px;
    object-fit: contain;
    filter: drop-shadow(0 0 2px white) drop-shadow(0 0 2px white) drop-shadow(0 0 3px white);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.header-subtitle {
    font-size: 1.5rem;
    color: var(--color-white);
    font-weight: 700;
    font-style: italic;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
}

main {
    flex: 1;
}

.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.post {
    background-color: var(--color-white);
    padding: 50px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.post-title {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 2.8rem;
    color: var(--color-blue);
    margin-bottom: 15px;
    text-align: center;
    line-height: 1.25;
    font-weight: 700;
}

.post .post-subtitle {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.4rem;
    color: var(--color-subtitle);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 400;
    line-height: 1.5;
}

.post h2 {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.9rem;
    color: var(--color-green);
    margin-top: 40px;
    margin-bottom: 15px;
    border-left: 5px solid var(--color-yellow);
    padding-left: 15px;
    font-weight: 600;
}

.post p {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--color-text-muted);
    line-height: 1.8;
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 25px;
    margin-top: 10px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    display: block;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.article-image:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Ad Container */
.ad-container {
    margin: 50px 0;
    background: linear-gradient(135deg, var(--color-white) 0%, var(--color-bg) 100%);
    border: 3px solid var(--color-yellow);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.ad-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    border-color: var(--color-green);
}

.ad-link {
    display: flex;
    align-items: stretch;
    text-decoration: none;
    color: inherit;
    flex-direction: row;
}

.ad-image {
    width: 401px;
    height: auto;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.ad-text {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ad-text h3 {
    color: var(--color-blue);
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.ad-text p {
    font-size: 1.3rem;
    color: var(--color-subtitle);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Custom Table */
.table-container {
    margin: 50px 0;
    overflow-x: auto;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    border: 3px solid var(--color-yellow);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 1.1rem;
}

.custom-table th, .custom-table td {
    padding: 16px;
    border-bottom: 1px solid var(--color-border);
}

.custom-table th {
    background-color: var(--color-green);
    color: var(--color-white);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
}

.custom-table tbody tr {
    transition: background-color 0.3s ease;
}

.custom-table tbody tr:hover {
    background-color: var(--color-hover);
}

.custom-table tr.qualified td:first-child {
    border-left: 6px solid var(--color-green);
    font-weight: bold;
    color: var(--color-green);
}

.custom-table td:nth-child(2) {
    text-align: left;
    font-weight: 600;
    color: var(--color-blue);
}

.custom-table .flag {
    font-size: 1.3rem;
    margin-right: 8px;
    vertical-align: middle;
}

.table-container figcaption {
    padding: 12px;
    background-color: var(--color-bg);
    color: #555;
    font-size: 1rem;
    text-align: center;
    font-style: italic;
    border-top: 1px solid #ddd;
}

/* Footer */
.footer {
    background-color: var(--color-blue);
    color: var(--color-white);
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
    border-top: 5px solid var(--color-yellow);
}

.footer p {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Meta and Share */
.post-meta {
    text-align: center;
    color: #888;
    font-size: 0.95rem;
    margin-top: -15px;
    margin-bottom: 25px;
    font-weight: 500;
}

.share-buttons-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 45px;
    flex-wrap: wrap;
}

.share-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #555;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 50px;
    text-decoration: none;
    color: white !important;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-btn.whatsapp { background-color: #25D366; }
.share-btn.btn-x { background-color: #000000; }

/* CTA */
.cta-button {
    display: inline-block;
    background-color: var(--color-green);
    color: var(--color-white);
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.15rem;
    margin-top: 25px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 156, 59, 0.3);
    transition: background-color 0.3s, transform 0.2s;
    text-align: center;
}

.ad-container:hover .cta-button {
    background-color: #007A2E;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 156, 59, 0.4);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 25px;
    background-color: var(--color-green);
    color: var(--color-white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background-color 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #007A2E;
}

/* Floating CTA */
.floating-cta {
    position: absolute;
    right: 25px;
    top: 50vh;
    transform: translateY(-50%);
    background-color: var(--color-white);
    border: 3px solid var(--color-yellow);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    z-index: 1000;
    transition: top 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 170px;
}

.floating-cta:hover {
    transform: translateY(calc(-50% - 8px));
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    border-color: var(--color-green);
}

.floating-cta img {
    width: 110px;
    border-radius: 6px;
    margin-bottom: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.floating-cta-title {
    font-size: 0.95rem;
    color: var(--color-blue);
    font-weight: 700;
    text-align: center;
    line-height: 1.25;
    margin-bottom: 12px;
}

.floating-cta-btn {
    background-color: var(--color-green);
    color: var(--color-white);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    width: 100%;
    text-transform: uppercase;
    transition: background-color 0.2s;
}

.floating-cta:hover .floating-cta-btn {
    background-color: #007A2E;
}

/* Responsive */
@media (max-width: 1100px) {
    .header-subtitle {
        position: static;
        transform: none;
        width: auto;
        flex: 1;
        text-align: center;
    }
    .ad-link {
        flex-direction: column;
    }
    .ad-image {
        width: 100%;
        max-width: 401px;
        height: auto;
        margin: 0 auto;
    }
    .ad-text {
        text-align: center;
        padding: 30px 20px;
    }
    .post {
        padding: 30px 20px;
    }
    .post-title {
        font-size: 2.2rem;
    }
    .floating-cta {
        top: 50vh;
        bottom: auto;
        right: 15px;
        max-width: 130px;
        padding: 12px;
    }
    .floating-cta img {
        width: 80px;
    }
    .floating-cta-title {
        font-size: 0.85rem;
    }
    .floating-cta-btn {
        font-size: 0.8rem;
        padding: 8px;
    }
}

@media (max-width: 600px) {
    .logo-container {
        flex-direction: column;
        gap: 10px;
    }
    .header-subtitle {
        font-size: 1.2rem;
        position: static;
        transform: none;
        width: auto;
        flex: auto;
        text-align: center;
    }
    
    .floating-cta {
        position: fixed !important;
        top: auto !important;
        flex-direction: row;
        max-width: calc(100% - 30px);
        left: 15px;
        right: 15px;
        bottom: 15px;
        justify-content: space-between;
        padding: 10px 15px;
        border-radius: 12px;
        box-shadow: 0 -4px 15px rgba(0,0,0,0.15);
    }
    .floating-cta img {
        display: none;
    }
    .floating-cta-title {
        margin-bottom: 0;
        text-align: left;
        font-size: 0.9rem;
    }
    .floating-cta-btn {
        width: auto;
        padding: 10px 15px;
    }
    
    .back-to-top {
        bottom: 80px;
        right: 15px;
    }
}

/* Twemoji Styles */
img.emoji {
    height: 1.2em;
    width: 1.2em;
    margin: 0 .05em 0 .1em;
    vertical-align: -0.1em;
}
