/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo h1 {
    color: #e74c3c;
    font-size: 1.8rem;
    font-weight: bold;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: #e74c3c;
    color: white;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.weather-widget {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    min-width: 150px;
}

.weather-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.weather-icon {
    width: 20px;
    height: 20px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 2px 0;
    transition: 0.3s;
}

/* Breaking News Banner */
.breaking-news {
    background: #e74c3c;
    color: white;
    padding: 0.5rem 0;
    animation: slideDown 0.5s ease;
}

.breaking-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.breaking-label {
    background: #c0392b;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-weight: bold;
    font-size: 0.8rem;
}

.breaking-text {
    font-weight: 500;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Main Content */
.main {
    padding: 2rem 0;
}

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 10px;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* News Section */
.news-section {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    grid-column: 1 / -1;
}

.section-title {
    font-size: 1.8rem;
    color: #333;
}

.section-controls {
    display: flex;
    gap: 0.5rem;
}

.view-toggle {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.view-toggle.active,
.view-toggle:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    grid-column: 1;
}

.news-grid.list-view {
    grid-template-columns: 1fr;
}

.news-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

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

.news-card.breaking {
    border-left: 5px solid #e74c3c;
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.news-category {
    background: #e74c3c;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 500;
}

.news-date {
    color: #999;
}

.news-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: #333;
}

.news-summary {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.news-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #999;
}

.news-author {
    font-weight: 500;
}

.news-views {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* List View Styles */
.news-card.list-view {
    display: flex;
    align-items: center;
}

.news-card.list-view .news-image {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
}

.news-card.list-view .news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Sidebar */
.sidebar {
    grid-column: 2;
}

.sidebar-widget {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sidebar-widget h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.2rem;
}

.popular-news,
.latest-news {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-item,
.latest-item {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.3s ease;
}

.popular-item:hover,
.latest-item:hover {
    background: #f8f9fa;
    border-radius: 5px;
    padding: 0.5rem;
    margin: 0 -0.5rem;
}

.popular-item:last-child,
.latest-item:last-child {
    border-bottom: none;
}

.popular-image,
.latest-image {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.popular-content,
.latest-content {
    flex: 1;
}

.popular-title,
.latest-title {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0.3rem;
    color: #333;
}

.popular-meta,
.latest-meta {
    font-size: 0.8rem;
    color: #999;
}

.categories {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-link {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.category-link:hover {
    background: #e74c3c;
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    grid-column: 1 / -1;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pagination button:hover,
.pagination button.active {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* News Detail Page */
.news-detail {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.breadcrumb {
    margin-bottom: 1rem;
    grid-column: 1 / -1;
}

.breadcrumb a {
    color: #e74c3c;
    text-decoration: none;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: #999;
}

.article {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    grid-column: 1;
}

.article-header {
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.article-category {
    background: #e74c3c;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
}

.article-title {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #333;
}

.article-summary {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-left: 4px solid #e74c3c;
    border-radius: 0 5px 5px 0;
}

.article-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

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

.article-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
    color: #333;
}

.article-content h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 0.5rem 0;
    color: #333;
}

.article-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-tag {
    background: #f8f9fa;
    color: #666;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-tag:hover {
    background: #e74c3c;
    color: white;
}

.article-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #999;
}

.related-news {
    margin-top: 2rem;
    grid-column: 1 / -1;
}

.related-news h3 {
    margin-bottom: 1rem;
    color: #333;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.related-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.related-item:hover {
    transform: translateY(-3px);
}

.related-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-content {
    padding: 1rem;
}

.related-title {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    color: #333;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #e74c3c;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #e74c3c;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #555;
    color: #999;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #e74c3c;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.image-preview {
    margin-top: 0.5rem;
}

.image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 5px;
}

/* Button Styles */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #e74c3c;
    color: white;
}

.btn-primary:hover {
    background: #c0392b;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Utility Classes */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.error {
    color: #e74c3c;
    background: #fdf2f2;
    padding: 1rem;
    border-radius: 5px;
    border-left: 4px solid #e74c3c;
    margin: 1rem 0;
}

.success {
    color: #27ae60;
    background: #f2fdf5;
    padding: 1rem;
    border-radius: 5px;
    border-left: 4px solid #27ae60;
    margin: 1rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
    
    .nav {
        display: none;
        width: 100%;
        order: 3;
    }
    
    .nav.active {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid #eee;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .news-section {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-detail {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-image {
        height: 250px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .news-card.list-view {
        flex-direction: column;
    }
    
    .news-card.list-view .news-image {
        width: 100%;
        height: 200px;
    }
}

/* Location Modal Styles */
.location-modal {
    max-width: 400px;
    text-align: center;
}

.location-content {
    padding: 2rem;
}

.location-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
}

.location-content p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.location-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}
