/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px; /* Slimmer for mobile */
}

::-webkit-scrollbar-track {
    background: #003087; /* Dark blue */
}

::-webkit-scrollbar-thumb {
    background: #ffffff; /* Full white */
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4B6CB7; /* Lighter blue */
}

/* Slide-Out Menu */
.slide-menu {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background-color: #003087;
    transition: left 0.3s ease;
    z-index: 1000;
    border-right: 2px solid #ffffff; /* Full white vertical line */
}

.slide-menu.open {
    left: 0;
}

.menu-toggle {
    position: fixed;
    top: 10px;
    left: 10px; /* Top-left of site when closed */
    background: none;
    border: none;
    font-size: 35px;
    padding: 5px 10px;
    cursor: pointer;
    z-index: 1001;
    color: #003087; /* Dark blue for hamburger */
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.slide-menu.open .menu-toggle {
    position: absolute; /* Top-right of slide-out menu when open */
    top: 10px;
    right: 10px;
    color: #ffffff; /* White for X */
    opacity: 0; /* Start invisible */
    animation: fadeIn 0.3s ease forwards 0.3s; /* Fade in after menu slide */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.menu-toggle:hover,
.menu-toggle:focus,
.menu-toggle:active {
    color: #4B6CB7; /* Lighter blue */
}

.menu-toggle .hamburger,
.menu-toggle .close {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.slide-menu.open .hamburger {
    display: none; /* Hide hamburger when menu is open */
}

.slide-menu.open .close {
    opacity: 1;
    transform: rotate(0deg);
    display: block;
}

.slide-menu:not(.open) .hamburger {
    opacity: 1;
    transform: rotate(0deg);
    display: block;
}

.slide-menu:not(.open) .close {
    opacity: 0;
    transform: rotate(-45deg);
    display: none;
}

.slide-menu-content {
    padding: 50px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slide-menu-item {
    color: #fff;
    text-decoration: none;
    padding: 10px;
    display: block;
    font-size: 16px;
}

.slide-menu-item:hover {
    background-color: #4B6CB7; /* Lighter blue */
    color: #fff;
}

/* Header */
.header {
    background-color: #fff; /* White background for logo */
    padding: 10px 0;
    border-bottom: 1px solid #B0C4DE;
    position: relative;
    min-height: 220px; /* Accommodate larger logo */
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
}

.logo-link {
    display: block;
    margin-left: -192px; /* Move logo left ~2 inches */
    margin-top: 20px; /* Move down 10 pixels */
}

.logo-img {
    height: 240px; /* Increased from 190px */
    background-color: transparent;
}

.navbar {
    position: absolute;
    top: 200px; /* Moved down 10px from 170px */
    right: 20px;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 20px;
    position: relative;
    padding: 10px; /* Invisible boundary padding */
}

.nav-item {
    position: relative;
}

.nav-button {
    background: none;
    color: #003087; /* Dark blue text */
    font-weight: 700;
    font-size: 20px;
    cursor: pointer;
    padding: 8px 16px;
    border: none;
    position: relative;
    transition: color 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.nav-button:hover {
    color: #4B6CB7; /* Lighter blue */
}

.nav-button::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: #003087; /* Dark blue underline */
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease, left 0.3s ease, transform 0.3s ease;
}

.nav-item:hover .nav-button::after {
    width: 100%;
    left: 0;
    transform: translateX(0);
}

.nav-list:hover .nav-item:not(:hover) .nav-button::after {
    width: 0; /* Hide underline for non-hovered buttons */
}

.dropdown:hover .nav-button::after {
    width: 100%;
    left: 0;
    transform: translateX(0);
}

.dropdown {
    position: relative;
}

.dropdown .dropbtn {
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    display: block;
    text-decoration: none;
    font-size: 16px;
    font-weight: normal;
    transition: font-size 0.2s ease, font-weight 0.2s ease, background-color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #0055A4; /* Solid blue */
    color: #fff;
    font-size: 17px;
    font-weight: bold;
}

.news-banner {
    background-color: #003087;
    color: #fff;
    padding: 10px 0;
    overflow: hidden;
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.news-ticker-box {
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.news-ticker {
    display: flex;
    width: max-content;
}

.ticker-content {
    display: flex;
    white-space: nowrap;
    align-items: center;
}

.ticker-item {
    margin-right: 20px;
    text-transform: uppercase;
    line-height: 20px;
}

.ticker-item a {
    color: #ffffff; /* Full white */
    text-decoration: none;
}

.ticker-item a:hover {
    color: #F5F5F5; /* Slightly off-white */
    text-decoration: none; /* No underline */
}

.item-divider {
    border: none;
    border-left: 2px solid #ffffff; /* Full white */
    height: 16px;
    margin: 0 20px;
    background: none;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
}

.hero {
    text-align: center;
    padding: 40px 20px;
}

.hero h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #003087;
}

.search-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.search-form input {
    padding: 10px;
    border: 1px solid #B0C4DE;
    border-radius: 4px;
    font-size: 16px;
    width: 300px;
    max-width: 100%;
}

.hero button.search-button {
    background-color: #003087;
    color: #fff;
    padding: 10px 20px;
    border: 1px solid #B0C4DE;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.hero button.search-button:hover {
    background-color: #4B6CB7;
    color: #fff;
}

.contact-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
    flex: 1 1 200px;
    padding: 10px;
    border: 1px solid #B0C4DE;
    border-radius: 4px;
    font-size: 16px;
}

.contact-form textarea {
    flex: 1 1 100%;
    height: 100px;
    resize: vertical;
}

.contact-form button.search-button {
    background-color: #003087;
    color: #fff;
    padding: 10px 20px;
    border: 1px solid #B0C4DE;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.contact-form button.search-button:hover {
    background-color: #4B6CB7;
    color: #fff;
}

.success-message {
    color: #008000;
    margin-bottom: 20px;
}

.error-message {
    color: #ff0000;
    margin-bottom: 20px;
}

.breaking-news {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.news-header {
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

main .breaking-news .news-header h2 {
    font-size: 2.2em;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: left;
    color: #000000; /* Black font */
    padding: 10px 0;
    background-color: #fff;
    border: none;
    border-bottom: 2px solid #B0C4DE;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
}

.news-source {
    margin-bottom: 20px;
}

.news-source h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    display: none;
}

.news-source ul {
    list-style: none;
}

.news-item {
    border-bottom: 1px solid #B0C4DE;
    padding: 10px 0;
}

.news-item h4 {
    font-size: 1.2em;
    margin-bottom: 5px;
    color: #003087;
}

.news-item p {
    margin-bottom: 10px;
}

.news-item a.cta-button {
    display: inline-block;
    background-color: #003087;
    color: #fff;
    padding: 5px 10px;
    border: 1px solid #B0C4DE;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.news-item a.cta-button:hover {
    background-color: #4B6CB7;
    color: #fff;
}

.features {
    padding: 40px 20px;
}

.features h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
    color: #003087;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #B0C4DE;
}

.feature-card h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: #003087;
}

.search-results {
    margin-top: 20px;
}

.search-result {
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.search-result-divider {
    border: none;
    border-top: 1px solid #B0C4DE; /* Horizontal line between items */
    margin: 10px 0;
}

.search-result h4 {
    font-size: 1.2em;
    margin-bottom: 5px;
    color: #003087;
}

.search-result h5 a {
    color: #003087; /* Plain text link */
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
}

.search-result h5 a:hover {
    color: #4B6CB7; /* Lighter blue on hover */
    text-decoration: underline;
}

.search-result ul {
    list-style: none;
}

.search-result li {
    margin-bottom: 10px;
}

.search-result h5 {
    font-size: 1.1em;
    margin-bottom: 5px;
    color: #003087;
}

.search-result p {
    font-size: 1em;
    margin-bottom: 10px;
}

.search-result a.cta-button {
    display: inline-block;
    background-color: #003087;
    color: #fff;
    padding: 5px 10px;
    border: 1px solid #B0C4DE;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.search-result a.cta-button:hover {
    background-color: #4B6CB7;
    color: #fff;
}

.footer {
    background-color: #003087;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #B0C4DE;
}

.footer p {
    color: #fff;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    display: inline-block;
    background-color: #003087;
    color: #fff;
    padding: 5px 10px;
    border: 1px solid #B0C4DE;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    margin: 0 10px;
    transition: background-color 0.3s ease;
}

.footer-links a:hover {
    background-color: #4B6CB7;
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        align-items: center;
        padding: 0 5px;
        flex-wrap: wrap;
        flex-direction: column; /* Stack logo and navbar */
    }

    .logo-link {
        margin-left: 0;
        margin-top: 10px;
    }

    .logo-img {
        height: 170px; /* Increased from 150px */
        max-width: 100%; /* Prevent overflow */
    }

    .menu-toggle {
        position: fixed;
        top: 10px;
        left: 10px; /* Top-left on mobile */
    }

    .navbar {
        position: static;
        width: 100%;
        overflow-x: auto;
        margin-top: 10px;
    }

    .nav-list {
        display: flex;
        gap: 5px;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 5px 0;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling */
    }

    .nav-button {
        font-size: 11px;
        padding: 4px 8px;
        white-space: nowrap;
        background: none;
        color: #003087;
        border-radius: 0;
        min-width: 80px; /* Ensure buttons are wide enough */
        text-align: center;
    }

    .nav-button:hover {
        color: #4B6CB7;
    }

    .nav-button::after {
        display: none; /* No underlines on mobile */
    }

    .dropdown-content {
        display: none;
        position: fixed; /* Use fixed for better mobile overlay */
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: #f9f9f9;
        min-width: 160px;
        max-width: 90%;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        z-index: 1000;
        opacity: 1;
    }

    .dropdown-content.show {
        display: block;
    }

    .dropdown-content a {
        padding: 8px 16px;
        font-size: 12px;
        font-weight: normal;
        transition: font-size 0.2s ease, font-weight 0.2s ease, background-color 0.3s ease;
    }

    .dropdown-content a:hover {
        background-color: #0055A4; /* Solid blue */
        color: #fff;
        font-size: 13px;
        font-weight: bold;
    }

    .news-banner {
        padding: 5px 0;
        min-height: 30px;
    }

    .ticker-item {
        margin-right: 10px;
        line-height: 16px;
    }

    .ticker-item a {
        font-size: 10px;
    }

    .item-divider {
        margin: 0 10px;
        height: 12px;
    }

    .hero {
        padding: 15px 5px;
    }

    .hero h2 {
        font-size: 1.3em;
    }

    .search-form {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    .search-form input {
        width: 100%;
        font-size: 12px;
        padding: 6px;
    }

    .hero button.search-button {
        padding: 6px 12px;
        font-size: 12px;
    }

    .breaking-news {
        padding: 15px 5px;
    }

    main .breaking-news .news-header h2 {
        font-size: 1.5em;
        padding: 5px 0;
        margin-bottom: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .news-list {
        gap: 15px;
    }

    .news-item {
        padding: 6px 0;
    }

    .news-item h4 {
        font-size: 0.9em;
        white-space: normal;
        overflow-wrap: break-word;
    }

    .news-item p {
        font-size: 0.8em;
        overflow-wrap: break-word;
    }

    .news-item a.cta-button {
        padding: 3px 6px;
        font-size: 11px;
    }

    .features {
        padding: 15px 5px;
    }

    .features h2 {
        font-size: 1.3em;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .feature-card {
        padding: 10px;
    }

    .feature-card h3 {
        font-size: 1.1em;
    }

    .feature-card p {
        font-size: 0.8em;
    }

    .search-results {
        margin-top: 10px;
    }

    .search-result {
        margin-bottom: 15px;
    }

    .search-result h4 {
        font-size: 0.9em;
    }

    .search-result h5 {
        font-size: 0.8em;
    }

    .search-result p {
        font-size: 0.8em;
    }

    .search-result a.cta-button {
        padding: 3px 6px;
        font-size: 11px;
    }

    .contact-form {
        flex-direction: column;
        padding: 0 5px;
    }

    .contact-form input,
    .contact-form textarea {
        flex: 1 1 100%;
        font-size: 12px;
        padding: 6px;
    }

    .footer {
        padding: 10px;
    }

    .footer p {
        font-size: 0.8em;
    }

    .footer-links a {
        padding: 3px 6px;
        font-size: 11px;
        margin: 0 3px;
    }
}

/* Additional media query for very small screens (e.g., < 400px) */
@media (max-width: 400px) {
    .logo-img {
        height: 110px; /* Increased from 100px */
    }

    .nav-button {
        font-size: 10px;
        padding: 3px 6px;
        min-width: 60px; /* Smaller buttons for small screens */
    }

    main .breaking-news .news-header h2 {
        font-size: 1.2em;
    }

    .news-item h4 {
        font-size: 0.8em;
    }

    .news-item p {
        font-size: 0.7em;
    }

    .features h2 {
        font-size: 1.2em;
    }

    .feature-card h3 {
        font-size: 1em;
    }

    .feature-card p {
        font-size: 0.7em;
    }

    .search-form input {
        font-size: 10px;
        padding: 5px;
    }

    .hero button.search-button {
        padding: 5px 10px;
        font-size: 10px;
    }

    .contact-form input,
    .contact-form textarea {
        font-size: 10px;
        padding: 5px;
    }

    .footer p {
        font-size: 0.7em;
    }

    .footer-links a {
        padding: 2px 5px;
        font-size: 10px;
        margin: 0 2px;
    }
}