/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cool Color Palette - Magazine Editorial Style */
    --primary-color: #2C3E50;
    --secondary-color: #34495E;
    --accent-color: #3498DB;
    --light-blue: #5DADE2;
    --dark-blue: #1A252F;
    --cool-gray: #95A5A6;
    --light-gray: #ECF0F1;
    --white: #FFFFFF;
    --text-primary: #2C3E50;
    --text-secondary: #7F8C8D;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--white);
    overflow-x: hidden;
}

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

/* ===== HEADER STYLES ===== */
.header {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-color) 100%);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.6s ease;
}

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

.header-top {
    padding: 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.logo h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 5px;
    transition: var(--transition-fast);
}

.logo:hover h1 {
    letter-spacing: 5px;
}

.tagline {
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.9;
    font-weight: 300;
}

.main-nav ul {
    display: flex;
    gap: 40px;
    list-style: none;
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    transition: var(--transition-fast);
    padding: 5px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition-smooth);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* Category Navigation */
.header-categories {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 15px 0;
}

.category-nav {
    display: flex;
    gap: 30px;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

.category-nav a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: var(--transition-fast);
    position: relative;
}

.category-nav a:hover,
.category-nav a.active {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

/* ===== SEARCH BAR ===== */
.search-bar {
    background-color: var(--light-gray);
    padding: 30px 0;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.search-bar .container {
    display: flex;
    max-width: 800px;
    gap: 15px;
}

#searchInput {
    flex: 1;
    padding: 15px 25px;
    font-size: 1.1rem;
    border: 2px solid var(--cool-gray);
    border-radius: 50px;
    outline: none;
    transition: var(--transition-fast);
    font-family: var(--font-body);
}

#searchInput:focus {
    border-color: var(--accent-color);
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.2);
}

#searchBtn {
    padding: 15px 35px;
    background: linear-gradient(135deg, var(--accent-color), var(--light-blue));
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

#searchBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 60px 0;
    min-height: 100vh;
}

.featured-section {
    margin-bottom: 50px;
    text-align: center;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--light-blue));
}

/* ===== ARTICLES GRID ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.article-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition-smooth);
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
.article-card:nth-child(5) { animation-delay: 0.5s; }

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.article-image {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.category-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, var(--accent-color), var(--light-blue));
    color: var(--white);
    padding: 8px 20px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    font-weight: 600;
}

.article-content {
    padding: 30px;
}

.article-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.article-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    line-height: 1.4;
    margin-bottom: 15px;
    color: var(--primary-color);
    transition: var(--transition-fast);
}

.article-card:hover .article-title {
    color: var(--accent-color);
}

.article-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.read-more:hover {
    gap: 15px;
    color: var(--light-blue);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 50px;
}

.page-btn {
    padding: 12px 24px;
    background: var(--white);
    border: 2px solid var(--cool-gray);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1rem;
    border-radius: 6px;
    transition: var(--transition-fast);
    font-weight: 600;
}

.page-btn:hover,
.page-btn.active {
    background: linear-gradient(135deg, var(--accent-color), var(--light-blue));
    color: var(--white);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

/* ===== SIDEBAR WIDGET ===== */
.sidebar-widget {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    animation: slideInRight 0.8s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100px) translateY(-50%);
        opacity: 0;
    }
    to {
        transform: translateX(0) translateY(-50%);
        opacity: 1;
    }
}

.social-widget {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.social-widget h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: center;
}

.social-icons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-icons a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.social-icons a:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--light-blue));
    transform: scale(1.15) rotate(360deg);
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 60px 0 30px;
    margin-top: 80px;
}

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

.footer-section h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.footer-section h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.footer-section p {
    line-height: 1.8;
    opacity: 0.9;
}

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

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

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition-fast);
    opacity: 0.9;
}

.footer-section a:hover {
    opacity: 1;
    color: var(--accent-color);
    padding-left: 5px;
}

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

.footer-social a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition-fast);
}

.footer-social a:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .sidebar-widget {
        display: none;
    }
}

@media (max-width: 992px) {
    .logo h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2.8rem;
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .header-top .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .main-nav ul {
        gap: 20px;
    }
    
    .category-nav {
        gap: 15px;
    }
    
    .category-nav a {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-bar .container {
        flex-direction: column;
    }
    
    #searchBtn {
        width: 100%;
    }
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-color), var(--light-blue));
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    transition: var(--transition-smooth);
    z-index: 999;
    opacity: 0;
    transform: translateY(100px);
}

.back-to-top.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.6);
}

.back-to-top:active {
    transform: translateY(-3px) scale(1.05);
}

@media (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1.3rem;
    }
}

