/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    /* Modern dark theme palette */
    --bg-dark: #09090b;
    --bg-glow: #18181b;
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.4);
    --dot-color: #fbbf24;
    --glass-bg: rgba(24, 24, 27, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-main: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

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

body {
    font-family: var(--font-main);
    background: radial-gradient(circle at center, var(--bg-glow), var(--bg-dark));
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Default: Prevents scrollbars from scattered dots on homepage */
}

/* =========================================
   2. HOMEPAGE LAYOUT & TIMER
   ========================================= */
#dot-container {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
}

/* Modern Glassmorphism Timer Box */
.vision-timer {
    position: relative;
    z-index: 10;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 3rem 4rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.timer-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    background: linear-gradient(to right, #ffffff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Timer Display */
.countdown-display {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    border-radius: 12px;
    min-width: 100px;
    box-shadow: inset 0 0 20px rgba(255,255,255,0.01);
}

.time-value {
    font-size: 2.8rem;
    font-weight: 600;
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent-glow);
    line-height: 1.2;
}

.time-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Policy Links Under Timer */
.policy-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.policy-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.policy-links a i {
    margin-right: 4px;
    font-size: 1.1rem;
    vertical-align: middle;
}

.policy-links a:hover {
    color: var(--text-main);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Clean Minimal Footer (Homepage) */
footer {
    position: absolute;
    bottom: 1.5rem;
    width: 100%;
    text-align: center;
    z-index: 10;
    pointer-events: none;
}

footer p {
    color: var(--text-muted);
    font-size: 0.75rem;
    opacity: 0.4;
}

/* =========================================
   3. SCATTERED DOTS & ANIMATIONS
   ========================================= */
.blog-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: var(--dot-color);
    border-radius: 50%;
    display: block;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    z-index: 1;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.blog-dot:hover {
    transform: scale(1.8);
    box-shadow: 0 0 20px var(--dot-color), 0 0 40px var(--dot-color);
    z-index: 20;
}

/* Tooltip for dots */
.blog-dot::after {
    content: attr(aria-label);
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.blog-dot:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Empty Template Dots */
div.blog-dot.empty-dot {
    background-color: rgba(251, 191, 36, 0.3);
    box-shadow: none;
    cursor: default;
    pointer-events: none;
    transform: scale(0.6);
}

/* Blink Animation for Active Links */
@keyframes blinkOnce {
    0% { transform: scale(1); opacity: 1; box-shadow: 0 0 10px var(--dot-color); }
    50% { transform: scale(3); opacity: 1; background-color: #fff; box-shadow: 0 0 40px #fff, 0 0 60px var(--accent); }
    100% { transform: scale(1); opacity: 1; box-shadow: 0 0 10px var(--dot-color); }
}

a.blog-dot.active-dot {
    animation: blinkOnce 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1;
}

/* =========================================
   4. CONTENT PAGES (Blogs, Policies, Stories)
   ========================================= */
body.content-page {
    overflow-y: auto;
    overflow-x: hidden;
    display: block;
}

.site-header {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    display: inline-block;
}

.back-link:hover {
    color: var(--accent);
    text-shadow: 0 0 8px var(--accent-glow);
}

.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem 4rem 2rem;
}

.content-article {
    background: rgba(24, 24, 27, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Content Headers */
.article-header {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1.5rem;
}

.article-header h1 {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.meta-data {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.8rem;
}

.meta-data i {
    vertical-align: text-bottom;
}

/* Content Typography */
.article-body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #d4d4d8;
}

.article-body h2 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin: 2.5rem 0 1rem 0;
}

.article-body h3 {
    font-size: 1.4rem;
    color: var(--text-main);
    margin: 2rem 0 0.8rem 0;
}

.article-body p {
    margin-bottom: 1.5rem;
}

/* Contact Page Code Blocks */
.code-block {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    color: var(--accent);
    margin: 1.5rem 0;
    font-size: 0.9rem;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.instruction-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Media Elements (Images, Videos, Audios) */
.article-body img,
.article-body video {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
}

.article-body figure {
    margin: 2rem 0;
}

.article-body figure img {
    margin: 0;
}

.article-body figcaption {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.8rem;
    font-style: italic;
}

.article-body audio {
    width: 100%;
    margin: 1.5rem 0;
    border-radius: 8px;
    filter: invert(10%) sepia(15%) saturate(200%) hue-rotate(200deg) brightness(90%) contrast(90%);
}

.content-footer {
    position: relative;
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
}

/* =========================================
   5. RESPONSIVE / MOBILE ADJUSTMENTS
   ========================================= */
@media (max-width: 768px) {
    /* Timer adjustments */
    .vision-timer {
        padding: 2rem;
        gap: 1.5rem;
    }
    .time-box {
        min-width: 70px;
        padding: 0.8rem;
    }
    .time-value {
        font-size: 2rem;
    }
    .policy-links {
        gap: 1rem;
        padding-top: 1.5rem;
    }
    
    /* Content page adjustments */
    .page-container {
        padding: 0 1rem 2rem 1rem;
    }
    .content-article {
        padding: 1.5rem;
    }
    .article-header h1 {
        font-size: 2rem;
    }
}