/* ==========================================================================
   FILE: style.css
   ========================================================================== */

/* Google Fonts - Sinhala & English Support */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+Sinhala:wght@400;500;600;700&display=swap');

/* Dynamic Theme Variables */
:root {
    --primary: #1e40af;          /* Primary Blue */
    --primary-hover: #1d4ed8;    /* Darker Blue for hover states */
    --accent: #0284c7;           /* Accent Blue/Cyan */
    --bg-color: #f8fafc;         /* Light Gray Background */
    --card-bg: #ffffff;          /* White Card Background */
    --text-color: #1e293b;       /* Dark Text */
    --text-muted: #64748b;      /* Muted Gray Text */
    --border-color: #e2e8f0;    /* Card Border Color */
    --radius: 12px;              /* Standard Border Radius */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', 'Noto Sans Sinhala', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 24px 16px;
}

/* Container Structure */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

.main-content {
    background: transparent;
}

/* Back Link Button */
.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px;
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.back-link:hover {
    background-color: var(--primary);
    color: #ffffff;
    transform: translateX(-3px);
}

/* Content Section Layout */
.content-section {
    background-color: transparent;
}

/* Section Header & Badges */
.section-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.sub-badge {
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.section-header h2 {
    font-size: 1.75rem;
    color: var(--text-color);
    line-height: 1.3;
    font-weight: 700;
}

.section-subtitle {
    display: block;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 4px;
    font-weight: 500;
}

/* Intro Callout Card */
.intro-card {
    background-color: #f0fdf4;
    border-left: 4px solid #16a34a;
    padding: 18px 22px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 35px;
    color: #166534;
    font-size: 1rem;
    box-shadow: var(--shadow);
    line-height: 1.7;
}

.intro-card strong {
    color: #14532d;
}

/* Grid Layout for Cards */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Card Styling */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: #cbd5e1;
}

.card h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: 600;
}

.card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    flex-grow: 1;
    line-height: 1.6;
}

/* Read More Button / External Link */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: auto;
    transition: color 0.2s ease, transform 0.2s ease;
}

.read-more-btn:hover {
    color: var(--primary-hover);
    transform: translateX(3px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 16px 12px;
    }

    .section-header {
        flex-direction: column;
        gap: 10px;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

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

    .intro-card {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
}