/* ============================================================
   TripManga — Professional Page Module CSS
   Standalone styles, detached from app.css
   Brand: #038a52 (primary green), #1a2b48 (dark navy)
   ============================================================ */

:root {
    --page-primary: #038a52;
    --page-primary-hover: #026b40;
    --page-primary-light: rgba(3, 138, 82, 0.08);
    --page-dark: #1a2b48;
    --page-dark-light: #2a3f5f;
    --page-accent: #f47c04;
    --page-body-bg: #f8fafc;
    --page-white: #ffffff;
    --page-text: #4a5568;
    --page-text-dark: #2d3748;
    --page-text-muted: #718096;
    --page-border: #e2e8f0;
    --page-border-light: #edf2f7;
    --page-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --page-shadow-md: 0 4px 14px rgba(0,0,0,0.08);
    --page-shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
    --page-radius: 8px;
    --page-radius-lg: 12px;
    --page-font: 'Poppins', sans-serif;
}


/* ============================================================
   HERO BANNER
   ============================================================ */

.bc-page-hero {
    position: relative;
    background: linear-gradient(135deg, var(--page-dark) 0%, var(--page-dark-light) 100%);
    background-size: cover;
    background-position: center;
    padding: 80px 0 60px;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    align-items: flex-end;
}

.bc-page-hero.has-image {
    min-height: 340px;
    padding: 100px 0 60px;
}

.bc-page-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(26, 43, 72, 0.55) 0%,
        rgba(26, 43, 72, 0.85) 100%);
    z-index: 1;
}

.bc-page-hero .container {
    position: relative;
    z-index: 2;
}

.bc-page-hero__inner {
    max-width: 800px;
}

.bc-page-hero__title {
    font-family: var(--page-font);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--page-white);
    margin: 0 0 12px;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.bc-page-hero__subtitle {
    font-family: var(--page-font);
    font-size: 1.05rem;
    color: rgba(255,255,255,0.8);
    margin: 0 0 24px;
    line-height: 1.6;
    max-width: 600px;
}

.bc-page-hero__actions {
    margin-top: 20px;
}


/* ============================================================
   BREADCRUMB
   ============================================================ */

.bc-page-breadcrumb ol {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    gap: 0;
}

.bc-page-breadcrumb li {
    font-family: var(--page-font);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.bc-page-breadcrumb li + li::before {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin: 0 10px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
}

.bc-page-breadcrumb li a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: color 0.2s;
}

.bc-page-breadcrumb li a:hover {
    color: var(--page-white);
}

.bc-page-breadcrumb li.active {
    color: rgba(255,255,255,0.95);
    font-weight: 500;
}

.bc-page-breadcrumb li a i {
    margin-right: 4px;
    font-size: 0.8rem;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.bc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--page-font);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    line-height: 1.5;
}

.bc-btn--download {
    background: var(--page-white);
    color: var(--page-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.bc-btn--download:hover {
    background: var(--page-primary);
    color: var(--page-white);
    box-shadow: 0 4px 16px rgba(3,138,82,0.25);
    transform: translateY(-1px);
    text-decoration: none;
}

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

.bc-btn--primary:hover {
    background: var(--page-primary-hover);
    color: var(--page-white);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(3,138,82,0.3);
}

.bc-btn--block {
    display: flex;
    justify-content: center;
    width: 100%;
}


/* ============================================================
   CONTENT BODY & LAYOUT
   ============================================================ */

.bc-page-body {
    background: var(--page-body-bg);
    padding: 48px 0 64px;
}

.bc-page-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: start;
}

/* When TOC is hidden (fewer than 2 headings), single column */
.bc-page-layout:has(.bc-page-toc-sidebar[style*="display:none"]),
.bc-page-layout:has(.bc-page-toc-sidebar[style*="display: none"]) {
    grid-template-columns: 1fr;
}

.bc-page-main {
    min-width: 0;
    flex: 1;
}


/* ============================================================
   ARTICLE CONTENT TYPOGRAPHY
   ============================================================ */

.bc-page-content {
    background: var(--page-white);
    border-radius: var(--page-radius-lg);
    padding: 48px;
    box-shadow: var(--page-shadow-sm);
    border: 1px solid var(--page-border-light);
}

.bc-page-content h1 {
    font-family: var(--page-font);
    font-size: 2rem;
    font-weight: 700;
    color: var(--page-dark);
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--page-primary);
    line-height: 1.3;
}

.bc-page-content h2 {
    font-family: var(--page-font);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--page-dark);
    margin: 40px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--page-border);
    line-height: 1.35;
    scroll-margin-top: 90px;
}

.bc-page-content h2:first-child {
    margin-top: 0;
}

.bc-page-content h3 {
    font-family: var(--page-font);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--page-dark);
    margin: 32px 0 12px;
    line-height: 1.4;
    scroll-margin-top: 90px;
}

.bc-page-content h4 {
    font-family: var(--page-font);
    font-size: 1rem;
    font-weight: 600;
    color: var(--page-text-dark);
    margin: 24px 0 10px;
    line-height: 1.4;
}

.bc-page-content p {
    font-family: var(--page-font);
    font-size: 0.95rem;
    color: var(--page-text);
    line-height: 1.75;
    margin: 0 0 16px;
}

.bc-page-content strong,
.bc-page-content b {
    color: var(--page-text-dark);
    font-weight: 600;
}

.bc-page-content a {
    color: var(--page-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.bc-page-content a:hover {
    color: #d96a00;
    border-bottom-color: var(--page-accent);
}

.bc-page-content ul,
.bc-page-content ol {
    margin: 0 0 20px;
    padding-left: 24px;
    font-family: var(--page-font);
    font-size: 0.95rem;
    color: var(--page-text);
    line-height: 1.75;
}

.bc-page-content ul li,
.bc-page-content ol li {
    margin-bottom: 6px;
}

.bc-page-content ul li::marker {
    color: var(--page-primary);
}

.bc-page-content ol li::marker {
    color: var(--page-primary);
    font-weight: 600;
}

.bc-page-content blockquote {
    margin: 24px 0;
    padding: 20px 24px;
    border-left: 4px solid var(--page-primary);
    background: var(--page-primary-light);
    border-radius: 0 var(--page-radius) var(--page-radius) 0;
    font-style: italic;
    color: var(--page-text-dark);
}

.bc-page-content blockquote p {
    margin: 0;
    color: var(--page-text-dark);
}

.bc-page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-family: var(--page-font);
    font-size: 0.9rem;
}

.bc-page-content table th {
    background: var(--page-primary);
    color: var(--page-white);
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
}

.bc-page-content table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--page-border);
    color: var(--page-text);
}

.bc-page-content table tr:nth-child(even) td {
    background: var(--page-body-bg);
}

.bc-page-content code {
    background: var(--page-body-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--page-primary-hover);
    border: 1px solid var(--page-border);
}

.bc-page-content pre {
    background: var(--page-dark);
    color: #e2e8f0;
    padding: 20px 24px;
    border-radius: var(--page-radius);
    overflow-x: auto;
    margin: 24px 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

.bc-page-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

.bc-page-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--page-radius);
    margin: 16px 0;
}

.bc-page-content hr {
    border: none;
    height: 1px;
    background: var(--page-border);
    margin: 32px 0;
}


/* ============================================================
   SIDEBAR
   ============================================================ */

/* ---- Left Sidebar (TOC + Share + Meta) ---- */

.bc-page-toc-sidebar {
    align-self: start;
    position: sticky;
    top: 90px;
}

.bc-toc-sticky-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bc-sidebar-card {
    background: var(--page-white);
    border-radius: var(--page-radius-lg);
    padding: 24px;
    box-shadow: var(--page-shadow-sm);
    border: 1px solid var(--page-border-light);
}

.bc-sidebar-card h4 {
    font-family: var(--page-font);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--page-dark);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bc-sidebar-card h4 i {
    color: var(--page-primary);
    font-size: 0.9rem;
}


/* -- Table of Contents -- */

.bc-sidebar-toc nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bc-sidebar-toc nav ul li {
    margin: 0;
}

.bc-sidebar-toc nav ul li a {
    display: block;
    font-family: var(--page-font);
    font-size: 0.84rem;
    color: var(--page-text);
    text-decoration: none;
    padding: 7px 12px;
    border-left: 2px solid var(--page-border);
    transition: all 0.2s;
    line-height: 1.4;
}

.bc-sidebar-toc nav ul li a:hover {
    color: var(--page-primary);
    border-left-color: var(--page-primary);
    background: var(--page-primary-light);
}

.bc-sidebar-toc nav ul li a.active {
    color: var(--page-primary);
    border-left-color: var(--page-primary);
    font-weight: 600;
    background: var(--page-primary-light);
}

.bc-sidebar-toc nav ul li.toc-sub a {
    padding-left: 28px;
    font-size: 0.8rem;
}


/* -- Social Share -- */

.bc-share-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bc-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    color: var(--page-white);
}

.bc-share-btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.bc-share-btn--facebook { background: #1877f2; }
.bc-share-btn--facebook:hover { background: #0d6ce6; color: var(--page-white); }

.bc-share-btn--twitter { background: #0f1419; }
.bc-share-btn--twitter:hover { background: #333; color: var(--page-white); }

.bc-share-btn--linkedin { background: #0a66c2; }
.bc-share-btn--linkedin:hover { background: #0856a8; color: var(--page-white); }

.bc-share-btn--whatsapp { background: #25d366; }
.bc-share-btn--whatsapp:hover { background: #1fb855; color: var(--page-white); }

.bc-share-btn--copy {
    background: var(--page-dark);
    color: var(--page-white);
}
.bc-share-btn--copy:hover {
    background: var(--page-primary);
    color: var(--page-white);
}


/* -- Meta Card -- */

.bc-sidebar-meta .bc-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bc-meta-label {
    font-family: var(--page-font);
    font-size: 0.82rem;
    color: var(--page-text-muted);
    font-weight: 500;
}

.bc-meta-value {
    font-family: var(--page-font);
    font-size: 0.85rem;
    color: var(--page-text-dark);
    font-weight: 600;
}


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

@media (max-width: 991px) {
    .bc-page-layout {
        grid-template-columns: 1fr;
    }

    .bc-page-toc-sidebar {
        position: static;
        order: -1;
    }

    .bc-toc-sticky-wrap {
        position: static;
    }

    .bc-page-content {
        padding: 32px;
    }
}

@media (max-width: 767px) {
    .bc-page-hero {
        padding: 60px 0 40px;
        min-height: 220px;
    }

    .bc-page-hero.has-image {
        min-height: 260px;
        padding: 70px 0 40px;
    }

    .bc-page-hero__title {
        font-size: 1.6rem;
    }

    .bc-page-hero__subtitle {
        font-size: 0.95rem;
    }

    .bc-page-content {
        padding: 24px 20px;
    }

    .bc-page-content h2 {
        font-size: 1.25rem;
    }

    .bc-page-body {
        padding: 32px 0 48px;
    }
}

@media (max-width: 480px) {
    .bc-page-hero__title {
        font-size: 1.35rem;
    }

    .bc-btn {
        font-size: 0.85rem;
        padding: 8px 18px;
    }
}


/* ============================================================
   TEMPLATE BUILDER INTEGRATION
   The Template Builder wraps content in nested containers:
   .bc-section > .container > .row > .bc-column > .container > .bc-text
   We neutralize the extra spacing so it fits inside our layout.
   ============================================================ */

.bc-page-content .page-template-content .bc-section {
    padding: 0;
    margin: 0;
}

.bc-page-content .page-template-content .bc-section > .container,
.bc-page-content .page-template-content .bc-section > .container-fluid,
.bc-page-content .page-template-content .bc-column > .container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
}

.bc-page-content .page-template-content .bc-section > .container > .row {
    margin-left: 0;
    margin-right: 0;
}

.bc-page-content .page-template-content .bc-column {
    padding-left: 0;
    padding-right: 0;
}

/* When a row has multiple columns, restore gutter spacing */
.bc-page-content .page-template-content .bc-section > .container > .row > .bc-column ~ .bc-column {
    padding-left: 15px;
}

/* Text block content inherits our article typography */
.bc-page-content .page-template-content .bc-text {
    font-family: var(--page-font);
    font-size: 1rem;
    line-height: 1.85;
    color: var(--page-text);
}

.bc-page-content .page-template-content .bc-text h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--page-dark);
    margin-top: 2.2rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.55rem;
    border-bottom: 2px solid var(--page-primary-light);
    line-height: 1.3;
}

.bc-page-content .page-template-content .bc-text h3 {
    font-size: 1.18rem;
    font-weight: 600;
    color: var(--page-dark);
    margin-top: 1.8rem;
    margin-bottom: 0.7rem;
    line-height: 1.35;
}

.bc-page-content .page-template-content .bc-text h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--page-text-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.bc-page-content .page-template-content .bc-text p {
    margin-bottom: 1.1rem;
    line-height: 1.85;
}

.bc-page-content .page-template-content .bc-text ul,
.bc-page-content .page-template-content .bc-text ol {
    margin-bottom: 1.1rem;
    padding-left: 1.8rem;
}

.bc-page-content .page-template-content .bc-text li {
    margin-bottom: 0.4rem;
    line-height: 1.7;
}

.bc-page-content .page-template-content .bc-text a {
    color: var(--page-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.bc-page-content .page-template-content .bc-text a:hover {
    border-bottom-color: var(--page-accent);
}

.bc-page-content .page-template-content .bc-text blockquote {
    border-left: 4px solid var(--page-primary);
    background: var(--page-primary-light);
    padding: 1rem 1.4rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--page-radius) var(--page-radius) 0;
    font-style: italic;
    color: var(--page-text-dark);
}

.bc-page-content .page-template-content .bc-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.bc-page-content .page-template-content .bc-text table th,
.bc-page-content .page-template-content .bc-text table td {
    padding: 10px 14px;
    border: 1px solid var(--page-border);
    text-align: left;
}

.bc-page-content .page-template-content .bc-text table th {
    background: var(--page-primary);
    font-weight: 600;
    color: #fff;
}

.bc-page-content .page-template-content .bc-text table tr:nth-child(even) {
    background: var(--page-body-bg);
}

/* Call-to-action blocks styling */
.bc-page-content .page-template-content .bc-call-to-action {
    background: linear-gradient(135deg, var(--page-primary) 0%, var(--page-primary-hover) 100%);
    border-radius: var(--page-radius-lg);
    padding: 2rem;
    color: #fff;
}

.bc-page-content .page-template-content .bc-call-to-action h2,
.bc-page-content .page-template-content .bc-call-to-action h3 {
    color: #fff;
    border-bottom: none;
}

/* FAQ blocks styling */
.bc-page-content .page-template-content .bc-faqs .panel {
    border: 1px solid var(--page-border);
    border-radius: var(--page-radius);
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.bc-page-content .page-template-content .bc-faqs .panel-heading {
    background: var(--page-body-bg);
    padding: 12px 16px;
}

.bc-page-content .page-template-content .bc-faqs .panel-heading a {
    color: var(--page-dark);
    font-weight: 600;
    text-decoration: none;
}

.bc-page-content .page-template-content .bc-faqs .panel-body {
    padding: 14px 16px;
    color: var(--page-text);
    line-height: 1.7;
}


/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
    .bc-page-hero {
        background: none !important;
        padding: 20px 0;
        min-height: auto;
    }

    .bc-page-hero__overlay {
        display: none;
    }

    .bc-page-hero__title {
        color: #000 !important;
        font-size: 1.8rem;
    }

    .bc-page-hero__subtitle {
        color: #333 !important;
    }

    .bc-page-breadcrumb,
    .bc-page-hero__actions,
    .bc-page-toc-sidebar,
    .bc-share-buttons {
        display: none !important;
    }

    .bc-page-body {
        background: #fff;
        padding: 0;
    }

    .bc-page-layout {
        grid-template-columns: 1fr;
    }

    .bc-page-content {
        box-shadow: none;
        border: none;
        padding: 0;
    }

    .bc-page-content a {
        color: #000;
        text-decoration: underline;
    }

    .bc-page-content a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8rem;
        color: #666;
    }

    .bc-page-content a[href^="#"]::after,
    .bc-page-content a[href^="javascript"]::after {
        content: "";
    }
}
