/* Font-display: swap prevents FOIT (invisible text during load) — fixes CWV */
@font-face {
    font-family: 'Roboto';
    font-display: swap;
}

html {
    scroll-behavior: smooth;
}

.ticket-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .ticket-grid {
        grid-template-columns: 1fr;
    }
}

:root {
    --saffron: #FF9933;
    --green: #138808;
    --navy: #000080;
    --white: #FFFFFF;
    --light-gray: #f5f6fa;
    --text-color: #333333;
    --border-radius: 4px;
}

body {
    font-family: Roboto, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #111827;
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
}

/* User's explicit typography requirements */
.content-text {
    font-family: Roboto, sans-serif;
    font-size: 22px;
    font-weight: 400;
    line-height: 37.4px;
    color: rgb(0, 0, 0);
}

h1, h2, .heading-primary {
    font-family: Roboto, sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 36px;
    color: rgb(0, 0, 0);
    margin-top: 20px;
    margin-bottom: 15px;
}

h3, h4 {
    font-family: 'Roboto', sans-serif;
    font-size: 29px;
    font-weight: 600;
    line-height: 34.8px;
    color: rgb(0, 0, 0);
    margin-top: 15px;
    margin-bottom: 10px;
}

/* Red/Saffron Sticky Header */
header {
    background-color: #D32F2F; /* Similar to Image 2's deep red header, keeping saffron for accents */
    color: var(--white);
    text-align: center;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

header h1 a {
    color: var(--white);
    text-decoration: none;
}

.date-subtitle {
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 10px;
    background: var(--white);
    border-bottom: 2px solid #eee;
    color: #444;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

/* Time Slot Buttons Group */
.time-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.time-btn {
    background-color: var(--green);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    text-decoration: none;
    display: inline-block;
    transition: transform 0.1s, background-color 0.2s;
}

.time-btn:hover {
    background-color: #0e6b06;
}

.time-btn:active {
    transform: translateY(2px);
}

/* Result Cards */
.result-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.result-time-badge {
    display: inline-block;
    background-color: var(--saffron);
    color: var(--white);
    padding: 5px 15px;
    font-weight: bold;
    border-radius: 20px;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Bold Winning Number Display */
.winning-number-box {
    background-color: #ffeaea;
    border-left: 5px solid #D32F2F;
    padding: 20px;
    margin: 15px 0;
}

.winning-number-box .label {
    font-size: 1rem;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: bold;
}

.winning-number-box .number {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--green);
    letter-spacing: 2px;
    margin: 0;
}

/* Result Image — explicit aspect-ratio prevents CLS */
.result-image-wrapper {
    margin-top: 20px;
}

.result-image-wrapper img {
    max-width: 100%;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;   /* prevents layout shift before image loads */
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: #f3f4f6;   /* placeholder colour while loading */
}

.download-btn {
    display: inline-block;
    background-color: var(--navy);
    color: var(--white);
    text-decoration: none;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: var(--border-radius);
    margin-top: 15px;
}

.download-btn:hover {
    background-color: #000050;
}

/* Footer ─────────────────────────────────────────────────── */
.site-footer {
    margin-top: 40px;
    background-color: #1f2937;
    color: #ffffff;
    padding: 40px 20px;
    text-align: center;
}

.footer-links {
    max-width: 800px;
    margin: 0 auto 20px;
}

.footer-heading {
    color: var(--saffron);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: #ffffff;
}

.footer-copy {
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.9rem;
    color: #9ca3af;
}

/* content-visibility: auto — browser skips rendering off-screen sections */
.seo-content,
#monthly-chart {
    content-visibility: auto;
    contain-intrinsic-size: 0 400px; /* estimated height prevents CLS */
}

@media (max-width: 600px) {
    .winning-number-box .number {
        font-size: 2.5rem;
    }
    .time-btn {
        flex: 1 1 30%;
        text-align: center;
        padding: 10px;
    }
}

/* Global Header & Navigation */
.main-header {
    background-color: #D32F2F; /* Saffron/Red */
    position: relative;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

.logo a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin: 0;
}

.nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: #ffcccc;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
}

/* Mobile Menu */
@media (max-width: 900px) {
    .menu-toggle {
        display: block;
    }
    .nav-menu {
        display: none;
        width: 100%;
        background-color: #b71c1c; /* Darker red for dropdown */
        position: absolute;
        top: 100%;
        left: 0;
        text-align: left;
    }
    .nav-menu.active {
        display: block;
    }
    .nav-menu ul {
        flex-direction: column;
        gap: 0;
    }
    .nav-menu li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .nav-menu a {
        display: block;
        padding: 15px 20px;
    }
}

/* Monthly Chart Table */
.lottery-chart {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    background: #ffffff;
}
.lottery-chart th {
    background-color: #f3f4f6;
    color: #374151;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
    text-transform: uppercase;
}
.lottery-chart td {
    padding: 12px 15px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 1.05rem;
    color: #111827;
}
.lottery-chart tbody tr:nth-child(even) {
    background-color: #f9fafb;
}
.lottery-chart tbody tr:hover {
    background-color: #f3f4f6;
}
