/* Blog pages specific styles */
@import url('style.css');

/* Blog Hero Section */
.blog-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 4rem 0;
    color: white;
}

.blog-hero-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.blog-hero-text {
    flex: 1;
}

.blog-hero-text h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.blog-hero-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    opacity: 0.9;
}

.blog-hero-text p:last-child {
    margin-bottom: 2rem;
}

.blog-hero-features {
    margin: 2rem 0;
}

.feature-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    min-width: 40px;
}

.feature-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.feature-content p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
}

.blog-hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

.blog-hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.blog-hero-image img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Blog Intro Section */
.blog-intro {
    padding: 3rem 0;
    background-color: var(--light-color);
}

.intro-content h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.intro-content p {
    text-align: center;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    color: #555;
    line-height: 1.7;
}

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

.intro-feature {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.intro-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.intro-feature .feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.intro-feature h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.intro-feature p {
    text-align: center;
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Blog content - two column layout */
.blog-content {
    padding: 3rem 0;
}

.blog-layout {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Main content area */
.blog-main {
    flex: 2;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    padding: 2rem;
}

.blog-header {
    padding: 0 0 2rem 0;
    text-align: center;
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 2rem;
}

.blog-header h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    line-height: 1.3;
}

.blog-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: #666;
    font-size: 0.95rem;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-image {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    margin: 2rem 0;
}

.blog-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.blog-text {
    padding: 1rem 0;
}

.blog-text p {
    margin-bottom: 1.5rem;
    color: #555;
    line-height: 1.8;
    font-size: 1.05rem;
}

.blog-text h2 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1.5rem;
    color: var(--dark-color);
}

.blog-text h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1.25rem;
    color: var(--dark-color);
}

.blog-text ul,
.blog-text ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.blog-text ul li,
.blog-text ol li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.blog-text ul li {
    list-style: disc;
}

.blog-text ol li {
    list-style: decimal;
}

.blog-footer {
    padding: 2rem 0 0 0;
    border-top: 1px solid var(--light-gray);
    margin-top: 2rem;
}

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

.tag {
    background-color: var(--light-gray);
    color: var(--dark-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Sidebar area */
.blog-sidebar {
    flex: 1;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--light-gray);
}

/* Recommended posts */
.recommended-posts .blog-card {
    background: var(--light-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recommended-posts .blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.recommended-posts .blog-image {
    flex: 0 0 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
}

.recommended-posts .blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommended-posts .blog-content {
    flex: 1;
    padding: 0;
}

.recommended-posts .blog-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.recommended-posts .blog-content h3 a {
    color: inherit;
    text-decoration: none;
}

.recommended-posts .blog-content h3 a:hover {
    color: var(--primary-color);
}

.recommended-posts .blog-meta {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    font-size: 0.8rem;
    color: #888;
}

/* Recommended tests */
.recommended-tests .test-card {
    background: var(--light-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recommended-tests .test-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.recommended-tests .test-card-header {
    padding: 0 0 1rem 0;
    background: none;
    color: var(--dark-color);
    text-align: center;
}

.recommended-tests .test-card-header .test-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.recommended-tests .test-card-header h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.recommended-tests .test-card-body {
    padding: 0;
    text-align: center;
}

.recommended-tests .test-card-body p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.recommended-tests .test-card-footer {
    display: flex;
    justify-content: center;
}

.recommended-tests .test-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.recommended-tests .test-link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Blog Index Grid (new class names to avoid conflicts) */
.blog-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-index-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-index-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.blog-index-image {
    height: 200px;
    overflow: hidden;
}

.blog-index-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-index-card:hover .blog-index-image img {
    transform: scale(1.05);
}

.blog-index-content {
    padding: 1.5rem;
}

.blog-index-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.blog-index-content h3 a {
    color: inherit;
    text-decoration: none;
}

.blog-index-content h3 a:hover {
    color: var(--primary-color);
}

.blog-index-content p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.blog-index-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #888;
}

/* Blog Categories Section */
.blog-categories-section {
    padding: 3rem 0;
    background-color: white;
}

.blog-categories-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

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

.category-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--light-color);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.category-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Newsletter Section */
.blog-newsletter {
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
}

.newsletter-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter-content p {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
}

.newsletter-form button {
    padding: 0.8rem 1.5rem;
    background-color: white;
    color: var(--primary-color);
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.newsletter-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Related posts (for blog index) */
.related-posts {
    padding: 3rem 0;
    background-color: var(--light-color);
}

.related-posts h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

/* Blog grid for index and related posts */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.blog-card .blog-image {
    height: auto;
    overflow: hidden;
}

.blog-card .blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-card .blog-content {
    /* padding: 1.5rem; */
}

.blog-card .blog-content h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.blog-card .blog-content h3 a {
    color: inherit;
    text-decoration: none;
}

.blog-card .blog-content h3 a:hover {
    color: var(--primary-color);
}

.blog-card .blog-content p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.blog-card .blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #888;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .blog-layout {
        flex-direction: column;
    }

    .blog-sidebar {
        position: static;
        width: 100%;
    }

    .blog-main {
        flex: 1;
    }
    
    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }
    
    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .blog-content {
        padding: 2rem 0;
    }

    .blog-main {
        padding: 1.5rem;
    }

    .blog-header {
        padding: 0 0 1.5rem 0;
    }

    .blog-header h1 {
        font-size: 1.8rem;
    }

    .blog-meta {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.9rem;
    }

    .blog-text {
        padding: 1rem 0;
    }

    .blog-text h2 {
        font-size: 1.5rem;
    }

    .blog-text h3 {
        font-size: 1.3rem;
    }

    .blog-footer {
        padding: 1.5rem 0 0 0;
    }

    .related-posts {
        padding: 2rem 0;
    }

    .related-posts h2 {
        font-size: 1.7rem;
    }

    /* Blog Hero Responsive */
    .blog-hero {
        padding: 3rem 0;
    }

    .blog-hero-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .blog-hero-text p {
        margin: 0 auto 1.5rem;
    }

    .blog-hero-features {
        margin: 2rem 0;
    }

    .feature-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .blog-hero-stats {
        justify-content: center;
        margin-top: 2rem;
    }

    .blog-hero-text h1 {
        font-size: 2rem;
    }

    .blog-hero-text p {
        font-size: 1.1rem;
    }

    .recommended-posts .blog-card {
        flex-direction: column;
    }

    .recommended-posts .blog-image {
        flex: 0 0 150px;
        height: 150px;
        width: 100%;
    }
    
    .intro-content h2 {
        font-size: 1.7rem;
    }
    
    .blog-categories-section h2 {
        font-size: 1.7rem;
    }
    
    .newsletter-content h2 {
        font-size: 1.7rem;
    }
}

@media (max-width: 480px) {
    .blog-hero-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .stat-item {
        flex: 1;
        min-width: 80px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    .feature-item {
        text-align: center;
    }
    
    .intro-features {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
}