/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-red: #e31837;
    --primary-blue: #0e4e8e;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --white: #ffffff;
}

body {
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
}

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

a {
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-red);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }

p {
    margin-bottom: 15px;
    color: var(--text-light);
}

/* Utility Classes */
.red { color: var(--primary-red); }
.blue { color: var(--primary-blue); }
.red-bg { background-color: var(--primary-red); color: white; }
.blue-bg { background-color: var(--primary-blue); color: white; }

/* Top Navigation */
.top-nav {
    background-color: #f8f8f8;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    padding: 5px 0;
}

.top-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-nav span {
    margin-right: 15px;
    cursor: pointer;
}

.top-nav i {
    margin-right: 5px;
}

/* Main Header */
.main-header {
    padding: 15px 0;
    border-bottom: 2px solid var(--primary-red);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.date-time {
    text-align: right;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Main Navigation */
.main-nav {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.main-nav ul {
    display: flex;
    list-style: none;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 0;
}

.main-nav li {
    margin-right: 20px;
    position: relative;
}

.main-nav a {
    padding: 10px 0;
    font-weight: 500;
    color: var(--text-dark);
    display: block;
}

.main-nav a:hover {
    color: var(--primary-red);
}

.main-nav li.active a {
    color: var(--primary-red);
    border-bottom: 2px solid var(--primary-red);
}

.main-nav i {
    margin-right: 5px;
}

/* Breaking News */
.breaking-news {
    background-color: #f8f8f8;
    padding: 8px 0;
    margin: 15px 0;
    border-left: 4px solid var(--primary-red);
    display: flex;
    align-items: center;
}

.breaking-label {
    background-color: var(--primary-red);
    color: white;
    padding: 3px 10px;
    margin-right: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.ticker {
    overflow: hidden;
    flex-grow: 1;
}

.ticker ul {
    list-style: none;
    animation: ticker 20s linear infinite;
}

.ticker li {
    margin-bottom: 5px;
}

/* Main Headline */
.main-headline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.headline-content {
    padding: 20px 0;
}

.category {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.headline-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.summary {
    font-size: 1.1rem;
    margin: 15px 0;
    color: var(--text-dark);
}

.meta {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.news-card {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.category-tag {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.news-card h3 {
    padding: 15px;
    padding-bottom: 5px;
}

.news-card .meta {
    padding: 0 15px 15px;
    display: block;
}

/* More News Section */
.more-news {
    margin: 50px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.view-all {
    font-size: 0.9rem;
    color: var(--primary-blue);
    font-weight: 500;
}

.view-all i {
    margin-left: 5px;
    font-size: 0.8rem;
}

.news-list {
    display: grid;
    gap: 15px;
}

.news-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.news-item:last-child {
    border-bottom: none;
}

.news-item-content {
    flex: 1;
    padding-right: 15px;
}

.news-item h4 {
    margin-bottom: 5px;
    font-weight: 500;
}

.news-item img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 3px;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-red);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #bdc3c7;
    transition: color 0.3s, padding-left 0.3s;
    display: block;
}

.footer-section a:hover {
    color: #fff;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    transition: background-color 0.3s, transform 0.3s;
}

.social-links a:hover {
    background-color: var(--primary-red);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #bdc3c7;
}

.footer-links a {
    color: #bdc3c7;
    margin-left: 15px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Animations */
@keyframes ticker {
    0% { transform: translateY(0); }
    25% { transform: translateY(-100%); }
    50% { transform: translateY(-200%); }
    75% { transform: translateY(-100%); }
    100% { transform: translateY(0); }
}

/* Loader Styles */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
    width: 100%;
    max-width: 200px;
    padding: 20px;
}

/* Subscription Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    position: relative;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-50px);
    transition: transform 0.3s ease;
}

.popup-overlay.active .popup-content {
    transform: translateY(0);
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.close-popup:hover {
    color: #e31837;
}

.popup-body {
    text-align: center;
}

.popup-body h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.popup-body h3 i {
    color: #e31837;
}

.popup-body p {
    color: #666;
    margin-bottom: 25px;
    font-size: 1rem;
}

.subscription-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
    display: flex;
    gap: 10px;
}

.form-group input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-group input[type="email"]:focus {
    border-color: #0e4e8e;
    outline: none;
    box-shadow: 0 0 0 2px rgba(14, 78, 142, 0.2);
}

.btn-subscribe {
    background: linear-gradient(135deg, #e31837, #c41230);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-subscribe:hover {
    background: linear-gradient(135deg, #c41230, #a30e28);
    transform: translateY(-2px);
}

.form-footer {
    margin-top: 20px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 0.85rem;
    cursor: pointer;
    position: relative;
    padding-left: 30px;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 0;
    height: 20px;
    width: 20px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    transition: all 0.2s;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: #0e4e8e;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #e31837;
    border-color: #e31837;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.terms-link {
    color: #0e4e8e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.terms-link:hover {
    color: #e31837;
    text-decoration: underline;
}

@media (max-width: 576px) {
    .popup-content {
        padding: 20px 15px;
    }
    
    .form-group {
        flex-direction: column;
    }
    
    .btn-subscribe {
        width: 100%;
        padding: 12px;
    }
}

.loader-logo {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.loader-logo .n {
    color: #e31837;
    display: inline-block;
    animation: bounce 1s infinite alternate;
}

.loader-logo .p {
    color: #0e4e8e;
    display: inline-block;
    animation: bounce 1s 0.2s infinite alternate;
}

.loader-bar {
    width: 100%;
    height: 4px;
    background-color: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #e31837, #0e4e8e);
    animation: progress 1.5s ease-in-out infinite;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-10px);
    }
}

@keyframes progress {
    0% {
        width: 0%;
        transform: translateX(-50%);
    }
    50% {
        width: 100%;
        transform: translateX(0);
    }
    100% {
        width: 0%;
        transform: translateX(100%);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .main-headline {
        grid-template-columns: 1fr;
    }
    
    .headline-image {
        order: -1;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-nav {
        font-size: 0.75rem;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .main-nav ul {
        padding: 5px 0;
    }
    
    .main-nav li {
        margin-right: 10px;
    }
    
    .main-nav a {
        font-size: 0.9rem;
        padding: 8px 0;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        margin-top: 15px;
    }
    
    .footer-links a {
        margin: 0 7px;
    }
}

@media (max-width: 576px) {
    .top-nav .container {
        flex-direction: column;
        gap: 5px;
    }
    
    .top-nav-left, .top-nav-right {
        width: 100%;
        text-align: center;
    }
    
    .main-header .container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .date-time {
        text-align: center;
    }
    
    .news-item {
        flex-direction: column;
    }
    
    .news-item img {
        width: 100%;
        height: auto;
        margin-top: 10px;
    }
}
