/* Minimalistic Black & White Design with Paintbrush Gradient */

:root {
    --color-black: #000000;
    --color-white: #ffffff;
    --color-gray-dark: #333333;
    --color-gray-medium: #666666;
    --color-gray-light: #999999;
    --color-gray-lighter: #f5f5f5;
    --color-gold: #D4AF37;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-white);
    color: var(--color-black);
    line-height: 1.6;
}

/* Simple Black to White Gradient Header - moved to separate banner */
.paintbrush-header {
    position: relative;
    background: transparent;
}

/* Gradient Banner below navbar */
.gradient-banner {
    width: 100%;
    height: 60px;
    background: linear-gradient(115deg, #353535 0%, #FFFFFF 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-notice-banner {
    width: 100%;
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 0.75rem 0;
    text-align: center;
    position: relative;
    z-index: 2000;
    border-bottom: 1px solid #bee5eb;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

.top-notice-banner a {
    color: #0c5460;
    text-decoration: underline;
    font-weight: 700;
}


/* Navbar styling */
.navbar {
    position: relative;
    z-index: 10;
    padding: 1rem 0;
    background: transparent;
}

.navbar-brand {
    color: var(--color-black) !important;
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.navbar-brand:hover {
    color: var(--color-gray-dark) !important;
}

.nav-link {
    color: var(--color-black) !important;
    font-weight: 400;
    font-size: 1rem;
    transition: color 0.3s ease;
    padding: 0.625rem 0.75rem;
    position: relative;
    -webkit-user-drag: none;
    user-select: none;
}

.nav-link:hover {
    color: var(--color-gray-dark) !important;
}

/* Brand link (This is Seon) - bold text, same size as other nav links */
.nav-link.brand-link {
    font-weight: 700;
    font-size: 1rem;
    padding: 0.625rem 0.75rem;
}

.dropdown-toggle {
    color: var(--color-black) !important;
}

.dropdown-toggle:hover {
    color: var(--color-gray-dark) !important;
}

.dropdown-menu {
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-light);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1050;
    position: absolute;
}

.dropdown-item {
    color: var(--color-black);
    padding: 0.5rem 1.5rem;
}

.dropdown-item:hover {
    background-color: var(--color-gray-lighter);
    color: var(--color-black);
}

/* User dropdown styling */
/* User display name styling */
.nav-link.logged-in-user {
    text-decoration: underline !important;
    text-underline-offset: 4px;
}

#userDropdown {
    color: var(--color-black) !important;
}

/* Custom Navbar Container Logic */
@media (min-width: 992px) {
    .navbar-custom-container {
        max-width: 1400px !important;
        width: 100% !important;
    }
    .navbar-collapse {
        gap: 2rem;
    }
    .navbar-right-section {
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }
}
@media (min-width: 1200px) {
    .navbar-custom-container {
        min-width: 1140px;
    }
}
@media (min-width: 1400px) {
    .navbar-custom-container {
        min-width: 1320px;
    }
}

#userDropdown:hover {
    color: var(--color-gray-dark) !important;
}


/* Content Styling */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-black);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

p {
    color: var(--color-gray-dark);
    margin-bottom: 1rem;
}

.lead {
    font-weight: 400;
}

/* Cards */
.card {
    border: 1px solid #333;
    border-radius: 4px;
    box-shadow: none;
}

.card-header {
    background-color: #f0f0f0;
    border-bottom: 1px solid #333;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.modal-title {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Buttons */
.btn-primary {
    background-color: var(--color-black);
    border-color: var(--color-black);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-gray-dark);
    border-color: var(--color-gray-dark);
}

.btn-outline-primary {
    border-color: var(--color-black);
    color: var(--color-black);
}

.btn-outline-primary:hover {
    background-color: var(--color-black);
    border-color: var(--color-black);
    color: var(--color-white);
}

.btn-outline-gold {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.btn-outline-gold:hover {
    background-color: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-white);
}

.btn-outline-video {
    color: #207398;
    border-color: #207398;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.btn-outline-video:hover {
    background-color: #207398;
    border-color: #207398;
    color: var(--color-white);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-outline-audio {
    color: #146c43;
    border-color: #146c43;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.btn-outline-audio:hover {
    background-color: #146c43;
    border-color: #146c43;
    color: var(--color-white);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Forms */
.form-control {
    border: 1px solid var(--color-gray-light);
    border-radius: 4px;
}

.form-control:focus {
    border-color: var(--color-black);
    box-shadow: 0 0 0 0.2rem rgba(0,0,0,0.15);
}

/* Tables */
.table {
    border-color: var(--color-gray-light);
}

.table thead th {
    background-color: #f0f0f0;
    border-bottom: 1px solid #333;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

/* Utility: bordered table container matching the site card style */
.table-bordered-container {
    border: 1px solid #333;
    border-radius: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Alerts */
.alert {
    border-radius: 4px;
    border: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Pagination */
.pagination .page-link {
    color: var(--color-black);
    border: 1px solid var(--color-gray-light);
}

.pagination .page-item.active .page-link {
    background-color: var(--color-black);
    border-color: var(--color-black);
    color: var(--color-white);
}

.pagination .pagination-status {
    min-width: 180px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.pagination .page-link:hover {
    background-color: var(--color-gray-lighter);
    color: var(--color-black);
}

/* Footer */
footer {
    background-color: var(--color-gray-lighter);
    border-top: 1px solid var(--color-gray-light);
}

/* Video Archive Specific */
.archive-header h1 {
    margin-bottom: 0;
}
.archive-header .lead {
    color: var(--color-gray-medium);
}

.video-filters {
    background-color: var(--color-gray-lighter);
    padding: 0.5rem 0.75rem; /* Even tighter */
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.video-filters .form-control,
.video-filters .form-select,
.video-filters .form-check-input,
.video-filters .form-check-label {
    font-size: 1rem;
}

.video-filters .form-control {
    padding: 0.25rem 0.5rem;
    height: auto;
}

.video-filters .form-label {
    margin-bottom: 0.125rem;
    font-size: 1rem;
    font-weight: 500;
}

/* Progress Bar Gradients with Fixed Reveal (No Boomerang/Expanding) */
.progress-bar-striped {
    background-size: 1500px 100% !important;
    background-position: left center !important;
    background-repeat: no-repeat !important;
    animation: none !important; /* Remove shimmer */
}

.bg-gradient-upload {
    background-image: linear-gradient(to right, #00d2ff, #3a7bd5) !important;
}
.bg-gradient-processing {
    background-image: linear-gradient(to right, #4b6cb7, #182848) !important;
}
.bg-gradient-s3 {
    background-image: linear-gradient(to right, #8e2de2, #4a00e0) !important;
}
.bg-gradient-extract {
    background-image: linear-gradient(to right, #f80759, #bc4e9c) !important;
}
.bg-gradient-audio-s3 {
    background-image: linear-gradient(to right, #f12711, #f5af19) !important;
}

.tag-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 500;
    margin: 0.125rem 0.25rem; /* Reduced vertical margin to control height better */
    color: var(--color-white);
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.tag-badge-inline {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.archive-table-container .table-responsive {
    border: none;
    overflow-x: auto;
}

.archive-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: var(--color-white);
}

.archive-table thead {
    background: #f0f0f0;
}

.archive-table thead th {
    color: var(--color-black);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    border: none;
    border-bottom: 1px solid #333;
    font-size: 0.9rem;
    white-space: nowrap;
}

.archive-table tbody tr {
    border-bottom: 1px solid var(--color-gray-light);
    transition: background-color 0.2s ease;
}

.archive-table tbody tr:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .archive-table tbody tr:hover {
        background-color: var(--color-white) !important;
    }
}
@media (min-width: 769px) {
    .archive-table tbody tr:hover {
        background-color: var(--color-gray-lighter);
    }
}

.archive-table td {
    vertical-align: middle;
    min-height: 40px;
    padding: 0.25rem 0.5rem;
    border: none;
}

.archive-table .content-btn {
    display: block;
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .archive-table .content-btn {
        display: inline-block;
        margin-bottom: 0;
        margin-right: 0.25rem;
    }
}

/* Loading state for AJAX list updates */
#video-list-wrapper {
    transition: opacity 0.2s ease-in-out;
}

/* Flowing container for the table */
.archive-table-container {
    max-height: none;
    overflow-y: visible;
    margin-bottom: 0.5rem; /* Reduced margin */
    border-radius: 4px;
    border: 1px solid #333;
}

@media (max-width: 768px) {
    .archive-table-container {
        max-height: none !important;
        overflow-y: visible !important;
        border: none;
    }

    .archive-table thead,
    .stackable-table thead {
        display: none;
    }

    .archive-table, 
    .archive-table tbody, 
    .archive-table tr, 
    .archive-table td,
    .stackable-table,
    .stackable-table tbody,
    .stackable-table tr,
    .stackable-table td {
        display: block;
        width: 100%;
    }

    .archive-table tr,
    .stackable-table tr {
        margin-bottom: 1rem;
        border: 1px solid #333 !important;
        border-radius: 4px;
        background: var(--color-white);
        padding: 0.5rem;
    }

    .archive-table td,
    .stackable-table td {
        padding: 0.5rem !important;
        text-align: left !important;
        border: none !important;
    }

    .archive-table td:first-child,
    .stackable-table td:first-child {
        font-weight: bold;
    }

    .archive-table td:not(:last-child),
    .stackable-table td:not(:last-child) {
        border-bottom: 1px solid var(--color-gray-lighter) !important;
        margin-bottom: 0.5rem;
    }

    .archive-table .content-btn {
        width: 100%;
        margin-bottom: 0.5rem;
        margin-right: 0 !important;
    }
}

.archive-content-wrapper {
    display: flex;
    flex-direction: column;
}

.table-min-height-wrapper {
    min-height: 480px;
}

@media (max-width: 768px) {
    .table-min-height-wrapper {
        min-height: 0;
    }
}

.archive-pagination-row {
    margin-top: auto;
    padding-top: 0.5rem; /* Reduced padding */
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Membership Card Hover */
.membership-card {
    border: 2px solid var(--color-gray-light);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
}

.membership-card.featured {
    border-color: var(--color-black);
    background-color: var(--color-gray-lighter);
}

.membership-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-black);
}

.membership-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-gray-medium);
}

/* Schedule Table */
.schedule-table-container {
    background: var(--color-white);
    border-radius: 4px;
    border: 1px solid #333;
    overflow: hidden;
    margin-top: 2rem;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.schedule-table thead {
    background: transparent;
}

.schedule-table thead th {
    color: var(--color-black);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    border: none;
    border-bottom: 1px solid #333;
    font-size: 0.9rem;
    text-align: center;
    white-space: nowrap;
}

.schedule-table tbody tr {
    border-bottom: 1px solid var(--color-gray-light);
    transition: background-color 0.2s ease;
}

.schedule-table tbody tr:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .schedule-table tbody tr:hover {
        background-color: var(--color-white) !important;
    }
}
@media (min-width: 769px) {
    .schedule-table tbody tr:hover {
        background-color: var(--color-gray-lighter);
    }
}

.schedule-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border: none;
    text-align: center;
}

.schedule-table tbody td:first-child {
    font-weight: 600;
    color: var(--color-black);
}

.schedule-table tbody td:nth-child(2) {
    color: var(--color-gray-dark);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
}

.schedule-table tbody td:nth-child(3) {
    color: var(--color-gray-dark);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
}

.schedule-note {
    background: var(--color-gray-lighter);
    padding: 1rem;
    margin: 0;
    border-top: 1px solid var(--color-gray-light);
    font-size: 0.85rem;
    color: var(--color-gray-medium);
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .paintbrush-header {
        min-height: auto;
    }
    
    .membership-card {
        margin-bottom: 1rem;
    }
    
    .schedule-table thead th {
        font-size: 0.8rem;
        padding: 1rem 0.5rem;
        text-align: center;
    }
    
    .schedule-table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
        text-align: center;
    }
}

/* Auth Popup Notification */
.auth-popup {
    background-color: rgba(212, 175, 55, 0.9); /* var(--color-gold) with opacity */
    color: var(--color-white);
    padding: 8px 25px;
    border-radius: 50px; /* Pill shape */
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1050;
    white-space: nowrap;
    font-weight: 500;
    font-size: 0.95rem;
    animation: popupFadeIn 0.4s ease-out;
    letter-spacing: 0.5px;
}

/* Auth Popup - Mobile (below username) */
@media (max-width: 991px) {
    /* Smooth fade-out when the menu closes */
    .navbar-collapse .nav-item {
        transition: opacity 0.25s ease;
    }

    /* Allow the gold halo box-shadow to render outside the collapse boundary
       without adding internal height (which would affect animation distance) */
    .collapsing {
        overflow: clip !important;
        overflow-clip-margin: 22px;
    }

    .auth-popup {
        white-space: normal;
        max-width: 90%;
        text-align: center;
        padding: 6px 15px;
        font-size: 0.85rem;
    }
}

.auth-popup.fade-out {
    animation: popupFadeOut 0.5s ease forwards;
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes popupFadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(1.1); }
}

/* Footer Links */
footer a {
    color: var(--color-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #E5C158;
    text-decoration: underline;
}

/* Active Navigation Gold Glow - Permanent Base Layer */
.nav-link.active {
    color: var(--color-gold) !important;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    position: relative;
    /* Permanent subtle glow - always visible, never animated */
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
    border-radius: 50px;
}

/* Animated Pulse Halo Layer (::before) - fades in/out during transitions */
.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50px;
    /* Stronger pulse glow - animated */
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.nav-link.active::before {
    opacity: 1; /* Full pulse glow when active */
}

/* Animation Classes - 50% overlap timing */
.nav-link.animating-out::before {
    /* Pulse halo fades out (0.5s - simple ease-in-out) */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.nav-link.animating-in::before {
    /* Pulse halo fades in (0.7s - simple ease-in-out) */
    opacity: 1;
    transition: opacity 0.7s ease-in-out;
}

/* Sticky Footer Layout */
html {
    height: auto;
    overflow-y: auto;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

/* Header stays at top */
.paintbrush-header {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    background: var(--color-white);
    z-index: 1000;
}

/* Main content area grows naturally */
main.container {
    flex: 1 0 auto;
    position: relative;
    padding-bottom: 1rem;
}

/* Footer - always at bottom of screen */
#main-footer {
    flex-shrink: 0;
    padding: 0.75rem 0;
    text-align: center;
    border-top: 1px solid var(--color-gray-light);
    background: var(--color-white);
    margin-top: auto;
    position: sticky;
    bottom: 0;
    z-index: 1000;
}

#main-footer a {
    -webkit-user-drag: none;
}

/* Unified Member Area Sections */
.uz-section {
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
    background: var(--color-white);
    margin-bottom: 1.25rem;
}

.uz-section-header {
    background: #f0f0f0;
    border-bottom: 1px solid #333;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-black);
}

.uz-section-body {
    padding: 1.5rem;
}

/* Membership plan rows */
.uz-plan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--color-gray-light);
    gap: 1rem;
}

.uz-plan-item:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .uz-plan-item:hover {
        background-color: var(--color-white) !important;
    }
}
@media (min-width: 769px) {
    .uz-plan-item:hover {
        background-color: #fafafa;
    }
}

.uz-plan-item-info {
    flex: 1;
    min-width: 0;
}

.uz-plan-item-info h6 {
    margin: 0 0 0.25rem 0;
    font-weight: 600;
}

.uz-plan-item-info small {
    color: var(--color-gray-medium);
    display: block;
    max-width: 130ch;
}

.uz-plan-item form, 
.uz-plan-item > button {
    flex-shrink: 0;
}

.uz-plan-item button {
    width: 130px;
}

@media (max-width: 767px) {
    .uz-plan-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .uz-plan-item-info {
        margin-bottom: 1rem;
    }
    .uz-plan-item form, 
    .uz-plan-item > button {
        width: 100%;
    }
    .uz-plan-item button {
        width: 100% !important;
    }
}

/* Navbar spacing */
.navbar-nav {
    gap: 0.5rem;
    align-items: center;
}

/* Ensure navbar items are vertically aligned */
.navbar-collapse {
    align-items: center;
}

/* Rounded tabs - match navbar style */
.nav-tabs {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    gap: 0.5rem;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 50px;
    color: var(--color-black) !important;
    font-weight: 400;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 0.625rem 1rem;
    margin-bottom: 0;
    position: relative;
}

.nav-tabs .nav-link:hover {
    /* Hover highlight removed */
}

.nav-tabs .nav-link.active {
    color: var(--color-gold) !important;
    background-color: transparent;
    border-color: transparent;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

/* Light shadow effect for all images except homepage */
img {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.3s ease;
}

/* Exclude homepage image from shadow effect */
.home-image,
.home-image img {
    box-shadow: none !important;
}

/* Dynamic Content Height Transitions */
.tab-content-scrollable,
.text-content,
.run-seon-content {
    transition: max-height 0s ease-out;
    will-change: max-height;
}

/* Ensure content remains scrollable during transitions */
.tab-content-scrollable,
.text-content {
    overflow-y: auto;
}

/* ── HOME PAGE ───────────────────────────────────────────────────────────── */
.home-wrapper {
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.home-content-row {
    flex: 1;
    display: flex;
    align-items: center;
    min-height: auto;
}

.home-container {
    display: flex;
    align-items: center;
    width: 100%;
    height: auto;
}

.home-image {
    width: 100%;
    max-width: 590px;
    max-height: 50vh;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.home-text {
    white-space: pre-line;
    color: var(--color-gray-dark);
    line-height: 1.5;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.home-container h1 {
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

/* CTA Banner styles - taller with space below */
.cta-banner {
    background: linear-gradient(to right, 
        transparent 0%, 
        var(--color-gray-lighter) 15%, 
        var(--color-gray-lighter) 85%, 
        transparent 100%);
    padding: 1.25rem 0;
    margin-top: 8rem;
    margin-bottom: 0;
    text-align: center;
    flex-shrink: 0;
}

.cta-text {
    color: var(--color-gray-medium);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 400;
    line-height: 1.3;
}

.cta-banner .btn {
    background: var(--color-black);
    border-color: var(--color-black);
    color: var(--color-white);
    border-radius: 50px;
    padding: 0.4rem 1.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.cta-banner .btn:hover {
    background: var(--color-gray-dark);
    border-color: var(--color-gray-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-text-block {
    margin-top: clamp(1.72rem, 10.32vh, 9.17rem);
    margin-bottom: clamp(0.86rem, 5.16vh, 4.59rem);
}

.home-video-wrapper {
    margin-bottom: 1.35rem;
}
.home-audio-wrapper {
    margin-bottom: 8rem;
}
@media (min-width: 768px) {
    .home-audio-wrapper {
        margin-bottom: 1.35rem;
    }
}

/* ── SHARED TWO-COLUMN LAYOUT ───────────────────────────────────────────── */
.fixed-image-column {
    height: calc(100vh - 270px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 190px;
    align-self: flex-start;
}

.introduction-container,
.enlightenment-container,
.dharmatalk-container,
.about-nim-container,
.run-seon-container,
.zoom-container {
    height: auto;
    min-height: calc(100vh - 270px);
    overflow: visible;
}

/* Sidebar Sticky Image styling */
.sidebar-sticky-image {
    max-height: 70vh;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

/* Prevent content jumping during Bootstrap tab transitions for pages with a sticky image */
.enlightenment-container .tab-content,
.dharmatalk-container .tab-content,
.about-nim-container .tab-content {
    display: grid;
    min-height: 400px;
}

.enlightenment-container .tab-content > .tab-pane,
.dharmatalk-container .tab-content > .tab-pane,
.about-nim-container .tab-content > .tab-pane {
    grid-area: 1 / 1;
    display: block !important;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.15s linear, visibility 0s linear 0.15s;
}

.enlightenment-container .tab-content > .tab-pane.active,
.dharmatalk-container .tab-content > .tab-pane.active,
.about-nim-container .tab-content > .tab-pane.active {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.15s linear, visibility 0s linear 0s;
}

.scrollable-content {
    height: auto;
    overflow-y: visible;
    padding-right: 20px;
}

/* ── SPA Page Sections ──────────────────────────────────────────────────────
   Each top-level page lives in a .page-section div inside #spa-root.
   Only the .active section is displayed; the fade-in animation duration matches
   Bootstrap's .tab-pane.fade (0.15s linear) for visual consistency.
   ─────────────────────────────────────────────────────────────────────────── */
/* #spa-root fills main.container naturally */
#spa-root {
    height: auto;
    overflow: visible;
}

.page-section {
    display: none;
}

.page-section.active {
    display: block;
    height: auto;
    overflow: visible;
    animation: spaFadeIn 0.15s linear;
}

@keyframes spaFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Mobile: let page sections expand naturally so main.container can scroll */
@media (max-width: 768px) {
    #spa-root {
        height: auto;
        overflow: visible;
    }

    .page-section.active {
        height: auto;
        overflow: visible;
    }

    .home-wrapper {
        height: auto;
        overflow: visible;
    }
    
    .home-content-row {
        flex: none;
        display: block;
        min-height: auto;
    }
    
    .home-container {
        display: block;
        height: auto;
    }
    
    .home-image {
        max-height: 50vh;
        margin-bottom: 1rem;
    }
    
    .home-container h1 {
        font-size: 2rem;
    }
    
    .home-text {
        font-size: 1.1rem;
    }
    
    .cta-banner {
        margin: 6rem 0 0 0;
        padding: 0.7rem 0;
    }
    
    .hero-text-block {
        margin-top: clamp(1.63rem, 9.80vh, 8.71rem);
        margin-bottom: clamp(0.82rem, 4.90vh, 4.36rem);
    }

    .videos-container,
    .user-zone-container,
    .introduction-container,
    .enlightenment-container,
    .dharmatalk-container,
    .about-nim-container,
    .run-seon-container,
    .zoom-container {
        min-height: 0;
    }

    .scrollable-content {
        height: auto !important;
        overflow: visible !important;
        padding-right: 0 !important;
        padding-bottom: 40px !important; /* Space above footer on mobile */
    }

    .fixed-image-column {
        height: auto;
        margin-top: 2rem;
        position: static;
    }
}

/* ── Timezone picker ──────────────────────────────────────────────────────── */
.tz-search-wrapper {
    position: relative;
}

.tz-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: var(--color-white);
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.tz-suggestion-item {
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.tz-suggestion-item:hover,
.tz-suggestion-item.active {
    background-color: var(--color-accent, #0d6efd);
    color: var(--color-white);
}

.tz-suggestion-city {
    font-weight: 500;
}

.tz-suggestion-meta {
    font-size: 0.8rem;
    opacity: 0.75;
    white-space: nowrap;
}

.tz-selected-display {
    font-size: 0.85rem;
    color: #555;
    padding: 0.2rem 0;
}

/* Audio Controller */
.audio-controller-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.audio-prompt-text {
    font-size: 0.8rem;
    color: var(--color-gray-medium);
    margin-top: 0.5rem;
    transition: opacity 0.3s ease;
}

.audio-pill {
    width: 36px;
    height: 36px;
    background-color: var(--color-gold);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.audio-line {
    width: 3px;
    height: 14px;
    background-color: var(--color-white);
    border-radius: 2px;
    animation: soundWave 2.13s infinite ease-in-out;
    transform-origin: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.audio-line:nth-child(1) { animation-delay: -2.13s; }
.audio-line:nth-child(2) { animation-delay: -1.6s; }
.audio-line:nth-child(3) { animation-delay: -1.07s; }
.audio-line:nth-child(4) { animation-delay: -0.53s; }

@keyframes soundWave {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1); }
}

/* Active Playing State */
.is-playing .audio-pill {
    background-color: transparent;
    box-shadow: none;
}

.is-playing .audio-line {
    background-color: var(--color-gold);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.7);
}

.is-playing .audio-prompt-text {
    opacity: 0;
}

/* ── Third-party Resets (Summernote) ─────────────────────────────────────── */
/* Prevents global typography/card styles from breaking the editor UI */
.note-editor.note-frame {
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    overflow: hidden;
}

.note-editor .note-toolbar {
    background-color: var(--color-gray-lighter) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    padding: 0.5rem !important;
}

/* Undo global uppercase metadata look on toolbar buttons */
.note-editor .note-btn {
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: 400 !important;
    font-size: 13px !important;
    padding: 0.25rem 0.5rem !important;
}

/* Fix dropdown menu typography */
.note-editor .dropdown-item {
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Reset internal paragraph spacing for the composer area */
.note-editable p {
    margin-bottom: 1rem !important;
    line-height: 1.5 !important;
}

.note-editor .note-statusbar {
    background-color: var(--color-gray-lighter) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
}


