/**
 * Opanije Blog Page Styles
 *
 * Modern Bootstrap 5-based blog page design with responsive layouts,
 * social media integration, and accessibility improvements.
 *
 * @package Opanije
 * @version 1.0.0
 */

:root {
    --primary-color: #d8a81b;
    --primary-dark: #b7780d;
    --text-dark: #2B2823;
    --text-light: #666;
    --bg-light: #F7F7F7;
    --transition: all 0.3s ease;
}

/* ===== OPANIJE MODERN BLOG PAGE STYLES ===== */
.blog-page {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
}

.blog-page h1,
.blog-page h2,
.blog-page h3,
.blog-page h4,
.blog-page h5 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* Hero Section - Centered Full-Width Design */
.blog-hero {
    min-height: 50vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

/* Fixed background only on desktop with hover capability */
@media (hover: hover) and (min-width: 992px) {
    .blog-hero {
        background-attachment: fixed;
    }
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(43, 40, 35, 0.92) 0%,
        rgba(43, 40, 35, 0.85) 50%,
        rgba(216, 168, 27, 0.4) 100%
    );
    z-index: 1;
}

.blog-hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    text-align: center;
}

.hero-subtitle {
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 800;
    text-align: center;
}

.hero-text {
    font-size: 1.2rem;
    color: #ffffff;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
    text-align: center;
}

/* Social Media Connection Box - Centered */
.social-connect-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 1.8rem 2rem;
    border-radius: 20px;
    margin-top: 0;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(216, 168, 27, 0.3);
    text-align: center;
}

.social-connect-box h2 {
    color: var(--text-dark);
    font-size: 1.15rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.social-connect-box p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

/* Modern Social Media Icons - Centered */
.social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.social-icon {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: -1;
}

.social-icon i {
    position: relative;
    z-index: 2;
    transition: var(--transition);
}

/* Focus states for keyboard navigation */
.social-icon:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 4px;
}

.social-icon:hover,
.social-icon:focus {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
    border-color: currentColor;
}

.social-icon:hover::before,
.social-icon:focus::before {
    transform: scale(1);
}

.social-icon:hover i,
.social-icon:focus i {
    transform: scale(1.1);
}

/* Individual Social Media Brand Colors */
.social-instagram:hover,
.social-instagram:focus {
    color: #fff;
    border-color: #e1306c;
}
.social-instagram:hover::before,
.social-instagram:focus::before {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-facebook:hover,
.social-facebook:focus {
    color: #fff;
    border-color: #1877f2;
}
.social-facebook:hover::before,
.social-facebook:focus::before {
    background: linear-gradient(135deg, #1877f2 0%, #0e5dc9 100%);
}

.social-youtube:hover,
.social-youtube:focus {
    color: #fff;
    border-color: #ff0000;
}
.social-youtube:hover::before,
.social-youtube:focus::before {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

.social-tiktok:hover,
.social-tiktok:focus {
    color: #fff;
    border-color: #000;
}
.social-tiktok:hover::before,
.social-tiktok:focus::before {
    background: linear-gradient(135deg, #000 0%, #333 100%);
}

.social-twitter:hover,
.social-twitter:focus {
    color: #fff;
    border-color: #1da1f2;
}
.social-twitter:hover::before,
.social-twitter:focus::before {
    background: linear-gradient(135deg, #1da1f2 0%, #0c85d0 100%);
}

/* Verified Badge */
.verified-badge {
    display: inline-block;
    margin-left: 8px;
    color: var(--primary-color);
    font-size: 0.85rem;
    vertical-align: middle;
}

/* Section Spacing & Titles */
.section {
    padding: 100px 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 800;
    color: var(--text-dark);
    position: relative;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Featured Posts - Bootstrap Card Design */
.featured-posts {
    background: #fff;
}

.post-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    border: 1px solid #e9ecef;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.post-card:hover,
.post-card:focus-within {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.post-card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 280px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.post-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover img,
.post-card:focus-within img {
    transform: scale(1.1) rotate(2deg);
}

.post-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary-color);
    color: var(--text-dark);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(216, 168, 27, 0.4);
}

.post-card-body {
    padding: 2rem;
}

.post-card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 700;
}

.post-card-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-card-title a:hover,
.post-card-title a:focus {
    color: var(--primary-color);
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.post-card-text {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 0;
}

/* Learning Resources Cards */
.resources-section {
    background: var(--bg-light);
}

.resource-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid #e9ecef;
    height: 100%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

.resource-card:hover,
.resource-card:focus-within {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.resource-icon {
    width: 130px;
    height: 130px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--primary-color);
    box-shadow: 0 8px 25px rgba(216, 168, 27, 0.25);
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.resource-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.resource-card:hover .resource-icon img,
.resource-card:focus-within .resource-icon img {
    transform: scale(1.1);
}

.resource-card h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 700;
}

.resource-card p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Modern Buttons */
.btn-custom {
    background: var(--primary-color);
    color: var(--text-dark);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    border: 2px solid var(--primary-color);
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(216, 168, 27, 0.3);
}

.btn-custom:hover,
.btn-custom:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(216, 168, 27, 0.4);
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Summer Camp CTA Section */
.camp-cta {
    background: linear-gradient(135deg, var(--text-dark) 0%, #3d3832 100%);
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.camp-cta-content {
    position: relative;
    z-index: 2;
}

.camp-cta h2 {
    color: #fff;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.camp-cta .highlight {
    color: var(--primary-color);
    display: block;
    font-size: 1.1em;
    margin-bottom: 1rem;
}

.camp-cta p {
    color: #d2ab68;
    font-size: 1.25rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.camp-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    text-align: left;
}

.camp-feature {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(216, 168, 27, 0.2);
    transition: var(--transition);
}

.camp-feature:hover,
.camp-feature:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(216, 168, 27, 0.4);
    transform: translateY(-5px);
}

.camp-feature i {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.camp-feature h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.camp-feature p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.6;
}

.btn-camp {
    background: var(--primary-color);
    color: var(--text-dark);
    padding: 1.4rem 3.5rem;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    border: 3px solid var(--primary-color);
    box-shadow: 0 8px 25px rgba(216, 168, 27, 0.4);
    margin-top: 2rem;
}

.btn-camp:hover,
.btn-camp:focus {
    background: #fff;
    color: var(--text-dark);
    border-color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.3);
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Free Course Banner */
.free-course-banner {
    background: linear-gradient(135deg, #2B2823 0%, var(--primary-dark) 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.free-badge {
    display: inline-block;
    background: #4CAF50;
    color: #fff;
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.free-course-banner h3 {
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    font-weight: 800;
}

.free-course-banner p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.course-highlights {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.highlight-item {
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 600;
}

.highlight-item i {
    margin-right: 8px;
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
    .blog-hero {
        min-height: auto;
        padding: 50px 0;
    }

    .section {
        padding: 70px 0;
    }

    .hero-content {
        padding: 30px 20px;
    }

    .camp-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        min-height: auto;
        padding: 40px 0;
    }

    .blog-hero::before {
        background: linear-gradient(
            to bottom,
            rgba(43, 40, 35, 0.93) 0%,
            rgba(43, 40, 35, 0.88) 100%
        );
    }

    .hero-content {
        padding: 25px 15px;
    }

    .social-connect-box {
        padding: 1.5rem 1.2rem;
    }

    .social-icons {
        gap: 12px;
    }

    .social-icon {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }

    .post-card-img-wrapper {
        height: 220px;
    }

    .camp-cta,
    .free-course-banner {
        padding: 70px 0;
    }

    .course-highlights {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .section {
        padding: 60px 0;
    }
}

@media (max-width: 576px) {
    .blog-hero {
        padding: 30px 0;
    }

    .hero-content {
        padding: 20px 15px;
    }

    .social-connect-box h2 {
        font-size: 1rem;
    }

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

    .camp-features {
        gap: 1.2rem;
    }

    .camp-feature {
        padding: 1.2rem;
    }
}

@media (min-width: 1400px) {
    .hero-content {
        max-width: 1000px;
    }
}
