/* ===========================
   Brand CSS Variables
=========================== */

:root {
    --vsca-blue: #0D395A;
    --vsca-red:  #D63634;
    --vsca-white: #FCFCFC;

    /* Pull Bootstrap's primary colour system to match brand */
    --bs-primary:         #0D395A;
    --bs-primary-rgb:     13, 57, 90;
    --bs-link-color:      #0D395A;
    --bs-link-hover-color: #092740;
    --bs-link-color-rgb:  13, 57, 90;
}

/* ===========================
   Global Overrides
=========================== */

/* Re-skin btn-primary to brand blue using Bootstrap 5's own CSS-variable tokens
   so hover / focus / disabled states all stay in sync automatically. */
.btn-primary {
    --bs-btn-bg:                var(--vsca-blue);
    --bs-btn-border-color:      var(--vsca-blue);
    --bs-btn-hover-bg:          #092740;
    --bs-btn-hover-border-color:#092740;
    --bs-btn-active-bg:         #092740;
    --bs-btn-active-border-color:#092740;
    --bs-btn-disabled-bg:       var(--vsca-blue);
    --bs-btn-disabled-border-color: var(--vsca-blue);
    color: var(--vsca-white);
}

/* ===========================
   Top Header
=========================== */

.top-header {
    background-color: var(--vsca-white);
    border-bottom: 3px solid var(--vsca-red);
    padding: 0.4rem 0;
}

/* Logo image */
.top-header .logo img {
    max-height: 80px;
    width: auto;
    display: block;
}

/* Italic tagline shown on desktop */
.top-header-tagline {
    font-size: 0.9rem;
    font-style: italic;
    color: #555;
    letter-spacing: 0.01em;
}

/* Social icon links */
.top-header-social-link {
    color: var(--vsca-blue, #0D395A);
    font-size: 1.35rem;
    line-height: 1;
    text-decoration: none;
    transition: color 0.15s ease;
}

.top-header-social-link:hover {
    color: var(--vsca-red, #D63634);
}

/* ===========================
   Navbar
=========================== */

.vsca-navbar {
    background-color: #0D395A;                  /* explicit fallback */
    background-color: var(--vsca-blue, #0D395A); /* prefer CSS var */
}

.vsca-navbar .navbar-brand {
    color: var(--vsca-white) !important;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.vsca-navbar .nav-link {
    color: rgba(255, 255, 255, 0.82) !important;
    transition: color 0.15s ease;
}

.vsca-navbar .nav-link:hover,
.vsca-navbar .nav-link:focus {
    color: var(--vsca-white) !important;
}

.vsca-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

/* Cart button styled for a dark background */
.vsca-navbar .btn-cart {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: var(--vsca-white);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.vsca-navbar .btn-cart:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: var(--vsca-white);
    color: var(--vsca-white);
}

/* ===========================
   Unique Page Elements
=========================== */

/* Advertise Page */
.discount-box {
    background-color: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 0.25rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.design-help {
    background-color: #f4f4f4;
    border-radius: 0.25rem;
    padding: 1.5rem;
}

.contact-prompt {
    margin-top: 1rem;
    font-size: 1.2rem;
}

/* Footer */
.site-footer {
    background-color: var(--vsca-blue);
    padding: 1.75rem 0 1rem;
    color: var(--vsca-white);
}

.site-footer p,
.site-footer small {
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
    font-size: 0.9rem;
}

.site-footer .footer-brand {
    color: var(--vsca-white);
    font-weight: 700;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.2rem;
}

.site-footer .footer-link {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.15s ease;
}

.site-footer .footer-link:hover {
    color: var(--vsca-white);
    text-decoration: underline;
}

.site-footer .footer-divider {
    border-color: rgba(255, 255, 255, 0.18);
    margin: 1rem 0 0.75rem;
}

/* Advertise Page Table */
.rates-table {
    max-width: 600px;
    margin: 1.25rem auto;
}

/* ===========================
   Login Page
=========================== */

/* Compound selector gives higher specificity than Bootstrap's single .container
   class, ensuring this max-width always wins at every responsive breakpoint. */
.container.login-container {
    max-width: 480px;
}

/* Logo shown above the login card */
.login-logo {
    max-height: 80px;
    width: auto;
}

/* ===========================
   Subscribe Page
=========================== */

.subscribe-card {
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    border-width: 2px !important;
}

.subscribe-card:hover {
    border-color: var(--vsca-blue) !important;
    box-shadow: 0 0.25rem 0.75rem rgba(13, 57, 90, 0.12);
}

.subscribe-card.selected {
    border-color: var(--vsca-blue) !important;
    background-color: rgba(13, 57, 90, 0.04);
    box-shadow: 0 0.25rem 0.75rem rgba(13, 57, 90, 0.15);
}

/* Plan icon above the plan name */
.subscribe-plan-icon {
    font-size: 2rem;
    color: var(--vsca-blue);
    margin-bottom: 0.6rem;
    display: block;
    line-height: 1;
}

.subscribe-card.selected .subscribe-plan-icon {
    color: var(--vsca-blue);
}

/* Self-hosted flag image sizing — matches the Bootstrap icon size above */
.subscribe-plan-flag {
    width: 2.75rem;
    height: auto;
    border-radius: 3px;
    margin-left: auto;
    margin-right: auto;
}

/* Questions strip at the bottom of subscribe page */
.subscribe-contact-strip {
    background-color: rgba(13, 57, 90, 0.05);
    border: 1px solid rgba(13, 57, 90, 0.12);
    border-radius: 0.375rem;
    padding: 1rem 1.5rem;
    text-align: center;
    color: #555;
    font-size: 0.95rem;
}

/* ===========================
   Store / Shop Pages
=========================== */

.store-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .store-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12) !important;
    }

    .store-card .card-img-top {
        object-fit: cover;
        height: 220px;
    }

/* ===========================
   Advertise Page
=========================== */

/* Brand-blue table header — drop-in replacement for table-dark on rates table */
.table-vsca thead th {
    background-color: var(--vsca-blue);
    color: var(--vsca-white);
    border-color: var(--vsca-blue);
}

/* Discount callout — white card with a red left accent */
.discount-accent {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-left: 4px solid var(--vsca-red);
    border-radius: 0.375rem;
    padding: 1.25rem 1.5rem;
}

.discount-accent p {
    margin: 0;
    color: #333;
}

/* ===========================
   Contact Page
=========================== */

/* Constrained, responsive form column */
.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
}

/* Card header accent */
.contact-card-header,
.order-card-header {
    background-color: var(--vsca-blue);
    color: var(--vsca-white);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
}

/* ===========================
   Store / Admin — Placeholder Icons
   (shown when a section has no content yet)
=========================== */

/* Admin subscriptions "Coming Soon" placeholder icon */
.admin-placeholder-icon {
    font-size: 2.5rem;
    color: var(--vsca-blue);
    opacity: 0.4;
}

/* Store empty-product placeholder icon */
.store-empty-icon {
    font-size: 3rem;
    color: var(--vsca-blue);
    opacity: 0.35;
}

/* ===========================
   Admin - Shared
=========================== */

/* Compact brand-blue page header for admin pages */
.admin-header {
    background-color: var(--vsca-blue);
    color: var(--vsca-white);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

/* Brand-blue active tab indicator — overrides Bootstrap default */
.nav-tabs .nav-link.active {
    border-top: 3px solid var(--vsca-blue);
    border-bottom-color: transparent;
    color: var(--vsca-blue);
    font-weight: 600;
}

.nav-tabs .nav-link:not(.active):hover {
    color: var(--vsca-blue);
}

/* Admin card headers — solid brand-blue with white text */
.admin-card-header {
    background-color: var(--vsca-blue);
    color: var(--vsca-white);
    font-weight: 600;
    padding: 0.6rem 1rem;
}

/* Storefront product list cards */
.storefront-product-card {
    border: 1px solid #dee2e6;
    border-left: 4px solid var(--vsca-blue);
    border-radius: 0.375rem;
    background: #fff;
    transition: box-shadow 0.15s ease;
}

.storefront-product-card:hover {
    box-shadow: 0 0.25rem 0.75rem rgba(13, 57, 90, 0.1);
}

.storefront-product-card--archived {
    border-left-color: #adb5bd;
    background-color: #f8f9fa;
    opacity: 0.8;
}

/* ===========================
   Admin - Homepage Editor
=========================== */

.admin-edit-container {
    max-width: 800px;
}

.section-header {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--vsca-blue);
    padding-bottom: 0.5rem;
    font-weight: 600;
    color: var(--vsca-blue);
}

/* Image Management */
.image-preview-wrapper {
    margin-bottom: 1rem;
}

    .image-preview-wrapper p {
        font-size: 0.875rem;
        color: #6c757d;
    }

.img-preview-thumbnail {
    max-width: 300px;
    height: auto;
    display: block;
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
}

/* Form Styling */
.form-group-custom {
    margin-bottom: 1.5rem;
}

.validation-error {
    font-size: 0.875rem;
}

/* ===========================
   Admin - Advertising Pricing
=========================== */

/* Constrains the rates table and subscriber placeholder to a readable width */
.admin-panel-section {
    max-width: 560px;
}

/* Keeps the rate number input compact within its table cell */
.admin-rate-input-group {
    max-width: 140px;
}

/* ===========================
   Admin - Product Forms
=========================== */

/* Constrains the Add / Edit Product form to a readable width */
.product-form-container {
    max-width: 680px;
}

/* Inline image preview shown when a product image file is selected */
.product-img-preview {
    max-height: 160px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

/* ===========================
   Admin - Storefront Table
=========================== */

.storefront-col-img              { width: 60px; }
.storefront-col-price            { width: 100px; }
.storefront-col-qty              { width: 80px; }
.storefront-col-actions          { width: 160px; }
.storefront-col-actions-archived { width: 200px; }

.storefront-thumbnail {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
}

.storefront-thumbnail--archived {
    opacity: 0.55;
}

/* ===========================
   Store - Order Success
=========================== */

/* Fixed-size circle wrapping the confirmation checkmark icon */
.order-success-icon {
    width: 64px;
    height: 64px;
}

/* ===========================
   Shared — Page Hero Banner
   (used on About, Advertise, Contact, etc.)
=========================== */

/* Full-width hero banner */
.page-hero {
    background-color: var(--vsca-blue);
    color: var(--vsca-white);
    padding: 3.5rem 0;
}

.page-hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
}

.page-hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.80);
    max-width: 620px;
    margin: 0 auto;
}

/* ===========================
   About Page
=========================== */

/* Timeline */
.about-timeline {
    max-width: 640px;
    margin: 0 auto;
}

.about-timeline-entry {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.about-timeline-year {
    flex-shrink: 0;
    width: 90px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--vsca-blue);
    text-align: right;
    padding-top: 0.1rem;
}

.about-timeline-body {
    border-left: 3px solid var(--vsca-red);
    padding-left: 1.25rem;
    flex: 1;
}

.about-timeline-body p {
    margin: 0;
    color: #444;
    line-height: 1.65;
}

/* CTA section */
.about-cta {
    background-color: var(--vsca-blue);
    color: var(--vsca-white);
    padding: 3rem 0;
    margin-top: 1rem;
}

.about-cta p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 560px;
    margin: 0 auto 1.5rem;
}

.about-cta .btn-cta {
    background-color: var(--vsca-white);
    color: var(--vsca-blue);
    font-weight: 600;
    border: none;
    padding: 0.6rem 1.75rem;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    display: inline-block;
}

.about-cta .btn-cta:hover {
    background-color: #e8e8e8;
    color: var(--vsca-blue);
}

/* ===========================
   Sitewide Transitions & Animations
=========================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page-hero fade-in (About, Advertise, Contact, Subscribe, Store, etc.) */
.page-hero .container {
    animation: fadeInUp 0.45s ease-out both;
}

/* Home hero: cover image and content fade in together */
.home-hero .container {
    animation: fadeInUp 0.5s ease-out both;
}

/* Featured article banner text fades in slightly after the hero */
.featured-banner-content {
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

/* Respect OS-level reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .page-hero .container,
    .home-hero .container,
    .featured-banner-content {
        animation: none;
    }
}

/* ===========================
   Home Page
=========================== */

/* Full-width brand-blue split hero */
.home-hero {
    background-color: var(--vsca-blue);
    padding: 4rem 0;
}

/* Magazine cover image — drop shadow for depth */
.home-cover-img {
    max-height: 480px;
    width: auto;
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.45);
}

/* Small red uppercase label above section titles */
.home-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--vsca-red);
    margin-bottom: 0.5rem;
}

/* Large white issue title on the hero */
.home-issue-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--vsca-white);
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

/* Highlights list — unstyled, red left border per item */
.home-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
}

.home-highlight-item {
    color: rgba(255, 255, 255, 0.88);
    padding: 0.45rem 0 0.45rem 1rem;
    border-left: 3px solid var(--vsca-red);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Featured Article: cinematic full-width banner */
.featured-banner {
    position: relative;
    min-height: 460px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

/* Dark left-heavy gradient so text stays legible */
.featured-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.80) 40%, rgba(0, 0, 0, 0.15));
}

/* Text content sits above the overlay */
.featured-banner-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    padding: 3rem 0;
}

.featured-banner-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--vsca-white);
    margin-bottom: 0.85rem;
    line-height: 1.2;
}

.featured-banner-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    margin: 0;
}

/* On mobile, center the featured banner text and use a uniform dark overlay
   (the left-heavy desktop gradient doesn't suit a centered layout) */
@media (max-width: 767.98px) {
    .featured-banner-content {
        text-align: center;
    }

    .featured-banner-overlay {
        background: rgba(0, 0, 0, 0.60);
    }
}

/* ===========================
   Brand Color Utilities
=========================== */

/* Inline-style-free alternatives for the two brand colours.
   Use wherever a single colour is the only style needed on an element. */
.text-vsca-blue {
    color: var(--vsca-blue);
}

.text-vsca-red {
    color: var(--vsca-red);
}

/* Muted brand-blue — used for de-emphasised labels (e.g. "(optional)") */
.text-vsca-blue-muted {
    color: rgba(13, 57, 90, 0.6);
}

/* ===========================
   Shared — Confirmation Pages
   (Subscribe success, Contact submit, etc.)
=========================== */

/* Large brand-blue icon on confirmation/success pages */
.confirmation-icon {
    font-size: 3.5rem;
    color: var(--vsca-blue);
}

/* Brand-blue heading on confirmation/success pages */
.confirmation-heading {
    color: var(--vsca-blue);
}

/* ===========================
   Shopping Cart Offcanvas
=========================== */

/* Offcanvas header uses brand blue background */
.offcanvas-header-cart {
    background-color: var(--vsca-blue);
}

/* Cart total price displayed in brand blue */
.cart-total-price {
    color: var(--vsca-blue);
}

/* Empty-cart placeholder icon */
.cart-empty-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}

/* Individual cart item card — red left accent border */
.cart-item-card {
    border-left: 3px solid var(--vsca-red) !important;
}

/* Cart item thumbnail */
.cart-item-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Cart item product name */
.cart-item-name {
    color: var(--vsca-blue);
}

/* Cart item quantity badge */
.cart-item-qty {
    min-width: 1.5rem;
    text-align: center;
}

/* ===========================
   Admin - Add Product Wizard
=========================== */

@keyframes wizardReveal {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wizard-reveal {
    animation: wizardReveal 0.25s ease-out forwards;
}
