/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f8f8f8;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Loading overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
}

#loading-overlay .spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #264653;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 15px;
    text-align: center;
    margin: 20px;
    border-radius: 4px;
    display: none;
}

#error-message button {
    background-color: #c62828;
    color: white;
    border: none;
    padding: 8px 15px;
    margin-top: 10px;
    border-radius: 4px;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* Header */


.date-display {
    color: #666;
    font-size: 14px;
    min-width: 120px;
}

.logo {
    height: 3.5rem;
    width: 12rem;
    object-fit: contain;
}

.user-actions {
    display: flex;
    gap: 10px;
    min-width: 120px;
    justify-content: flex-end;
}

.user-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.subscribe-btn {
    background-color: #264653;
    color: white;
}

.subscribe-btn:hover {
    background-color: #1d3557;
}

.login-btn {
    background-color: #f0f0f0;
    color: #333;
}

.login-btn:hover {
    background-color: #e0e0e0;
}

nav {
    padding: 0 20px;
}

nav ul {
    display: flex;
    list-style: none;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 5px;
    scrollbar-width: none;
}

nav ul::-webkit-scrollbar {
    display: none;
}

nav ul li {
    padding: 15px 10px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    transition: color 0.3s;
}

nav ul li a.active, nav ul li:hover {
    color: #264653;
    border-bottom: 3px solid #264653;
}

/* Breaking news */
.breaking-news {
    background-color: #264653;
    color: white;
    padding: 10px 20px;
    display: flex;
    align-items: center;
}

.breaking-tag {
    background-color: #000;
    color: white;
    padding: 3px 10px;
    font-weight: bold;
    margin-right: 15px;
    font-size: 14px;
    white-space: nowrap;
    border-radius: 3px;
}

.breaking-content {
    font-weight: bold;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow: 1;
}

/* Featured news */
.featured-news {
    display: flex;
    padding: 20px;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.main-featured {
    flex: 2;
}

.secondary-featured {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.featured-article {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.featured-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.featured-article.secondary {
    flex: 1;
}

.image-container {
    position: relative;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: linear-gradient(135deg, #333 0%, #666 100%);
}

.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.featured-article:hover .image-container img {
    transform: scale(1.05);
}

.category-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #264653;
    color: white;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 3px;
    z-index: 3;
}

.article-content {
    padding: 20px;
}

.featured-article h1 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #222;
    line-height: 1.3;
}

.featured-article h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #222;
    line-height: 1.3;
}

.featured-article p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 15px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 13px;
}

.comments, .views {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* News grid */
.news-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.section-title {
    font-size: 24px;
    color: #222;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #264653;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.news-card {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 4px;
    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.2);
}

.news-card .image-container {
    padding-bottom: 60%;
}

.news-card .article-content {
    padding: 15px;
}

.news-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #222;
}

.news-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.load-more-btn {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #264653;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.load-more-btn:hover {
    background-color: #1d3557;
}

.load-more-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Videos section */
.videos-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.videos-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.video-card {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-card .article-content {
    padding: 15px;
}

.video-card h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #222;
}

/* Footer */
footer {
    background-color: #222;
    color: #fff;
    padding: 40px 20px 20px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.footer-links {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
}

.link-column {
    flex: 1;
    min-width: 200px;
}

.link-column h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #264653;
}

.link-column a {
    display: block;
    color: #ccc;
    margin-bottom: 10px;
    transition: color 0.3s;
    font-size: 14px;
}

.link-column a:hover {
    color: #fff;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: #ccc;
    font-size: 20px;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #264653;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #444;
    color: #888;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .featured-news {
        flex-direction: column;
    }
    
    .secondary-featured {
        flex-direction: row;
    }
    
    .featured-article h1 {
        font-size: 22px;
    }
}

@media (max-width: 768px) {

    
    .logo {
        margin: 10px 0;
    }
    
    .user-actions {
        justify-content: center;
        width: 100%;
    }
    
    .secondary-featured {
        flex-direction: column;
    }
    
    .news-grid, .videos-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    nav ul li {
        padding: 10px 8px;
    }
    
    nav ul li a {
        font-size: 12px;
    }
    
    .featured-article h1 {
        font-size: 20px;
    }
    
    .featured-article h2 {
        font-size: 16px;
    }
    
    .news-grid, .videos-container {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 20px;
    }
}