/* ===================================================================
 * Modern Blog Theme - Bootstrap Based
 * =================================================================== */

:root {
    --primary-color: #ff6b6b;
    --secondary-color: #ff9f43;
    --light-bg: #ffffff;
    --light-gray: #f8f9fa;
    --card-bg: #ffffff;
    --text-dark: #1a1a1a;
    --text-muted: #666666;
    --border-color: #e0e0e0;
}

* {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-gray);
    color: var(--text-dark);
}

/* ===================================================================
 * Navigation & Header
 * =================================================================== */

.navbar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.98) 100%) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
    font-size: 1.3rem;
    letter-spacing: 0.5px;
    transition: opacity 0.3s ease;
}

.navbar-brand:hover {
    opacity: 0.8;
}

.navbar-brand img {
    filter: brightness(1.1);
}

.nav-link {
    color: var(--text-dark) !important;
    position: relative;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 60%;
}

.dropdown-menu {
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    background-color: var(--light-bg) !important;
}

.dropdown-item {
    color: var(--text-dark) !important;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white !important;
}

.search-toggle {
    cursor: pointer;
}

/* ===================================================================
 * Search Modal
 * =================================================================== */

.modal-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%) !important;
    border: 1px solid var(--border-color);
}

.modal-header {
    border-bottom-color: var(--border-color) !important;
}

.form-control {
    background-color: var(--light-gray) !important;
    border-color: var(--border-color) !important;
    color: var(--text-dark) !important;
    transition: all 0.3s ease;
}

.form-control:focus {
    background-color: var(--light-bg) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 107, 0.25);
    color: var(--text-dark) !important;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
}

.input-group-lg .btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.input-group-lg .btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* ===================================================================
 * Hero Section & Slider
 * =================================================================== */

.hero-section {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    margin-top: 0px;
}

.hero-swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.slider-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
}

/* Swiper Pagination */
.swiper-pagination {
    bottom: 20px !important;
}

.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
    width: 10px;
    height: 10px;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: var(--primary-color) !important;
    width: 30px;
    border-radius: 5px;
}

/* Swiper Navigation */
.swiper-button-next,
.swiper-button-prev {
    background: rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 20px;
    color: white;
}

/* ===================================================================
 * Social Section
 * =================================================================== */

.social-section {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.95) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-bottom-color: var(--border-color) !important;
}

.letter-spacing {
    letter-spacing: 2px;
}

.social-links {
    justify-content: center;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 107, 107, 0.1);
    border: 2px solid rgba(255, 107, 107, 0.3);
    border-radius: 50%;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-icon:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

/* ===================================================================
 * Main Content Area
 * =================================================================== */

.main-content {
    min-height: 60vh;
    padding: 3rem 0;
}

/* ===================================================================
 * Footer
 * =================================================================== */

footer {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%) !important;
    border-top-color: var(--border-color) !important;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-dark);
}

.btn-outline-secondary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ===================================================================
 * Back to Top Button
 * =================================================================== */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.3);
    z-index: 999;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.5);
}

/* ===================================================================
 * Utilities
 * =================================================================== */

.text-primary {
    color: var(--primary-color) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.3);
}

hr {
    border-color: var(--border-color) !important;
}

/* ===================================================================
 * Responsive Design
 * =================================================================== */

@media (max-width: 768px) {
    .hero-section {
        height: 350px;
        margin-top: 60px;
    }

    .navbar {
        padding: 0.5rem 0 !important;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-brand img {
        height: 35px !important;
    }

    .nav-link {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.9rem;
    }

    .social-icon {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 40px;
        height: 40px;
    }

    footer {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        height: 250px;
        margin-top: 55px;
    }

    .modal-dialog {
        margin: 1rem;
    }

    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 35px;
        height: 35px;
        display: none;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 1rem;
    }

    .text-md-end {
        text-align: start !important;
        margin-top: 1rem;
    }
}

/* ===================================================================
 * Featured Section
 * =================================================================== */

.featured-section {
    border-bottom: 2px solid var(--border-color);
}

.featured-image {
    overflow: hidden;
    max-height: 500px;
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.featured-image:hover img {
    transform: scale(1.05);
}

.featured-content {
    padding: 1rem;
}

.featured-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
}

.featured-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.featured-meta i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.featured-excerpt {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-dark);
}

/* ===================================================================
 * Articles Section
 * =================================================================== */

.articles-section {
    background-color: var(--light-gray);
}

.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.section-subtitle {
    font-size: 1.1rem;
}

/* ===================================================================
 * Post Cards Grid
 * =================================================================== */

.post-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.post-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(255, 107, 107, 0.15);
    transform: translateY(-5px);
}

.post-card-image {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.post-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
}

.post-card:hover .post-card-image::before {
    opacity: 0.35;
}

.post-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.post-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    flex: 1;
}

.post-card a .post-title {
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-card a:hover .post-title {
    color: var(--primary-color);
}

.post-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    flex-wrap: wrap;
}

.post-author,
.post-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.post-author i,
.post-date i {
    color: var(--primary-color);
}

.post-meta a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-meta a:hover {
    color: var(--secondary-color);
}

/* ===================================================================
 * Responsive Design - Featured & Articles
 * =================================================================== */

@media (max-width: 768px) {
    .featured-section {
        padding: 2rem 0 !important;
    }

    .featured-title {
        font-size: 1.5rem;
    }

    .featured-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .featured-excerpt {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .post-card-image {
        height: 200px;
    }

    .post-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .featured-image {
        margin-bottom: 2rem;
    }

    .featured-content {
        padding: 0;
    }

    .featured-title {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .post-card-image {
        height: 180px;
    }

    .post-card-body {
        padding: 1.2rem;
    }

    .post-title {
        font-size: 1rem;
    }

    .post-excerpt {
        font-size: 0.9rem;
    }
}
