/* ===================================================
   PHALANX FLOORING — built from the Spartan Windows stylesheet
   Same navy & gold, same layout. Flooring-only pieces are at the bottom.
   =================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
}

:root {
    --phalanx-blue: #003da7;
    --phalanx-blue-dark: #002566;
    --phalanx-gold: #F5B800;
    --phalanx-gold-hover: #D9A300;
    --phalanx-dark: #1A1A1A;
    --phalanx-light: #F4F6F9;
    --phalanx-border: #e2e8f0;
    --phalanx-wood: #a8774c;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--phalanx-dark);
    background-color: var(--phalanx-light);
    overflow-x: hidden;
}

/* ===================================================
   HEADER & NAVIGATION
   =================================================== */
header {
    background-color: var(--phalanx-blue);
    border-bottom: 4px solid var(--phalanx-gold);
    padding: 18px 10px;
    width: 100%;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    width: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.header-logo {
    height: 60px;
    width: auto;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

#headerTitle {
    color: #ffffff;
    font-size: 2.1rem;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.header-tagline {
    font-size: 0.85rem;
    color: #e0e8f5;
    font-weight: normal;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.98rem;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--phalanx-gold);
}

.main-nav .nav-cta {
    background-color: var(--phalanx-gold);
    color: var(--phalanx-dark);
    padding: 8px 16px;
    border-radius: 4px;
}

.main-nav .nav-cta:hover,
.main-nav .nav-cta.active {
    background-color: var(--phalanx-gold-hover);
    color: var(--phalanx-dark);
}

/* ===================================================
   MAIN LAYOUT & UTILITY CLASSES
   =================================================== */
main {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
}

main > * {
    flex: 1 1 100%;
    min-width: 0;
}

.text-center {
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--phalanx-gold);
    color: var(--phalanx-dark);
    font-weight: bold;
    font-size: 1rem;
    font-family: inherit;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn:hover {
    background-color: var(--phalanx-gold-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--phalanx-light);
    color: var(--phalanx-blue);
    border: 1px solid var(--phalanx-blue);
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    color: var(--phalanx-blue-dark);
}

.btn-ghost {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.7);
    padding: 10px 22px;
}

.btn-ghost:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

/* White content card used for most sections (same look as Spartan's sections) */
.panel {
    background-color: #ffffff;
    padding: 40px 30px;
    border-radius: 8px;
    border-top: 5px solid var(--phalanx-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.panel.narrow {
    max-width: 760px;
    margin: 0 auto;
}

.panel h3 {
    color: var(--phalanx-blue);
    font-size: 1.35rem;
    margin: 22px 0 10px;
}

.panel h3:first-child {
    margin-top: 0;
}

.panel p {
    color: #444;
    margin-bottom: 12px;
}

.panel ul.plain {
    padding-left: 22px;
    color: #444;
    margin-bottom: 12px;
}

.panel ul.plain li {
    margin-bottom: 6px;
}

.direct-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

.direct-header h2 {
    color: var(--phalanx-blue);
    font-size: 2.1rem;
    line-height: 1.2;
    margin-bottom: 12px;
}

.direct-header p {
    color: #555555;
    font-size: 1.05rem;
}

/* ===================================================
   HERO SECTIONS (with a faint plank pattern over the navy)
   =================================================== */
#hero,
.hero-section {
    background:
        url("img/plank-lines.svg") center / 600px auto repeat,
        linear-gradient(135deg, var(--phalanx-blue) 0%, var(--phalanx-blue-dark) 100%);
    color: #ffffff;
    padding: 50px 30px;
    border-radius: 8px;
    border-bottom: 5px solid var(--phalanx-gold);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 1050px;
    margin: 0 auto;
}

.hero-image-wrapper {
    flex: 0 0 280px;
    text-align: center;
}

.owner-photo {
    width: 260px;
    height: 346px;
    object-fit: cover;
    border-radius: 8px;
    border: 4px solid var(--phalanx-gold);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.photo-caption {
    display: block;
    margin-top: 10px;
    font-weight: bold;
    color: var(--phalanx-gold);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.hero-content {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.hero-kicker {
    display: inline-block;
    color: var(--phalanx-gold);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.hero-content h1,
.hero-content h2,
.hero-section h1 {
    color: #ffffff;
    font-size: 2.3rem;
    line-height: 1.2;
    margin-bottom: 15px;
    font-weight: 800;
}

.hero-content p,
.hero-section p {
    font-size: 1.1rem;
    color: #e0e8f5;
    margin-bottom: 25px;
    line-height: 1.5;
}

.hero-section p {
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.hero-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.hero-badges span {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: bold;
    color: var(--phalanx-gold);
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-section .hero-buttons {
    justify-content: center;
}

/* ===================================================
   PHALANX DIFFERENCE (comparison)
   =================================================== */
.comparison-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 35px;
}

.comp-card {
    flex: 1 1 320px;
    padding: 25px;
    border-radius: 8px;
    min-width: 0;
}

.comp-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
}

.comp-card ul {
    list-style: none;
    padding: 0;
}

.comp-card li {
    margin-bottom: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.traditional-card {
    background-color: #fff5f5;
    border: 1px solid #fecaca;
}

.traditional-card h3 { color: #991b1b; }
.traditional-card li { color: #7f1d1d; }

.phalanx-card {
    background-color: #f0f7ff;
    border: 2px solid var(--phalanx-blue);
}

.phalanx-card h3 { color: var(--phalanx-blue); }
.phalanx-card li { color: #1e3a8a; font-weight: 500; }

.features-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.feature-card {
    flex: 1 1 250px;
    background-color: var(--phalanx-light);
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid var(--phalanx-gold);
    min-width: 0;
}

.feature-card h4 {
    color: var(--phalanx-blue);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.feature-card p {
    color: #444444;
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0;
}

.direct-cta {
    text-align: center;
}

/* ===================================================
   CREDENTIALS / TRUST STRIP
   =================================================== */
.credentials-section {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.credentials-title {
    color: var(--phalanx-blue);
    font-size: 1.4rem;
    margin-bottom: 18px;
}

.credentials-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.cred-card {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 1 320px;
    background-color: #ffffff;
    border: 1px solid var(--phalanx-border);
    border-left: 4px solid var(--phalanx-gold);
    border-radius: 8px;
    padding: 14px 18px;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cred-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    fill: var(--phalanx-blue);
}

.cred-card strong {
    display: block;
    color: var(--phalanx-dark);
    font-size: 0.98rem;
}

.cred-card span {
    display: block;
    color: #555;
    font-size: 0.85rem;
    line-height: 1.35;
}

/* ===================================================
   PROCESS PAGE
   =================================================== */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

.process-step {
    display: flex;
    gap: 25px;
    background: var(--phalanx-light);
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--phalanx-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    align-items: flex-start;
}

.step-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--phalanx-gold);
    background: var(--phalanx-blue);
    padding: 10px 20px;
    border-radius: 6px;
    line-height: 1;
}

.step-content {
    flex: 1;
    min-width: 0;
}

.step-content h3 {
    color: var(--phalanx-blue);
    font-size: 1.4rem;
    margin: 0 0 12px;
}

.step-content ul {
    padding-left: 20px;
    margin: 0;
}

.step-content li {
    margin-bottom: 8px;
    color: #444444;
    line-height: 1.6;
}

.cta-banner {
    background:
        url("img/plank-lines.svg") center / 600px auto repeat,
        linear-gradient(135deg, var(--phalanx-blue) 0%, var(--phalanx-blue-dark) 100%);
    color: #ffffff;
    padding: 50px 20px;
    border-radius: 8px;
    border-bottom: 5px solid var(--phalanx-gold);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    text-align: center;
}

.cta-banner h2 {
    color: #ffffff;
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 15px;
}

.cta-banner p {
    color: #e0e8f5;
    font-size: 1.1rem;
    margin: 0 auto 25px;
    max-width: 700px;
}

.cta-banner .hero-buttons {
    justify-content: center;
}

/* ===================================================
   FLOOR STYLES SLIDER & MODAL (same build as Spartan's work slider)
   =================================================== */
.work-preview-header {
    text-align: center;
    margin-bottom: 25px;
}

.work-preview-header h2 {
    color: var(--phalanx-blue);
    font-size: 2rem;
    margin-bottom: 8px;
}

.work-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.work-slider-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 10px 5px;
    width: 100%;
}

.work-slider-track::-webkit-scrollbar {
    display: none;
}

.work-card {
    flex: 0 0 calc(33.333% - 14px);
    background: var(--phalanx-light);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--phalanx-border);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: left;
    font-family: inherit;
    padding: 0;
}

.work-card:hover,
.work-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 61, 167, 0.15);
    border-color: var(--phalanx-blue);
}

.work-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.work-card-info {
    display: block;
    padding: 12px 15px;
}

.card-title {
    display: block;
    color: var(--phalanx-blue);
    font-size: 1.1rem;
}

.card-sub {
    display: block;
    color: #555;
    font-size: 0.9rem;
}

.slider-btn {
    background-color: var(--phalanx-blue);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.slider-btn:hover {
    background-color: var(--phalanx-blue-dark);
}

.prev-btn { margin-right: 10px; }
.next-btn { margin-left: 10px; }

.work-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.work-modal-overlay.open {
    display: flex;
}

.work-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 900px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalPop 0.3s ease;
}

@keyframes modalPop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--phalanx-dark);
    cursor: pointer;
    z-index: 10;
}

.modal-grid {
    display: flex;
    flex-wrap: wrap;
}

.modal-image-box {
    flex: 1 1 50%;
    background: #000;
    min-width: 0;
}

.modal-image-box img {
    width: 100%;
    height: 100%;
    min-height: 300px;
    max-height: 450px;
    object-fit: cover;
    display: block;
}

.modal-text-box {
    flex: 1 1 50%;
    padding: 35px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.modal-text-box h3 {
    color: var(--phalanx-blue);
    font-size: 1.6rem;
    margin-bottom: 15px;
}

.modal-text-box p {
    color: #444;
    line-height: 1.6;
    margin-bottom: 25px;
}

.modal-cta-buttons {
    display: flex;
    gap: 12px;
}

.modal-cta-buttons .btn {
    flex: 1;
    text-align: center;
    padding: 10px 15px;
    font-size: 0.95rem;
}

/* ===================================================
   QUOTE FORM (same look as Spartan's estimator box)
   =================================================== */
.calculator-section {
    background-color: #ffffff;
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    max-width: 680px;
    margin: 0 auto;
    border-top: 5px solid var(--phalanx-blue);
}

.calculator-section h2 {
    color: var(--phalanx-blue);
    font-size: 1.9rem;
    line-height: 1.2;
    margin-bottom: 8px;
}

.calc-subtitle {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 25px;
}

.form-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1 1 200px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label,
.field-label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--phalanx-blue);
    box-shadow: 0 0 5px rgba(0, 61, 167, 0.3);
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-group label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--phalanx-border);
    border-radius: 20px;
    background: var(--phalanx-light);
    font-weight: normal;
    font-size: 0.92rem;
    cursor: pointer;
    margin: 0;
}

.chip-group input {
    width: auto;
    accent-color: var(--phalanx-blue);
}

.chip-group label:has(input:checked) {
    border-color: var(--phalanx-blue);
    background: #e8f0fe;
    color: var(--phalanx-blue-dark);
    font-weight: bold;
}

.form-privacy-note {
    margin-bottom: 15px;
    color: #666;
    font-size: 0.85rem;
    text-align: center;
}

.btn-submit {
    width: 100%;
    background-color: var(--phalanx-blue);
    color: #ffffff;
    font-size: 1.1rem;
    padding: 13px 24px;
    font-weight: bold;
    font-family: inherit;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-submit:hover {
    background-color: var(--phalanx-blue-dark);
}

.calc-text-alt {
    text-align: center;
    margin-top: 14px;
    font-size: 0.95rem;
    color: #444;
}

.calc-text-alt a {
    color: var(--phalanx-blue);
    font-weight: bold;
}

/* ===================================================
   FAQ (click to open)
   =================================================== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.faq-list details {
    background: var(--phalanx-light);
    border: 1px solid var(--phalanx-border);
    border-left: 4px solid var(--phalanx-gold);
    border-radius: 6px;
    padding: 0 18px;
}

.faq-list summary {
    cursor: pointer;
    color: var(--phalanx-blue);
    font-weight: bold;
    font-size: 1.05rem;
    padding: 14px 24px 14px 0;
    list-style: none;
    position: relative;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 10px;
    font-size: 1.4rem;
    color: var(--phalanx-blue);
}

.faq-list details[open] summary::after {
    content: "\2212";
}

.faq-list details p {
    color: #444;
    font-size: 0.97rem;
    padding-bottom: 14px;
}

/* ===================================================
   FOOTER
   =================================================== */
footer {
    background-color: var(--phalanx-dark);
    color: #ffffff;
    text-align: center;
    padding: 36px 20px 24px;
    margin-top: 40px;
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px 40px;
    max-width: 1100px;
    margin: 0 auto 28px auto;
    text-align: left;
}

.footer-col {
    flex: 1 1 220px;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #cfd6e0;
}

.footer-col ul {
    list-style: none;
}

.footer-heading {
    color: var(--phalanx-gold);
    font-weight: bold;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.footer-col address {
    font-style: normal;
}

.footer-col a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-col a:hover,
.footer-col a:focus-visible {
    color: var(--phalanx-gold);
}

.footer-logo {
    width: 180px;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

.footer-copy {
    font-size: 0.85rem;
    color: #9aa3ae;
}

.social-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 12px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.social-links svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ===================================================
   CONTACT BAR (TOP OF EVERY PAGE, DESKTOP)
   =================================================== */
.contact-bar {
    background-color: var(--phalanx-blue-dark);
    color: #e0e8f5;
    font-size: 0.88rem;
    padding: 6px 10px;
}

.contact-bar-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 4px 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

.contact-bar a {
    color: var(--phalanx-gold);
    font-weight: bold;
    text-decoration: none;
}

.contact-bar a:hover {
    text-decoration: underline;
}

/* ===================================================
   MOBILE QUICK-CONTACT BAR (PHONES ONLY)
   =================================================== */
.mobile-action-bar {
    display: none;
}

/* ===================================================
   FLOORING PIECES (new for Phalanx)
   =================================================== */

/* Links inside content cards */
.panel a:not(.btn),
.calculator-section a:not(.btn) {
    color: var(--phalanx-blue);
    font-weight: bold;
}

/* Little gold section label above headings */
.eyebrow {
    display: block;
    color: var(--phalanx-wood);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.8rem;
    margin-bottom: 6px;
}

/* Callout box (same as Spartan's "Custom-Sized Orders Only" note) */
.callout {
    background: #f8f9fa;
    border-left: 4px solid var(--phalanx-blue);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.callout h4 {
    color: var(--phalanx-blue);
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.callout p {
    margin: 0;
    font-size: 0.95rem;
}

.callout.gold {
    border-left-color: var(--phalanx-gold);
    background: #fffbea;
}

/* Name story: helmet + text */
.story {
    display: flex;
    gap: 35px;
    align-items: center;
}

.story-art {
    flex: 0 0 230px;
    background: var(--phalanx-blue-dark);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    border-bottom: 5px solid var(--phalanx-gold);
}

.story-art img {
    width: 110px;
    height: auto;
}

.story-art span {
    display: block;
    color: var(--phalanx-gold);
    font-weight: bold;
    letter-spacing: 2px;
    margin-top: 12px;
    font-size: 0.85rem;
}

.story-text h2 {
    color: var(--phalanx-blue);
    font-size: 1.9rem;
    line-height: 1.2;
    margin-bottom: 12px;
}

.story-text p {
    color: #444;
    margin-bottom: 12px;
}

/* Split teaser blocks on the home page */
.split {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.split > * {
    flex: 1 1 340px;
    min-width: 0;
}

.teaser {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.teaser-img {
    height: 150px;
    background-size: cover;
    background-position: center;
    border-bottom: 4px solid var(--phalanx-gold);
}

.teaser-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.teaser-body h3 {
    color: var(--phalanx-blue);
    font-size: 1.4rem;
    line-height: 1.25;
}

.teaser-body p {
    color: #444;
    flex: 1;
}

.teaser-body .btn {
    align-self: flex-start;
}

/* Floor type cards (floors page) */
.floor-type {
    display: flex;
    gap: 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    scroll-margin-top: 20px;
}

.floor-type-img {
    flex: 0 0 300px;
    background-size: cover;
    background-position: center;
    min-height: 260px;
    border-right: 5px solid var(--phalanx-gold);
}

.floor-type-body {
    flex: 1;
    padding: 30px;
    min-width: 0;
}

.floor-type-body h2 {
    color: var(--phalanx-blue);
    font-size: 1.7rem;
    line-height: 1.2;
    margin-bottom: 8px;
}

.floor-type-body > p {
    color: #444;
    margin-bottom: 14px;
}

.pros-cons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.pros-cons > div {
    flex: 1 1 220px;
}

.pros-cons h4 {
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.pros-cons ul {
    list-style: none;
    font-size: 0.93rem;
    color: #444;
}

.pros-cons li {
    margin-bottom: 4px;
    padding-left: 20px;
    position: relative;
}

.pros li::before {
    content: "\2713";
    color: #15803d;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.cons li::before {
    content: "\2013";
    color: #991b1b;
    font-weight: bold;
    position: absolute;
    left: 2px;
}

.pros h4 { color: #15803d; }
.cons h4 { color: #991b1b; }

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: #e8f0fe;
    color: var(--phalanx-blue-dark);
    border-radius: 14px;
    padding: 4px 12px;
    font-size: 0.82rem;
    font-weight: bold;
}

.tag.gold {
    background: #fff4cc;
    color: #7a5a00;
}

/* Jump links at the top of long pages */
.jump-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.jump-nav a {
    background: #ffffff;
    border: 1px solid var(--phalanx-border);
    color: var(--phalanx-blue);
    font-weight: bold;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.jump-nav a:hover {
    border-color: var(--phalanx-blue);
}

/* Comparison table */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--phalanx-border);
    border-radius: 8px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 940px;
    font-size: 0.93rem;
}

.compare-table th,
.compare-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--phalanx-border);
    vertical-align: top;
}

.compare-table thead th {
    background: var(--phalanx-blue);
    color: #fff;
    position: sticky;
    top: 0;
}

.compare-table tbody th {
    color: var(--phalanx-blue);
    background: #f8fafc;
    white-space: nowrap;
}

.compare-table tbody tr:nth-child(even) td {
    background: #fbfcfe;
}

.swipe-hint {
    display: none;
    text-align: right;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 6px;
}

.dots {
    color: var(--phalanx-gold-hover);
    letter-spacing: 2px;
    font-size: 1.05rem;
    white-space: nowrap;
}

.dots .off {
    color: #d5dbe3;
}

/* Floor Finder quiz */
.quiz {
    max-width: 820px;
    margin: 0 auto;
}

.quiz-progress {
    height: 8px;
    background: var(--phalanx-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.quiz-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--phalanx-gold);
    transition: width 0.3s ease;
}

.quiz-step {
    display: none;
}

.quiz-step.active {
    display: block;
    animation: modalPop 0.25s ease;
}

.quiz-step h3 {
    color: var(--phalanx-blue);
    font-size: 1.35rem;
    margin-bottom: 14px;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.quiz-option {
    text-align: left;
    background: var(--phalanx-light);
    border: 2px solid var(--phalanx-border);
    border-radius: 8px;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.quiz-option strong {
    display: block;
    color: var(--phalanx-dark);
}

.quiz-option span {
    color: #555;
    font-size: 0.88rem;
}

.quiz-option:hover,
.quiz-option:focus-visible {
    border-color: var(--phalanx-blue);
    background: #f0f7ff;
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
}

.quiz-back {
    background: none;
    border: none;
    color: var(--phalanx-blue);
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
}

.quiz-result {
    display: none;
}

.quiz-result.active {
    display: block;
    animation: modalPop 0.3s ease;
}

.result-card {
    display: flex;
    border: 2px solid var(--phalanx-blue);
    border-radius: 8px;
    overflow: hidden;
    background: #f0f7ff;
    margin-bottom: 16px;
}

.result-img {
    flex: 0 0 200px;
    background-size: cover;
    background-position: center;
    min-height: 180px;
}

.result-body {
    padding: 22px;
    flex: 1;
    min-width: 0;
}

.result-body .eyebrow {
    color: var(--phalanx-blue);
}

.panel .result-body h3 {
    color: var(--phalanx-blue-dark);
    font-size: 1.6rem;
    margin: 2px 0 8px;
}

.result-body ul {
    padding-left: 20px;
    color: #333;
    margin-bottom: 10px;
}

.runner-up {
    color: #444;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

/* Tools: room measurer & quote checker */
.tool {
    max-width: 900px;
    margin: 0 auto;
}

.room-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 0.9fr auto;
    gap: 10px;
    align-items: end;
    background: var(--phalanx-light);
    border: 1px solid var(--phalanx-border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.room-row label {
    display: block;
    font-size: 0.8rem;
    font-weight: bold;
    color: #555;
    margin-bottom: 4px;
}

.room-row input,
.room-row select {
    width: 100%;
    padding: 9px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.98rem;
    font-family: inherit;
    background: #fff;
}

.dim-pair {
    display: flex;
    gap: 6px;
}

.dim-pair input {
    min-width: 0;
}

.room-area {
    font-weight: bold;
    color: var(--phalanx-blue);
    padding: 9px 0;
    white-space: nowrap;
}

.room-remove {
    background: none;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 4px;
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
    cursor: pointer;
}

.tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 14px 0 22px;
}

.totals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.total-box {
    text-align: center;
    background: var(--phalanx-light);
    border: 2px solid var(--phalanx-blue);
    border-radius: 8px;
    padding: 16px;
}

.total-box.gold {
    border-color: var(--phalanx-gold);
    background: #fffbea;
}

.total-box .big {
    display: block;
    font-size: 2.1rem;
    font-weight: bold;
    color: var(--phalanx-blue);
    line-height: 1.1;
}

.total-box small {
    color: #555;
    font-size: 0.85rem;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 8px 16px;
    margin-bottom: 16px;
}

.check-grid label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--phalanx-light);
    border: 1px solid var(--phalanx-border);
    border-radius: 6px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.95rem;
}

.check-grid input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--phalanx-blue);
    flex-shrink: 0;
}

.check-grid label:has(input:checked) {
    border-color: var(--phalanx-blue);
    background: #f0f7ff;
}

.checker-output {
    border: 2px solid var(--phalanx-blue);
    border-radius: 8px;
    padding: 22px;
    background: #f0f7ff;
    margin-top: 10px;
}

.checker-output h3 {
    margin-top: 0;
}

.checker-output ul {
    padding-left: 20px;
    color: #333;
    margin-bottom: 10px;
}

.checker-output li {
    margin-bottom: 4px;
}

/* Before & after drag slider */
.ba-slider {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    border: 4px solid var(--phalanx-gold);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    user-select: none;
    background: #ddd;
}

.ba-slider img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.ba-after {
    clip-path: inset(0 0 0 50%);
}

.ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    margin-left: -2px;
    background: #fff;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.ba-handle::after {
    content: "\25C0 \25B6";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--phalanx-blue);
    color: #fff;
    border: 3px solid #fff;
    border-radius: 24px;
    padding: 6px 10px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.ba-label {
    position: absolute;
    top: 12px;
    background: rgba(0, 37, 102, 0.85);
    color: #fff;
    font-weight: bold;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 4px;
    pointer-events: none;
}

.ba-label.before { left: 12px; }
.ba-label.after { right: 12px; background: var(--phalanx-gold); color: var(--phalanx-dark); }

.ba-range {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    margin: 0;
}

.ba-caption {
    text-align: center;
    color: #666;
    font-size: 0.88rem;
    margin-top: 10px;
}

/* Photo gallery (ready for real job photos) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.gallery-slot {
    border: 2px dashed #b9c4d4;
    border-radius: 8px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #6b7686;
    padding: 20px;
    background: #fbfcfe;
}

.gallery-slot svg {
    width: 44px;
    height: 44px;
    fill: #b9c4d4;
    margin-bottom: 10px;
}

/* Glossary */
.glossary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px 24px;
}

.glossary div {
    border-bottom: 1px solid var(--phalanx-border);
    padding: 10px 0;
}

.glossary dt {
    font-weight: bold;
    color: var(--phalanx-blue);
}

.glossary dd {
    color: #444;
    font-size: 0.95rem;
}

/* Care tips grid */
.care-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.care-card {
    background: var(--phalanx-light);
    border-radius: 8px;
    border-top: 4px solid var(--phalanx-gold);
    padding: 18px;
}

.care-card h4 {
    color: var(--phalanx-blue);
    margin-bottom: 8px;
}

.care-card ul {
    padding-left: 18px;
    color: #444;
    font-size: 0.93rem;
}

.care-card li {
    margin-bottom: 4px;
}

/* Sample contract (same style as Spartan's) */
.contract-box {
    background: #fdfdfd;
    border: 1px solid #e0e0e0;
    padding: 25px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.6;
}

.contract-box .contract-title {
    font-weight: bold;
    font-size: 1.05rem;
    color: var(--phalanx-blue);
    margin-bottom: 15px;
}

.contract-box ul {
    margin: 0 0 15px 20px;
}

.contract-box p {
    color: #333;
}

/* Service area list */
.city-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.city-list li {
    background: var(--phalanx-light);
    border: 1px solid var(--phalanx-border);
    border-radius: 20px;
    padding: 6px 14px;
    font-weight: bold;
    color: var(--phalanx-blue-dark);
    font-size: 0.92rem;
}

/* Numbered "what's on every quote" list */
.included-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    counter-reset: inc;
}

.included-grid div {
    background: var(--phalanx-light);
    border-radius: 8px;
    padding: 16px 16px 16px 56px;
    position: relative;
    counter-increment: inc;
}

.included-grid div::before {
    content: counter(inc);
    position: absolute;
    left: 14px;
    top: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--phalanx-blue);
    color: var(--phalanx-gold);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.included-grid strong {
    display: block;
    color: var(--phalanx-blue);
}

.included-grid span {
    color: #444;
    font-size: 0.92rem;
}

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--phalanx-gold);
    outline-offset: 2px;
}

/* ===================================================
   MOBILE
   =================================================== */
@media (max-width: 1100px) {
    .header-container {
        flex-direction: column;
        gap: 14px;
    }

    .main-nav ul {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .contact-bar {
        display: none;
    }

    .mobile-action-bar {
        display: flex;
        gap: 8px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        background-color: var(--phalanx-blue-dark);
        border-top: 3px solid var(--phalanx-gold);
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    }

    .mobile-action-bar a {
        flex: 1;
        text-align: center;
        padding: 11px 6px;
        border: 1px solid rgba(255, 255, 255, 0.35);
        border-radius: 4px;
        color: #ffffff;
        font-weight: bold;
        text-decoration: none;
    }

    .mobile-action-bar .mobile-action-primary {
        background-color: var(--phalanx-gold);
        border-color: var(--phalanx-gold);
        color: var(--phalanx-dark);
    }

    body {
        padding-bottom: 72px;
    }

    main {
        padding: 0 10px;
        margin: 20px auto;
        gap: 20px;
    }

    .header-container {
        text-align: center;
    }

    .brand {
        flex-direction: column;
        gap: 8px;
    }

    .header-logo {
        height: 50px;
    }

    #headerTitle {
        font-size: 1.5rem;
    }

    .main-nav ul {
        gap: 10px 14px;
    }

    .main-nav a {
        font-size: 0.92rem;
    }

    #hero,
    .hero-section {
        padding: 35px 15px;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }

    .hero-image-wrapper {
        flex: none;
    }

    .hero-content {
        text-align: center;
    }

    .hero-content h1,
    .hero-content h2,
    .hero-section h1 {
        font-size: 1.75rem;
    }

    .hero-content p,
    .hero-section p {
        font-size: 1rem;
    }

    .hero-badges {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .owner-photo {
        width: 220px;
        height: 293px;
    }

    .panel {
        padding: 30px 15px;
    }

    .direct-header h2 {
        font-size: 1.7rem;
    }

    .comp-card {
        flex: 1 1 100%;
        padding: 20px 15px;
    }

    .feature-card,
    .cred-card {
        flex: 1 1 100%;
    }

    .work-card {
        flex: 0 0 100%;
    }

    .modal-grid {
        flex-direction: column;
    }

    .modal-image-box img {
        min-height: 0;
        max-height: 220px;
    }

    .modal-text-box {
        padding: 25px 20px;
    }

    .modal-cta-buttons {
        flex-direction: column;
    }

    .process-step {
        flex-direction: column;
        gap: 15px;
        padding: 20px 15px;
    }

    .step-number {
        font-size: 1.8rem;
        padding: 8px 16px;
    }

    .calculator-section {
        padding: 22px 15px;
    }

    .footer-grid {
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto 10px;
    }

    .story {
        flex-direction: column;
        text-align: center;
    }

    .story-art {
        flex: none;
        width: 100%;
    }

    .floor-type {
        flex-direction: column;
    }

    .floor-type-img {
        flex: none;
        min-height: 170px;
        border-right: none;
        border-bottom: 5px solid var(--phalanx-gold);
    }

    .floor-type-body {
        padding: 22px 16px;
    }

    .result-card {
        flex-direction: column;
    }

    .result-img {
        flex: none;
        min-height: 130px;
    }

    .room-row {
        grid-template-columns: 1fr 1fr;
    }

    .room-row .room-name {
        grid-column: 1 / -1;
    }

    .cta-banner h2 {
        font-size: 1.6rem;
    }

    .ba-slider {
        aspect-ratio: 4 / 3;
    }

    .swipe-hint {
        display: block;
    }
}
