
/* ============================
   Reset and Base Styles
============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* ============================
   Dark Mode Styles
============================ */
body.dark-mode {
    background-color: #000;
    color: #868383;
}

body.dark-mode a {
    color: #1a73e8;
}

body.dark-mode header,
body.dark-mode .secondary-nav,
body.dark-mode .news-ticker,
body.dark-mode .date-time,
body.dark-mode footer {
    background-color: #000;
}

body.dark-mode .top-bar {
    background-color: #1a73e8; /* same blue background in dark mode */
    color: #fff;
}

body.dark-mode .top-bar a {
    color: #fff;
}

body.dark-mode .top-bar a:hover {
    color: #d0d0d0;
}

/* ============================
   Typography
============================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: inherit;
    margin-bottom: 15px;
}

p {
    font-size: 1em;
    line-height: 1.6;
    color: inherit;
    margin-bottom: 15px;
}

a {
    color: #1a73e8;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    text-decoration: underline;
    color: #0c47b7;
}

/* ============================
   Container
============================ */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* ============================
   Top Bar
============================ */
.top-bar {
    background-color: #1a73e8;
    padding: 5px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 0.9em;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;

}

.top-bar a {
    color: #fff;
    margin-right: 15px;
    transition: color 0.3s;
}

.top-bar a:last-child {
    margin-right: 0;
}

.top-bar a:hover {
    color: #d0d0d0;
}

/* ============================
   Theme Toggle Button
============================ */
.theme-toggle button {
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 1em;
    transition: color 0.3s;
}

.theme-toggle button:hover {
    color: #d0d0d0;
}

/* ============================
   Main Header
============================ */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #fff;
    position: fixed;
    top: 15px; /* Height of the top bar */
    width: 100%;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);

}

.logo a {
    font-family: 'Arial Black', serif;
    font-size: 2em;
    color: black !important;
    text-decoration: none;
    transition: color 0.3s;
}

.logo a:hover {
    color: black;
}

/* ============================
   Primary Navigation
============================ */
.primary-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

.primary-nav ul li {
    margin-left: 20px;
    position: relative;
}

.primary-nav ul li a {
    text-decoration: none;
    color: #333;
    font-size: 1em;
    font-weight: 500;
    padding: 5px;
    transition: color 0.3s;
}

.primary-nav ul li a:hover,
.primary-nav ul li a.active {
    color: #1a73e8;
}

.primary-nav ul li .dropdown-menu {
    display: none;
}

.primary-nav ul li:hover .dropdown-menu {
    display: block;
}

/* ============================
   Dropdown Menus
============================ */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 4px;
    min-width: 150px;
    z-index: 1000;
}

.dropdown-menu li {
    padding: 8px 12px;
}

.dropdown-menu li a {
    color: #333;
    font-weight: 400;
}

.dropdown-menu li a:hover {
    background-color: #f1f1f1;
    color: #1a73e8;
}

/* ============================
   Search Bar
============================ */
.search-bar {
    position: relative;
}

.search-bar form {
    display: flex;
    align-items: center;
}

.search-bar input[type="text"] {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 20px 0 0 20px;
    outline: none;
    width: 150px;
    transition: width 0.3s ease;
    font-size: 0.9em;
}

.search-bar input[type="text"]:focus {
    width: 200px;
}

.search-bar button {
    padding: 6px 10px;
    border: none;
    background-color: #1a73e8;
    color: #fff;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: #0c47b7;
}

/* ============================
   Hamburger Menu
============================ */
.hamburger {
    display: none;
    font-size: 1.5em;
    cursor: pointer;
}

@media (max-width: 992px) {
    .hamburger {
        display: block;
    }

    .primary-nav {
        position: fixed;
        top: 80px; /* Height of top-bar and main-header */
        left: 0;
        width: 100%;
        background-color: #fff;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.3s ease-in-out;
        z-index: 998;
    }

    .primary-nav.active {
        max-height: 500px;
    }

    .primary-nav ul {
        flex-direction: column;
    }

    .primary-nav ul li {
        margin-left: 0;
        margin-bottom: 10px;
    }

    .primary-nav ul li a {
        padding: 10px 20px;
        width: 100%;
        display: block;
    }

    .primary-nav ul li .dropdown-menu {
        position: static;
        box-shadow: none;
    }

    .search-bar {
        display: none;
    }
}

/* ============================
   Secondary Navigation
============================ */
.secondary-nav {
    background-color: red;
    padding: 6px 15px;
    position: fixed;
    top: 80px; /* Below the top-bar and main-header */
    width: 100%;
    z-index: 998;
}

.secondary-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.secondary-nav ul li {
    margin: 0 15px;
}

.secondary-nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 0.9em;
    font-weight: 500;
    transition: color 0.3s;
}

.secondary-nav ul li a:hover {
    color: #0c47b7;
}

/* ============================
   Live Indicator
============================ */
.live-indicator {
    display: flex;
    align-items: center;
    background-color: #e53935;
    color: #fff;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.85em;
    margin-left: 15px;
}

.live-indicator .live-dot {
    height: 8px;
    width: 8px;
    background-color: #fff;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================
   News Ticker
============================ */
.news-ticker {
    background-color: #fff;
    padding: 5px 15px;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    overflow: hidden;
    position: fixed;
    top: 120px; /* Below top-bar, main-header, and secondary-nav */
    width: 100%;
    z-index: 997;
}

.news-ticker ul {
    display: flex;
    animation: ticker 60s linear infinite;
}

.news-ticker ul li {
    flex: 0 0 auto;
    margin-right: 30px;
}

.news-ticker ul li a {
    text-decoration: none;
    color: #1a73e8;
    font-weight: 500;
    transition: color 0.3s;
}

.news-ticker ul li a:hover {
    color: #0c47b7;
}

@keyframes ticker {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

@media (max-width: 768px) {
    .news-ticker ul {
        animation-duration: 80s;
    }
}

/* ============================
   Date and Time Section
============================ */
.date-time {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
    background-color: #f1f1f1;
    font-size: 0.85em;
    color: #555;
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
}

.date-time p {
    margin: 0 8px;
}

.date-time .temp {
    font-weight: bold;
    color: #1a73e8;
}

/* ============================
   Main Content Styles
============================ */
.main-content {
    max-width: 1200px;
    margin: 180px auto 20px auto; /* Adjusted to account for fixed headers */
    padding: 0 15px;
    overflow: hidden;
}

/* Prevent images or content from leaking out */
.main-content img,
.main-content iframe,
.main-content video {
    max-width: 100%;
    height: auto;
}

/* ============================
   Footer Styles
============================ */
footer {
    background-color: #fff;
    padding: 15px 10px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    color: #999;
    margin-top: 60px;
}

footer p {
    margin-bottom: 8px;
}

footer a {
    color: #1a73e8;
}

footer a:hover {
    color: #0c47b7;
}

/* ============================
   Responsive Enhancements
============================ */
@media (max-width: 768px) {
    .logo a {
        font-size: 1.8em;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-bar .top-right {
        margin-top: 5px;
    }

    .secondary-nav ul li {
        margin: 5px 10px;
    }

    .live-indicator {
        margin-left: 0;
        margin-top: 5px;
    }

    .news-ticker ul li {
        margin-right: 15px;
    }

    .main-content {
        margin-top: 220px; /* Adjusted for mobile */
		}
}

@media (max-width: 576px) {
    .logo a {
        font-size: 1.5em;
    }

    .date-time {
        flex-direction: column;
    }

    .primary-nav {
        width: 100%;
    }
}
