/* ===== BLOG PAGE STYLES ===== */

/* Blog Hero Section */
.blog-hero {
    position: relative;
    background-image: url("https://assets.maccarianagency.com/backgrounds/img1.jpg");
    background-size: cover;
    background-position: center;
    margin-top: -104px;
    padding-top: 104px;
}

.blog-hero::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    background: #161c2d;
    opacity: 0.6;
}

.blog-hero-content {
    position: relative;
    z-index: 3;
    min-height: 300px;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

@media (min-width: 640px) {
    .blog-hero-content {
        min-height: 400px;
    }
}

@media (min-width: 768px) {
    .blog-hero-content {
        min-height: 600px;
    }
}

.blog-hero-title {
    font-weight: 700;
    color: white;
    text-align: center;
    margin-bottom: 1rem;
}

.blog-hero-subtitle {
    color: white;
    text-align: center;
    margin: 0;
}

.blog-hero-wave {
    position: absolute;
    bottom: 0;
    z-index: 2;
    width: 100%;
    max-height: 120px;
}

/* Blog Stories Section */
.blog-stories-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 4rem 1rem;
}

@media (min-width: 600px) {
    .blog-stories-container {
        max-width: 720px;
    }
}

@media (min-width: 900px) {
    .blog-stories-container {
        max-width: 1236px;
    }
}

.blog-stories-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .blog-stories-header {
        flex-direction: row;
        align-items: center;
    }
}

.blog-stories-title {
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.blog-stories-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

.blog-stories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .blog-stories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .blog-stories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Blog Card */
.blog-card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.blog-card-link:hover {
    transform: translateY(-4px);
}

.blog-card {
    width: 100%;
    height: 100%;
    box-shadow: 0 10px 13px -6px rgba(0,0,0,0.2), 0 20px 31px 3px rgba(0,0,0,0.14), 0 8px 38px 7px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    background: none;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: var(--card-background);
}

.blog-card-media {
    position: relative;
}

.blog-card-wave {
    position: absolute;
    bottom: 0;
    color: var(--card-background);
    transform: scale(2);
    height: auto;
    width: 100%;
    transform-origin: top center;
}

.blog-card-content {
    position: relative;
    padding: 1rem;
    flex: 1;
}

.blog-card-title {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.blog-card-description {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

.blog-card-footer {
    padding: 0 1rem 1rem;
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

.blog-card-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin-bottom: 1rem;
    height: 0;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-card-author {
    display: flex;
    align-items: center;
}

.blog-card-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.blog-card-author-name {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

.blog-card-date {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

/* ===== BLOG ARTICLE PAGE STYLES ===== */

/* Blog Article Container */
.blog-article-container {
    background-color: var(--alternate-main);
    padding: 2rem 0;
}

@media (min-width: 768px) {
    .blog-article-container {
        padding: 2rem 0;
    }
}

@media (min-width: 900px) {
    .blog-article-container {
        padding: 2rem 0;
    }
}

.blog-article-inner {
    max-width: 1236px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Blog Article Hero */
.blog-article-hero-wrapper {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    overflow: hidden;
}

@media (min-width: 640px) {
    .blog-article-hero-wrapper {
        min-height: 500px;
    }
}

@media (min-width: 768px) {
    .blog-article-hero-wrapper {
        min-height: 600px;
    }
}

.blog-article-hero-background {
    position: absolute;
    object-fit: cover;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    background-image: url("/blog.png");
}

.blog-article-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.blog-article-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1236px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

.blog-article-title {
    font-weight: 400;
    color: white;
    margin-bottom: 1rem;
}

.blog-article-author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.blog-article-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.blog-article-author-name {
    font-size: 1.25rem;
    font-weight: 500;
    color: white;
    margin: 0;
    line-height: 1.6;
}

.blog-article-date {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

/* Blog Article Content Card */
.blog-article-content-card {
    background-color: var(--card-background);
    box-shadow: 0 2px 1px -1px rgba(0,0,0,0.2), 0 1px 1px 0 rgba(0,0,0,0.14), 0 1px 3px 0 rgba(0,0,0,0.12);
    border-radius: 0.5rem;
    overflow: hidden;
}

.blog-article-content-inner {
    padding: 1rem 2rem 2rem;
}

@media (min-width: 768px) {
    .blog-article-content-inner {
        padding: 2rem 2rem 3rem;
    }
}

@media (min-width: 900px) {
    .blog-article-content-inner {
        padding: 2rem 2rem 6rem;
    }
}

.blog-article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .blog-article-grid {
        grid-template-columns: 1.5fr 1fr;
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .blog-article-grid {
        grid-template-columns: 2fr 1fr;
        gap: 2rem;
    }
}

/* Blog Article Content */
.blog-article-content {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.75;
}

.blog-article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.blog-article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.blog-article-content p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.blog-article-content strong {
    font-weight: 600;
}

.blog-article-content a {
    color: var(--primary-500);
    text-decoration: underline;
}

.blog-article-content a:hover {
    color: var(--primary-700);
}

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

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

.blog-article-content code {
    background-color: var(--gray-100);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Fira Code', 'JetBrains Mono', 'SF Mono', Consolas, monospace;
    font-size: 0.875em;
}

.blog-article-content pre {
    background-color: #1e1e1e;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.blog-article-content pre code {
    background-color: transparent;
    padding: 0;
    color: #f8f8f2;
    font-size: 0.875rem;
    line-height: 1.6;
}

.blog-article-content blockquote {
    border-left: 4px solid var(--primary-500);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
}

/* Blog Article Sidebar */
.blog-article-sidebar-card {
    position: sticky;
    top: 2rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--card-background);
    min-width: 250px;
    align-self: flex-start;
}

.blog-sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.blog-sidebar-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blog-sidebar-article {
    display: flex;
    flex-direction: column;
    background-color: transparent;
}

.blog-sidebar-article-content {
    padding: 0.5rem;
}

.blog-sidebar-article-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

.blog-sidebar-article-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 0.25rem 0;
    line-height: 1.43;
}

.blog-sidebar-author {
    color: var(--text-muted);
}

.blog-sidebar-date {
    color: var(--text-muted);
}

.blog-sidebar-read-more {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-500);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.02857em;
    line-height: 1.75;
    padding: 0.375rem 0.5rem;
    margin-top: 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.blog-sidebar-read-more:hover {
    background-color: rgba(55, 125, 255, 0.04);
}

/* CTA Block */
.cta-block {
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-500) 0%, #D39E39 100%);
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    color: white;
    overflow: hidden;
}

@media (min-width: 640px) {
    .cta-block {
        padding: 2.5rem;
    }
}

@media (min-width: 768px) {
    .cta-block {
        padding: 3rem;
    }
}

.cta-block-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.cta-block-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.235;
    letter-spacing: -0.02em;
}

@media (min-width: 640px) {
    .cta-block-title {
        font-size: 2rem;
    }
}

@media (min-width: 768px) {
    .cta-block-title {
        font-size: 2.125rem;
    }
}

.cta-block-text {
    font-size: 1rem;
    line-height: 1.6;
    color: white;
    opacity: 0.95;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .cta-block-text {
        font-size: 1.125rem;
    }
}

@media (min-width: 768px) {
    .cta-block-text {
        font-size: 1.25rem;
    }
}

.cta-block-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cta-block-button:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
