/*
Theme Name: Srilankan Guy
Theme URI: https://srilankanguy.com
Author: Senior WP Architect
Description: A high-trust, editorial-style opportunity theme with Pitchfork-inspired layout.
Version: 3.1.0
*/

:root {
    /* --- Locked Palette --- */
    --color-bg: #FFFFFF;
    --color-black: #0B0B0B;      /* Headers, Footer, Trust Section */
    --color-accent: #F5C400;     /* Sri Lanka Yellow - CTAs, Badges */
    --color-text-main: #0F172A;
    --color-text-sub: #475569;
    --color-border: #E2E8F0;
    
    /* --- Typography --- */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    --container-width: 1200px;
    --header-height: 72px;
    --grid-gap: 1px; /* Editorial border lines */
}

/* --- Reset & Base --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: var(--color-accent); }

ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 { 
    font-weight: 800; 
    letter-spacing: -0.02em; 
    line-height: 1.2; 
    color: var(--color-black);
}

/* --- Utilities --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--color-accent);
    color: #000; /* Contrast on yellow */
    border-color: var(--color-accent);
}
.btn-primary:hover {
    background-color: #dcb000;
    border-color: #dcb000;
    color: #000;
}

.btn-outline {
    background: transparent;
    border-color: var(--color-black);
    color: var(--color-black);
}
.btn-outline:hover {
    background: var(--color-black);
    color: #fff;
}

.badge {
    display: inline-block;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    background: var(--color-black);
    color: #fff;
    margin-bottom: 10px;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-accent);
    color: #000;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 2px;
}

/* --- Header --- */
.site-header {
    background: var(--color-black);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #222;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.site-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 32px;
    height: 32px;
    fill: var(--color-accent);
}

.menu-toggle { 
    display: none; 
    background: none; 
    border: none; 
    color: #fff;
    font-size: 1.5rem; 
    cursor: pointer; 
}

/* --- Navigation --- */
.main-navigation ul { display: flex; gap: 30px; }
.main-navigation a { 
    font-weight: 600; 
    font-size: 0.95rem; 
    color: #ccc;
}
.main-navigation a:hover { color: var(--color-accent); }

/* --- Hero Section (Cover Story) --- */
.hero-section {
    border-bottom: 1px solid var(--color-border);
    background: #fdfdfd;
}
.hero-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    min-height: 500px;
}
.hero-content {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--color-border);
}
.hero-media {
    background-color: #eee;
    background-size: cover;
    background-position: center;
    position: relative;
}
.hero-title {
    font-size: 3rem;
    margin: 15px 0 20px;
    line-height: 1.1;
}
.hero-excerpt {
    font-size: 1.125rem;
    color: var(--color-text-sub);
    margin-bottom: 30px;
    max-width: 500px;
}
.hero-cat-label {
    color: var(--color-accent);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
}

/* --- Section Headers --- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-black);
}
.section-title {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Latest Grid --- */
.latest-section { padding: 60px 0; }
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px; /* Clean spacing, not border grid for readability */
}

.post-card {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 20px;
}
.post-card:hover h3 { color: var(--color-accent-hover); }

.post-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.post-cat {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-sub);
}
.post-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}
.post-details {
    font-size: 0.9rem;
    color: var(--color-text-sub);
    margin-top: auto;
    padding-top: 15px;
}

/* --- Category Sections --- */
.category-section { padding: 60px 0; border-top: 1px solid var(--color-border); }
.cat-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--color-border);
}
.cat-list-item:hover { background: #fafafa; }
.cat-list-title { font-weight: 700; font-size: 1.1rem; }
.cat-list-meta { font-size: 0.85rem; color: var(--color-text-sub); }

/* --- Trust Section --- */
.trust-section { background: var(--color-black); color: #fff; padding: 80px 0; text-align: center; }
.trust-title { color: var(--color-accent); margin-bottom: 15px; font-size: 2rem; }
.trust-badges { display: flex; justify-content: center; gap: 40px; margin-top: 40px; }
.trust-item { font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 10px; }
.trust-dot { width: 8px; height: 8px; background: var(--color-accent); border-radius: 50%; }

/* --- Newsletter --- */
.newsletter-section { padding: 60px 0; background: var(--color-bg); text-align: center; border-top: 1px solid var(--color-border); }
.newsletter-box { max-width: 500px; margin: 0 auto; padding: 30px; border: 1px dashed var(--color-border); }

/* --- Single Post --- */
.single-container { max-width: 800px; margin: 0 auto; padding: 60px 20px; }
.single-header { text-align: center; margin-bottom: 50px; border-bottom: 1px solid var(--color-border); padding-bottom: 40px; }
.single-title { font-size: 3rem; margin: 15px 0; }
.single-cat { color: var(--color-accent); font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; }

.meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--color-border);
    border: 1px solid var(--color-border);
    margin-bottom: 40px;
}
.meta-cell {
    background: #fff;
    padding: 20px;
    text-align: center;
}
.meta-label { display: block; font-size: 0.75rem; text-transform: uppercase; color: var(--color-text-sub); font-weight: 700; margin-bottom: 5px; }
.meta-val { font-weight: 700; color: var(--color-black); }

.risk-box {
    background: #f9f9f9;
    padding: 20px;
    border-left: 5px solid var(--color-black);
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-body { font-size: 1.125rem; line-height: 1.8; margin-bottom: 60px; color: var(--color-text-main); }
.content-body h2 { margin: 40px 0 20px; font-size: 1.75rem; }

.apply-box-desktop {
    background: var(--color-black);
    padding: 40px;
    text-align: center;
    color: #fff;
    border-radius: 4px;
}
.apply-box-desktop p { color: #aaa; font-size: 0.85rem; margin-top: 15px; }

.mobile-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    padding: 15px 20px;
    border-top: 1px solid var(--color-border);
    z-index: 999;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
}

/* --- Footer --- */
.site-footer {
    background: var(--color-black);
    color: #888;
    padding: 80px 0 40px;
    border-top: 4px solid var(--color-accent);
}
.footer-logo { 
    color: #fff; 
    font-weight: 900; 
    font-size: 1.5rem; 
    text-transform: uppercase; 
    margin-bottom: 20px; 
    display: block; 
}
.social-links a { color: #fff; margin-right: 15px; font-size: 1.2rem; }
.btn-donate {
    display: inline-block;
    background: var(--color-accent);
    color: #000;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50px;
    margin-top: 20px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .hero-wrapper { grid-template-columns: 1fr; }
    .hero-media { height: 300px; order: -1; }
    .post-grid { grid-template-columns: 1fr; }
    .meta-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .main-navigation {
        display: none;
        position: fixed;
        top: var(--header-height); left: 0; right: 0; bottom: 0;
        background: var(--color-black);
        padding: 40px;
        z-index: 999;
    }
    .main-navigation.toggled { display: block; }
    .main-navigation ul { flex-direction: column; align-items: center; }
    .main-navigation a { font-size: 1.5rem; color: #fff; }
    
    .single-title { font-size: 2.25rem; }
    .mobile-sticky-cta { display: block; }
    .apply-box-desktop { display: none; }
}
