/* Specific styles for the blog pages */

/* Shared styles */
.section-padding {
    padding-top: 120px; /* Adjust based on navbar height */
    padding-bottom: 80px;
}

.section-title {
    color: var(--color-off-white);
    font-weight: 800;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 3rem; /* Increased margin */
    font-size: 2.5rem;
}

.section-title:after {
    content: '';
    position: absolute;
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--color-accent);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Blog Hero Section */
.blog-hero-section {
    background: linear-gradient(135deg, var(--color-greyish-blue) 0%, var(--color-deep-blue) 100%);
    color: var(--color-off-white);
    padding: 12rem 0 6rem 0; /* Adjusted top padding to 12rem */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative; /* For potential pseudo-elements */
    overflow: hidden;
}

/* Optional: Add subtle pattern or overlay */
.blog-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(var(--color-accent-rgb, 0, 149, 255), 0.05) 0%, transparent 30%),
                radial-gradient(circle at 90% 80%, rgba(var(--color-accent-rgb, 0, 149, 255), 0.05) 0%, transparent 30%);
    opacity: 0.5;
    z-index: 0;
}

.blog-hero-section .container {
    position: relative; /* Ensure text stays above pseudo-elements */
    z-index: 1;
}

.blog-hero-section h1 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-off-white);
}

.blog-hero-section .lead {
    color: var(--color-light-grey);
    max-width: 700px;
    margin: 0 auto 1.5rem auto;
}

.blog-hero-section .medium-link {
    color: var(--color-accent);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-hero-section .medium-link:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.blog-hero-section .medium-link i {
    margin-left: 4px;
}

/* Blog Listing Page (blog.html) */
#blog-listing {
    background-color: var(--color-dark-grey);
    padding: 5rem 0; /* Added padding */
}

#blog-listing .row {
    margin-left: -15px;
    margin-right: -15px;
}

#blog-listing .col-md-6, 
#blog-listing .col-lg-4 {
    padding-left: 15px;
    padding-right: 15px;
    display: flex; /* Ensure columns take equal height in flex container */
    align-items: stretch; /* Make cards stretch to fill column height */
}

.blog-card {
    background-color: var(--color-greyish-blue);
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.blog-card-img {
    height: 200px;
    object-fit: cover;
}

.blog-card .card-title {
    font-weight: 700;
    color: var(--color-off-white);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.blog-date {
    font-size: 0.85rem;
    color: var(--color-light-grey) !important; /* Ensure text-muted override */
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-date span {
    display: inline-flex;
    align-items: center;
}

.blog-date i {
    margin-right: 0.35rem;
    opacity: 0.8;
}

.blog-card .card-text {
    font-size: 0.95rem;
    color: var(--color-light-grey);
    line-height: 1.6;
}

.blog-card .btn-outline-primary {
    color: var(--color-accent);
    border-color: var(--color-accent);
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.blog-card .btn-outline-primary:hover {
    background-color: var(--color-accent);
    color: white;
}

/* Individual Blog Post Page (e.g., blog/post1.html) */
#blog-post {
    background-color: var(--color-dark-grey);
    color: var(--color-light-grey);
}

.blog-post-header {
    text-align: center;
    margin-bottom: 4rem;
}

.blog-post-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-off-white);
    margin-bottom: 1rem;
}

.blog-post-meta {
    font-size: 0.95rem;
    color: var(--color-light-grey);
    margin-bottom: 3rem; /* Increased margin for more space above image */
}

.blog-post-meta span {
    margin: 0 10px;
}

.blog-post-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 3rem; /* Ensure space below image */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.blog-post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-light-grey);
}

.blog-post-content h2, 
.blog-post-content h3, 
.blog-post-content h4 {
    color: var(--color-off-white);
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.blog-post-content h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--color-greyish-blue);
    padding-bottom: 0.5rem;
}

.blog-post-content h3 {
    font-size: 1.5rem;
}

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

.blog-post-content a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post-content a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.blog-post-content ul, 
.blog-post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-post-content li {
    margin-bottom: 0.5rem;
}

.blog-post-content blockquote {
    border-left: 4px solid var(--color-accent);
    margin: 1.5rem 0;
    padding: 0.5rem 1.5rem;
    background-color: rgba(30, 45, 69, 0.5); /* --color-greyish-blue with opacity */
    font-style: italic;
    color: var(--color-light-grey);
}

.blog-post-content code {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    border-radius: 3px;
    font-family: monospace;
}

.blog-post-content pre {
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.9rem;
}

.blog-post-content pre code {
    background: none;
    padding: 0;
    margin: 0;
    font-size: inherit;
    border-radius: 0;
}

.blog-navigation {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-greyish-blue);
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
}

.blog-navigation a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
}

.blog-navigation a:hover {
    text-decoration: underline;
}

.blog-navigation .prev-post i, 
.blog-navigation .next-post i {
    margin: 0 5px;
}

/* --- Glassmorphism Cards for Resources --- */
.glass-card {
    background: rgba(23, 34, 56, 0.82);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(58, 141, 255, 0.18);
    color: #f4f7fa;
    transition: transform 0.18s, box-shadow 0.18s, border 0.18s;
    padding: 2.2rem 1.5rem 1.5rem 1.5rem;
    position: relative;
}

.glass-card:hover {
    transform: translateY(-6px) scale(1.035);
    box-shadow: 0 16px 48px 0 rgba(58,141,255,0.25);
    border-color: #3a8dff;
}

.resource-icon {
    font-size: 2.1rem;
    color: #3a8dff;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 6px #3a8dff44);
}

.card-title {
    color: #fff;
    font-weight: 800;
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.card-divider {
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #3a8dff 0%, #ffb347 100%);
    border-radius: 2px;
    margin: 0.5rem auto 1.1rem auto;
    opacity: 0.7;
}

.resource-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.resource-list li {
    margin-bottom: 0.8em;
}

.resource-list a {
    color: #3a8dff;
    font-weight: 500;
    font-size: 1.07em;
    letter-spacing: 0.01em;
    border-radius: 4px;
    padding: 2px 6px;
    transition: background 0.18s, color 0.18s;
}

.resource-list a:hover {
    color: #fff;
    background: #3a8dff;
    text-decoration: none;
}

@media (max-width: 991px) {
    .glass-card { margin-bottom: 2rem; }
}

/* Resources Card Styling */
.resources-section {
    background: #151e2b;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.resources-section .card {
    background: rgba(20, 28, 44, 0.98);
    border: 1.5px solid #22304a;
    box-shadow: 0 4px 24px 0 rgba(0,0,0,0.18);
    border-radius: 16px;
    color: #f4f7fa;
    transition: transform 0.18s, box-shadow 0.18s;
}

.resources-section .card:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.28);
    border-color: #3a8dff;
}

.resources-section .card-title {
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0.01em;
}

.resources-section ul {
    padding-left: 1.1em;
}

.resources-section a {
    color: #3a8dff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.18s;
}

.resources-section a:hover {
    color: #ffb347;
    text-decoration: underline;
}

/* Language Switcher */
.language-switcher .btn-lang {
    background-color: var(--color-greyish-blue);
    color: var(--color-light-grey);
    border: 1px solid var(--color-accent-light);
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    margin: 0 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.language-switcher .btn-lang.active,
.language-switcher .btn-lang:hover {
    background-color: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
} 