/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Consolas, Menlo, Monaco, monospace;
    overflow-x: hidden;
}

/* Background color for homepage */
body.homepage {
    background-color: #f2f2f2;
}

/* Background color for branding page */
body.branding-page {
    background-color: #f2f2f2;
}

/* Default background for pages without specific class */
body {
    background-color: #f2f2f2;
}

/* Hide Quarto navbar except search */
#quarto-header {
    background-color: transparent !important;
    border-bottom: none !important;
    padding: 0 !important;
    min-height: 0 !important;
}

.navbar {
    padding: 0 !important;
    min-height: 0 !important;
}

.navbar-container {
    padding: 0 !important;
}

.navbar-brand,
.navbar-title,
.navbar-nav,
.navbar-toggler {
    display: none !important;
}

/* Main Container Layout */
.page-layout-custom {
    display: flex;
    min-height: 100vh;
}

/* Custom Sidebar */
.custom-sidebar {
    width: 180px;
    background-color: #13252b;
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 1rem;
    z-index: 1000;
}

/* Main Content Area */
.main-content-wrapper {
    margin-left: 180px;
    width: calc(100% - 180px);
    min-height: 100vh;
}

.sidebar-logo {
    width: 100%;
    height: auto;
    background-color: #13252b;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
}

.sidebar-logo img {
    max-width: 100%;
    max-height: auto;
    object-fit: contain;
}

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

.sidebar-nav a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.sidebar-nav a:hover {
    color: #3498db;
}

.sidebar-social {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.sidebar-social a {
    color: #ecf0f1;
    font-size: 1rem;
    border-radius: 6px;
    padding: 0.75rem 2rem;
    text-decoration: none;
    transition: color 0.3s;
}

.sidebar-social a:hover {
    color: #3498db;
}

/* Position Quarto's search in top right */
#quarto-search {
    position: fixed !important;
    top: 1.5rem !important;
    right: 5rem !important;
    left: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1001 !important;
}

.aa-Autocomplete {
    width: 300px !important;
}

.aa-Form {
    border: 2px solid #f4d03f !important;
    border-radius: 25px !important;
    background-color: white !important;
}

.aa-Form:focus-within {
    border-color: #f39c12 !important;
}

.aa-Input {
    padding: 0.6rem 1rem !important;
    font-size: 0.95rem !important;
}

.search-input {
    width: 300px;
    padding: 0.6rem 1rem;
    border: 2px solid #ff6b9d;
    border-radius: 25px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #ff6b9d;
}

/* ========== HOMEPAGE SPECIFIC STYLES ========== */

/* Hero Logo Section */
.hero-section {
    padding: 1.5rem 3rem;
    text-align: center;
}

.hero-logo {
    width: 100%;
    height: 100%;
    background-color: #f2f2f2;
    border-radius: 12px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Content Grid */
.content-grid {
    padding: 1rem 3rem 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* Featured Posts */
.featured-posts {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-card {
    background-color: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.post-image {
    width: 100%;
    height: auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.post-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: block;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #2c3e50;
}

.post-meta {
    color: #7f8c8d;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.post-excerpt {
    color: #34495e;
    font-size: 1rem;
}

/* Related Stories Sidebar */
.related-stories {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-heading {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #ff6b9d;
}

.story-card {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.story-card:hover {
    transform: translateX(4px);
}

.story-title {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.story-meta {
    color: #95a5a6;
    font-size: 0.85rem;
}

/* ========== BRANDING PAGE SPECIFIC STYLES ========== */

/* Hero Banner (Branding) */
.hero-banner {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%,0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.hero-banner img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Content Wrapper (Branding) */
.branding-content {
    padding: 0 3rem 3rem 3rem;
}

/* Page Title */
.page-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #ff6b9d;
}

/* Section Styling */
.section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.8rem;
    color: #2c3e50;
}

/* Three Column Layout */
.three-column {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Pink blob underneath three-column headings */
.three-column .content-block .text-h3 {
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.three-column .content-block .text-h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 3px;
    background-color: #ff4876;
    border-radius: 10px;
}


/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* Single Column Layout */
.one-column {
    max-width: 100%;
}

/* Content Blocks - Plain styling without cards */
.content-block {
    margin-bottom: 1rem;
}

/* Image Block */
.image-block {
    width: 100%;
    height: auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 0%,0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

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

/* Text Hierarchy */
.text-h1 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: bold;
}

.text-h2 {
    font-size: 1.2rem;
    color: #34495e;
    margin-bottom: 0.75rem;
    font-weight: bold;
}

.text-h3 {
    font-size: 1rem;
    color: #34495e;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.text-body {
    font-size: 0.85rem;
    color: #34495e;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.text-caption {
    font-size: 0.6rem;
    color: #7f8c8d;
    font-style: italic;
}

/* Horizontal Card Layout */
.horizontal-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.horizontal-card.reverse {
    grid-template-columns: 1fr 1fr;
}

.horizontal-card .image-block {
    width:100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 0;
}

.horizontal-card .image-block img {
    border-radius: 10px;
    display: block;   /* prevents white gaps */
}


.horizontal-card .text-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.horizontal-card.reverse .image-block {
    border-radius: 10px;
    order: 2;
}

.horizontal-card.reverse .text-content {
    order: 1;
}



/* Subscribe Form Styling */
.subscribe-form-section {
    max-width: 600px;
    margin: 2rem auto;
}

.subscribe-form-container {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.subscribe-form .form-group {
    margin-bottom: 1.5rem;
}

.subscribe-form label {
    display: block;
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.subscribe-form input[type="text"],
.subscribe-form input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-family: Consolas;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.subscribe-form input[type="text"]:focus,
.subscribe-form input[type="email"]:focus {
    outline: none;
    border-color: #ff6b9d;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

.submit-button {
    width: 100%;
    padding: 1rem;
    background-color: #ff6b9d;
    color: white;
    border: none;
    border-radius: 8px;
    font-family: Consolas;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.submit-button:hover {
    background-color: #e55a8a;
    transform: translateY(-2px);
}

.privacy-note {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: #7f8c8d;
    text-align: center;
    font-style: italic;
}



/* ========== RESPONSIVE DESIGN ========== */

@media (max-width: 1200px) {
    .three-column {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 968px) {
    .content-grid,
    .two-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 968px) {
    .custom-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content-wrapper {
        margin-left: 0;
        width: 100%;
    }
    
    #quarto-search {
        right: 1rem;
    }
    
    .three-column {
        grid-template-columns: 1fr;
    }
    
    .horizontal-card,
    .horizontal-card.reverse {
        grid-template-columns: 1fr;
    }
    
    .horizontal-card.reverse .image-block,
    .horizontal-card.reverse .text-content {
        order: 0;
    }
}