/* Blog-specific CSS - Inherits Bootstrap and main site styles */
/* Uses main site color scheme for consistency */

:root {
    /* Main site colors */
    --primary: #3bacb7; /* sea-foam */
    --primary-dark: #2a8a94;
    --secondary: #f7ae2a; /* primary-orange */
    --success: #1ca979; /* key-lime */
    --danger: #ef4444;
    --warning: #ffc107;
    --dark: #333;
    --gray: #666;
    --light-gray: #f3f4f6;
    --border: #e0e0e0;
    --white: #ffffff;
}

/* Header Navigation - Inherits from main site style.css */
/* No custom navbar overrides - let Bootstrap and main site CSS handle it */

/* Main Content */
.site-main {
    min-height: calc(100vh - 400px);
    padding: 3rem 0;
    background: #fff;
}

.page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid var(--primary);
}

.page-header h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.lead {
    font-size: 1.15rem;
    color: var(--gray);
    line-height: 1.6;
}

/* Posts List */
.posts-list {
    display: grid;
    gap: 3rem;
}

.post-card {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    transition: all 0.3s ease;
    border: none;
}

.post-card:hover .post-hero {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

/* Hero-style featured image section */
.post-hero {
    position: relative;
    height: 450px;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.post-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem 2.5rem;
}

.post-hero-date {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.post-hero-title {
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.post-hero-title a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 2rem;
    line-height: 1.3;
    transition: opacity 0.3s;
}

.post-hero-title a:hover {
    opacity: 0.9;
    text-decoration: none;
}

/* White content card below hero */
.post-content-card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    margin-top: -60px;
    margin-left: auto;
    margin-right: auto;
    max-width: 90%;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.post-image img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.post-content {
    padding: 2rem;
}

.post-title {
    margin-bottom: 1rem;
    font-family: 'Poppins', sans-serif;
}

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

.post-title a:hover {
    color: var(--primary);
    text-decoration: none;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-gray);
}

.post-meta a {
    color: var(--primary);
    text-decoration: none;
}

.post-meta a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.post-excerpt {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.read-more {
    display: inline-block;
    padding: 0.6rem 1.8rem;
    background: var(--secondary);
    color: white;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
}

.read-more:hover {
    background: #e59a1a;
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

/* Single Post Hero */
.post-single-hero {
    position: relative;
    height: 600px;
    width: 100%;
    overflow: hidden;
    margin-bottom: 0;
    margin-top:-50px;
}

.post-single-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-single-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 7rem;
}

.post-single-hero-overlay > * {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    width: 85%;
    padding-left: 5rem;
    padding-right: 5rem;
}

.post-single-hero-date {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 1;
}

.post-single-hero-title {
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    line-height: 1.2;
    margin: 0 auto;
}

/* Single Post Content Card */
.post-single-content-card {
    background: white;
    border-radius: 20px;
    padding: 4rem 5rem;
    margin-top: -100px;
    margin-left: auto;
    margin-right: auto;
    max-width: 85%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

/* Single Post */
.post-single {
    max-width: 900px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 2.5rem;
}

.post-featured-image {
    margin: 0;
    border-radius: 12px 0 0;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-categories {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.category-badge {
    padding: 0.4rem 1rem;
    background: #fce4ec;
    color: var(--secondary);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.category-badge:hover {
    background: var(--secondary);
    color: white;
    text-decoration: none;
}

.post-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark);
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
}

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

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

.post-body h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--dark);
}

.post-body h3 {
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--dark);
}

.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

footer.post-footer {
    background:white;
    color: var(--primary-dark)
}

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

.tag {
    padding: 0.4rem 1rem;
    background: var(--light-gray);
    color: var(--dark);
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--primary);
    color: white;
    text-decoration: none;
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
}

.post-navigation a {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    display: block;
    transition: all 0.3s;
}

.post-navigation a:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.post-navigation .label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
}

.post-navigation .title {
    display: block;
    color: var(--dark);
    font-weight: 500;
}

.card-body.h-100.d-flex.flex-column.justify-content-center.p-4.p-lg-5 {
    background: var(--primary);
    color:white;
}

.card-body.h-100.d-flex.flex-column.justify-content-center.p-4.p-lg-5 .text-muted {
    color:white !important;
}

/* Related Posts */
.related-posts {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border);
    max-width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.related-posts h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.post-card-small {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s;
}

.post-card-small:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.post-card-small h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.post-card-small a {
    color: var(--dark);
    text-decoration: none;
}

.post-card-small a:hover {
    color: var(--primary);
}

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin: 0 0.5rem;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb a:hover {
    color: var(--primary-dark);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 4rem 0 2rem;
}

.pagination a {
    padding: 0.6rem 1.8rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.3s;
}

.pagination a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    text-decoration: none;
}

.page-info {
    color: var(--gray);
    font-weight: 500;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
    margin: 2rem 0;
}

.search-form input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-form button {
    padding: 0.6rem 1.8rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.search-form button:hover {
    background: var(--primary-dark);
}

/* Error Pages */
.error-page {
    text-align: center;
    padding: 5rem 0;
}

.error-page h1 {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #fee;
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-success {
    background: #efe;
    border: 1px solid var(--success);
    color: var(--success);
}

/* Admin Styles - keep these for admin panel */
.admin-body {
    background: var(--light-gray);
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: var(--dark);
    color: var(--white);
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header h2 a {
    color: var(--white);
    text-decoration: none;
}

.admin-user {
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.admin-nav {
    margin-top: 2rem;
}

.admin-nav .nav-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.admin-nav .nav-item:hover {
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}

.admin-main {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
}

.admin-content {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Admin Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--light-gray);
    font-weight: 600;
}

.admin-table tr:hover {
    background: var(--light-gray);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.8rem;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background: #e59a1a;
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: var(--gray);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .post-navigation {
        grid-template-columns: 1fr;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .admin-wrapper {
        flex-direction: column;
    }

    .admin-sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .admin-main {
        margin-left: 0;
    }

    .site-main {
        padding: 2rem 0;
    }

    .post-hero {
        height: 350px;
    }

    .post-hero-title a {
        font-size: 1.5rem;
    }

    .post-hero-overlay {
        padding: 2rem 1.5rem;
    }

    .post-content-card {
        padding: 1.5rem;
        max-width: 92%;
    }

    .post-single-hero {
        height: 450px;
    }

    .post-single-hero-title {
        font-size: 2rem;
    }

    .post-single-hero-overlay {
        padding: 2.5rem 5%;
    }

    .post-single-content-card {
        padding: 2rem;
        margin-top: -70px;
        max-width: 92%;
        border-radius: 15px;
    }
}

/* Override Bootstrap container to match site width */
.site-main .container {
    max-width: 1200px;
}

/* Bento Box Layout Styles */
.post-featured {
    margin-bottom: 0;
}

.post-featured-link {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--primary-dark);
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-height: 450px;
}

.post-featured-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.post-featured-image {
    position: relative;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-featured-link:hover .post-featured-image img {
    transform: scale(1.05);
}

.post-featured-content {
    padding: 3.5rem 3rem;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-featured-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--secondary);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
    width: fit-content;
}

.post-featured-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.2;
    color: white;
    margin-bottom: 1.25rem;
}

.post-featured-excerpt {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.post-featured-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    color: white;
}

.cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--secondary);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.post-featured-link:hover .cta-icon {
    transform: translateX(4px);
}

/* Posts Grid Bento */
.posts-grid-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.post-card-bento {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.post-card-bento:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.post-card-bento-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.post-card-bento-link:hover {
    text-decoration: none;
}

.post-card-bento-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: var(--light-gray);
}

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

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

.post-card-bento-content {
    padding: 2rem 1.75rem;
}

.post-card-badge {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    background: #fce4ec;
    color: var(--secondary);
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.post-card-bento-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--dark);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.post-card-bento:hover .post-card-bento-title {
    color: var(--primary);
}

.post-card-bento-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.75rem;
}

.post-card-bento-date {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.post-card-bento-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--light-gray);
}

.author-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray);
}

/* Responsive Design for Bento Layout */
@media (max-width: 1024px) {
    .posts-grid-bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .post-featured-link {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .post-featured-content {
        padding: 2.5rem 2rem;
    }

    .post-featured-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .posts-grid-bento {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .post-featured-link {
        border-radius: 16px;
    }

    .post-featured-content {
        padding: 2rem 1.5rem;
    }

    .post-featured-title {
        font-size: 1.75rem;
    }

    .post-featured-excerpt {
        font-size: 1rem;
    }

    .post-card-bento {
        border-radius: 16px;
    }

    .post-card-bento-image {
        height: 200px;
    }

    .post-card-bento-content {
        padding: 1.5rem;
    }

    .post-card-bento-title {
        font-size: 1.1rem;
    }
}
