﻿/* ==========================================================================
   Romarc Maritime Modern — Scoped Design System
   ========================================================================== */
.romarc-modern {
    /* Color Tokens */
    --rm-surface: #f8f9ff;
    --rm-surface-card: #ffffff;
    --rm-surface-low: #eff4ff;
    --rm-surface-container: #e5eeff;
    --rm-surface-high: #dce9ff;
    --rm-primary: #00236f;
    --rm-primary-container: #1e3a8a;
    --rm-secondary: #0051d5;
    --rm-secondary-hover: #003ea8;
    --rm-emerald: #059669;
    --rm-emerald-dark: #004a32;
    --rm-emerald-mint: #85f8c4;
    --rm-text-main: #0b1c30;
    --rm-text-muted: #444651;
    --rm-outline: #757682;
    --rm-border: #c5c5d3;
    /* Elevation */
    --rm-shadow-level-1: 0 1px 3px rgba(15, 23, 42, 0.04), 0 6px 16px -4px rgba(15, 23, 42, 0.06);
    --rm-shadow-level-2: 0 4px 6px -1px rgba(37, 99, 235, 0.06), 0 12px 24px -6px rgba(15, 23, 42, 0.08);
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--rm-surface);
    color: var(--rm-text-main);
    font-variant-numeric: tabular-nums;
}

    /* Typography Overrides */
    .romarc-modern h1,
    .romarc-modern h2,
    .romarc-modern h3,
    .romarc-modern h4 {
        font-family: "Plus Jakarta Sans", sans-serif;
        color: var(--rm-primary);
        letter-spacing: -0.015em;
    }

    .romarc-modern h1 {
        font-weight: 800;
    }

    .romarc-modern h2 {
        font-weight: 700;
    }

    /* Hero Section Upgrade (Replaces hero.css) */
    .romarc-modern #hero,
    .romarc-modern .hero {
        background: linear-gradient(135deg, var(--rm-primary) 0%, var(--rm-primary-container) 100%);
        color: #ffffff;
        padding: 120px 0 60px;
    }

        .romarc-modern #hero h1,
        .romarc-modern .hero h1 {
            color: #ffffff;
            font-size: clamp(30px, 4vw, 40px);
            line-height: 1.2;
        }

        /* Primary & Secondary CTAs (Replaces .btn-get-started & .btn-buy) */
        .romarc-modern .btn-rm-primary,
        .romarc-modern .btn-buy,
        .romarc-modern #hero .btn-get-started {
            background-color: var(--rm-secondary);
            color: #ffffff;
            font-weight: 600;
            font-size: 15px;
            min-height: 48px;
            padding: 0.75rem 1.25rem;
            border-radius: 0.5rem;
            border: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.2s ease, transform 0.15s ease;
        }

            .romarc-modern .btn-rm-primary:hover,
            .romarc-modern .btn-buy:hover,
            .romarc-modern #hero .btn-get-started:hover {
                background-color: var(--rm-secondary-hover);
                color: #ffffff;
            }

    /* Cards & Delivery Tier Matrices (Replaces parcelCard.css & quote.css .card) */
    .romarc-modern .parcel-card,
    .romarc-modern .card,
    .romarc-modern .tier-card {
        background: var(--rm-surface-card);
        border: 1px solid rgba(226, 232, 240, 0.9);
        border-radius: 1rem;
        box-shadow: var(--rm-shadow-level-1);
        padding: 1.5rem;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

        .romarc-modern .tier-card:hover,
        .romarc-modern .card:hover {
            box-shadow: var(--rm-shadow-level-2);
            border-color: #93c5fd;
        }

        /* Active Tier Selection State (Bronze / Silver / Gold) */
        .romarc-modern .tier-card.active,
        .romarc-modern .delivery-method.active {
            border: 2px solid var(--rm-secondary);
            background-color: var(--rm-surface-low);
            box-shadow: 0 0 0 3px rgba(0, 81, 213, 0.12);
        }

    /* Info & Spec Boxes */
    .romarc-modern .info-box,
    .romarc-modern .extras-box,
    .romarc-modern .delivery-options-box {
        background-color: var(--rm-surface-low);
        border: 1px solid var(--rm-surface-high);
        border-radius: 0.75rem;
        padding: 1rem 1.25rem;
    }

    /* Form Inputs & Selects (48px Touch Ergonomics) */
    .romarc-modern input.form-control,
    .romarc-modern select.form-control,
    .romarc-modern select.form-select {
        min-height: 48px;
        border: 1px solid #cbd5e1;
        border-radius: 0.5rem;
        padding: 0.75rem 1rem;
        font-size: 15px;
        color: var(--rm-text-main);
        background-color: #ffffff;
    }

        .romarc-modern input.form-control:focus,
        .romarc-modern select.form-control:focus,
        .romarc-modern select.form-select:focus {
            border-color: var(--rm-secondary);
            box-shadow: 0 0 0 3px rgba(0, 81, 213, 0.18);
            outline: none;
        }

    /* Savings & Trust Pills */
    .romarc-modern .badge-savings {
        background-color: var(--rm-emerald);
        color: #ffffff;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        padding: 0.25rem 0.65rem;
        border-radius: 9999px;
    }

    .romarc-modern .badge-trust {
        background-color: var(--rm-emerald-mint);
        color: var(--rm-emerald-dark);
        font-size: 12px;
        font-weight: 700;
        padding: 0.35rem 0.75rem;
        border-radius: 9999px;
    }

/* Step Badges & Quantity Selector Pills */
.romarc-modern .step-badge {
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    background-color: var(--rm-secondary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.romarc-modern .qty-pill-btn {
    min-height: 56px;
    padding: 0.6rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: var(--rm-text-main);
    text-align: center;
    transition: all 0.15s ease;
}

    .romarc-modern .qty-pill-btn:hover {
        border-color: #93c5fd;
        background-color: var(--rm-surface-low);
    }

    .romarc-modern .qty-pill-btn.active {
        border: 2px solid var(--rm-secondary);
        background-color: var(--rm-surface-low);
        color: var(--rm-primary);
    }

/* ==========================================================================
   Shared Header (Romarc Maritime Modern)
   ========================================================================== */
#header.rm-header {
    background: rgba(0, 35, 111, 0.98);
    /* Do NOT add backdrop-filter here — it clips position: fixed .navbar-mobile on mobile */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
    transition: all 0.3s ease;
    z-index: 997;
}

    #header.rm-header.header-scrolled {
        background: rgba(0, 22, 78, 0.99);
        box-shadow: 0 4px 20px rgba(0, 15, 50, 0.25);
        padding: 10px 0;
    }

    #header.rm-header .logo a {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-weight: 800;
        font-size: 22px;
        color: #ffffff;
        letter-spacing: -0.02em;
    }

    #header.rm-header .navbar > ul > li > a {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-weight: 600;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.88);
        padding: 8px 12px;
        transition: color 0.2s ease;
    }

        #header.rm-header .navbar > ul > li > a:hover,
        #header.rm-header .navbar > ul > li > a.active {
            color: #85f8c4;
        }

    #header.rm-header .navbar a.rm-nav-cta {
        background-color: #0051d5;
        color: #ffffff !important;
        padding: 9px 18px;
        border-radius: 0.5rem;
        font-weight: 700;
    }

        #header.rm-header .navbar a.rm-nav-cta:hover {
            background-color: #003ea8;
            color: #ffffff !important;
        }

    /* Mobile Toggle & Full-Screen Drawer */
    #header.rm-header .mobile-nav-toggle {
        color: #ffffff;
        font-size: 28px;
        cursor: pointer;
        line-height: 0;
        transition: 0.3s;
    }

    #header.rm-header .navbar-mobile {
        position: fixed;
        overflow: hidden;
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
        background: rgba(0, 15, 50, 0.92);
        transition: 0.3s;
        z-index: 9999;
    }

        #header.rm-header .navbar-mobile .mobile-nav-toggle {
            position: absolute;
            top: 18px;
            right: 18px;
            color: #ffffff;
            z-index: 10000;
        }

        #header.rm-header .navbar-mobile ul {
            display: block;
            position: absolute;
            top: 60px;
            right: 15px;
            left: 15px;
            bottom: auto; /* Stops the card from stretching to the bottom of the screen */
            max-height: calc(100vh - 80px);
            padding: 16px;
            border-radius: 0.75rem;
            background-color: #00236f;
            border: 1px solid rgba(255, 255, 255, 0.14);
            overflow-y: auto;
            transition: 0.3s;
        }

        #header.rm-header .navbar-mobile > ul > li > a {
            display: block;
            padding: 12px 16px;
            font-size: 16px;
            color: #ffffff;
        }

            #header.rm-header .navbar-mobile > ul > li > a:hover,
            #header.rm-header .navbar-mobile > ul > li > a.active {
                color: #85f8c4;
            }

        #header.rm-header .navbar-mobile a.rm-nav-cta {
            display: block;
            text-align: center;
            margin-top: 8px;
            padding: 12px 18px;
        }
/* Footer */
.rm-footer {
    font-family: "Plus Jakarta Sans", sans-serif;
    background: linear-gradient(180deg, #00236f 0%, #00164e 100%);
}

.rm-footer-link {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    transition: color 0.15s ease;
}

    .rm-footer-link:hover {
        color: #85f8c4;
    }

.rm-social-btn {
    width: 38px;
    height: 38px;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

    .rm-social-btn:hover {
        background: rgba(255, 255, 255, 0.22);
        transform: translateY(-2px);
    }

/* High-Contrast UK Collection Toggle Buttons */
.romarc-modern .delivery-method {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--rm-text-main);
    padding: 0.75rem 1rem;
    text-align: left;
}

    .romarc-modern .delivery-method .small {
        color: var(--rm-text-muted);
    }

    .romarc-modern .delivery-method.active,
    .romarc-modern .delivery-method.active:hover,
    .romarc-modern .delivery-method.active:focus {
        border: 2px solid var(--rm-secondary);
        background-color: var(--rm-surface-low);
        color: var(--rm-primary) !important;
        box-shadow: 0 0 0 3px rgba(0, 81, 213, 0.12);
    }

        .romarc-modern .delivery-method.active .small {
            color: var(--rm-text-main) !important;
        }


/* ==========================================================================
   Contact Form Status Messages (.php-email-form)
   ========================================================================== */
.romarc-modern .php-email-form .loading {
    display: none;
    background: #ffffff;
    text-align: center;
    padding: 15px;
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
    color: var(--rm-primary);
    font-weight: 600;
}

    .romarc-modern .php-email-form .loading:before {
        content: "";
        display: inline-block;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        margin: 0 10px -4px 0;
        border: 3px solid var(--rm-secondary);
        border-top-color: #ffffff;
        animation: rm-spin 1s linear infinite;
    }

.romarc-modern .php-email-form .error-message {
    display: none;
    color: #ffffff;
    background: #ba1a1a;
    text-align: left;
    padding: 15px;
    border-radius: 0.5rem;
    font-weight: 600;
}

.romarc-modern .php-email-form .sent-message {
    display: none;
    color: #ffffff;
    background: var(--rm-emerald);
    text-align: center;
    padding: 15px;
    border-radius: 0.5rem;
    font-weight: 600;
}

    /* Show when contactus.js adds the .d-block class */
    .romarc-modern .php-email-form .loading.d-block,
    .romarc-modern .php-email-form .error-message.d-block,
    .romarc-modern .php-email-form .sent-message.d-block {
        display: block !important;
    }

@keyframes rm-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Sticky Bottom Footer Layout (Prevents gap below footer on short pages)
   ========================================================================== */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main#main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

    main#main > .romarc-modern {
        flex: 1 0 auto;
    }

footer#sticky-footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* ==========================================================================
   Parcel Quote Form Mobile Layout Fix (#parcel-quote-wrapper)
   ========================================================================== */
@media (max-width: 575.98px) {
    #parcel-quote-wrapper .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }

    #parcel-quote-wrapper .input-group {
        flex-wrap: nowrap;
        width: 100%;
    }

        #parcel-quote-wrapper .input-group > .form-control {
            min-width: 0;
            flex: 1 1 auto;
        }

        #parcel-quote-wrapper .input-group > .form-select,
        #parcel-quote-wrapper .input-group > select {
            flex: 0 0 88px;
            max-width: 88px;
        }
}

/* Responsive Hero Photo Heights */
.romarc-modern .hero-main-photo {
    height: 360px;
}

.romarc-modern .hero-thumb-photo {
    height: 96px;
}

@media (max-width: 991.98px) {
    .romarc-modern .hero-main-photo {
        height: 240px;
    }

    .romarc-modern .hero-thumb-photo {
        height: 76px;
    }
}

/* Keep reCAPTCHA badge unobtrusive on small mobile screens */
@media (max-width: 575.98px) {
    .grecaptcha-badge {
        transform: scale(0.78);
        transform-origin: bottom right;
        bottom: 8px !important;
        right: -4px !important;
    }
}