/* ================================================
   Lionex Design Framework
   Layout primitives and reusable components.
   Use with site-base.css.
   ================================================ */

html {
    scroll-behavior: smooth;
}

/* ================================================
   Layout primitives
   ================================================ */

/* Section – vertical spacing between content blocks */
.section {
    margin-top: var(--lionex-space-6);
    margin-bottom: var(--lionex-space-10);
}

.section:first-child {
    margin-top: 0;
}

/* Stack – vertical flex with consistent gap */
.stack {
    display: flex;
    flex-direction: column;
    gap: var(--lionex-space-6);
}

.stack--tight {
    gap: var(--lionex-space-4);
}

.stack--loose {
    gap: var(--lionex-space-12);
}

/* Grid – responsive auto-fit grid */
.grid {
    display: grid;
    gap: var(--lionex-space-6);
}

.grid--auto {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 640px) {
    .grid--2 {
        grid-template-columns: 1fr;
    }
}

/* Split – two-column layout (text + media) */
.split {
    display: flex;
    align-items: stretch;
    gap: var(--lionex-space-6);
    min-height: 200px;
}

.split__content {
    flex: 1;
    min-width: 0;
}

.split__media {
    flex: 0 0 18%;
    max-width: 18%;
}

@media (max-width: 768px) {
    .split {
        flex-direction: column;
        min-height: auto;
    }

    .split__media {
        flex: 1 1 auto;
        max-width: none;
    }
}

/* ================================================
   Card component (base)
   ================================================ */

.card {
    background: var(--lionex-bg);
    border: var(--lionex-border-subtle);
    box-shadow: var(--lionex-shadow-md);
    padding: var(--lionex-space-6) var(--lionex-space-7);
    transition: box-shadow 0.2s ease;
    position: relative;
}

.card:hover {
    box-shadow: var(--lionex-shadow-lg);
}

.card--accent-left {
    border-left: 4px solid var(--lionex-accent);
}

.card--accent-primary {
    border-left: 4px solid var(--lionex-primary);
}

.card__content {
    display: flex;
    gap: var(--lionex-space-6);
    align-items: stretch;
}

.card__body {
    flex: 1;
    min-width: 0;
}

.card__media {
    flex: 0 0 18%;
    max-width: 18%;
}

.card__media img {
    width: 100%;
    height: 100%;
    min-height: 200px;
    object-fit: cover;
    display: block;
    background-color: #e0e0e0;
}

@media (max-width: 768px) {
    .card__content {
        flex-direction: column;
    }

    .card__media {
        flex: 1 1 auto;
        max-width: none;
    }
}

/* ================================================
   Section card (text + image + CTA)
   ================================================ */

.section-card {
    background: var(--lionex-bg);
    border: var(--lionex-border-subtle);
    border-radius: var(--lionex-radius);
    padding: var(--lionex-space-6) var(--lionex-space-7);
    box-shadow: var(--lionex-shadow-md);
    transition: box-shadow var(--lionex-transition);
    position: relative;
    border-left: 4px solid var(--lionex-accent);
}

.section-card:hover {
    box-shadow: var(--lionex-shadow-lg);
}

.section-card--primary {
    border-left-color: var(--lionex-primary);
}

.section-card--primary .section-card__title,
.section-card--primary .section-card__title a {
    color: var(--lionex-primary);
}

.section-card--primary:hover .section-card__link {
    color: var(--lionex-primary);
}

.section-card--gold {
    border-left-color: var(--lionex-accent-gold);
}

.section-card--gold .section-card__title {
    color: #8a7119;
}

.section-card--gold:hover .section-card__link {
    color: var(--lionex-accent-gold);
}

.section-card__content {
    display: flex;
    gap: var(--lionex-space-6);
    align-items: stretch;
    min-height: 200px;
}

.section-card__text {
    flex: 1;
    min-width: 0;
}

.section-card__title {
    margin: 0 0 var(--lionex-space-4) 0;
    font-weight: 600;
    color: var(--lionex-accent);
    line-height: 1.6;
}

.section-card__title a {
    color: inherit;
    text-decoration: none;
}

.section-card__title a:hover {
    text-decoration: underline;
}

.section-card>.section-card__content>.section-card__text>p {
    margin: 0 0 var(--lionex-space-4) 0;
    color: var(--lionex-text-secondary);
    line-height: 1.6;
}

.section-card__link {
    display: inline-block;
    margin-top: var(--lionex-space-4);
    color: var(--lionex-text-light);
    text-decoration: none;
    font-weight: 400;
    transition: color var(--lionex-transition);
    line-height: 1.6;
}

.section-card:hover .section-card__link {
    color: var(--lionex-accent);
}

.section-card__link:hover,
.section-card__link:focus {
    color: var(--lionex-accent);
    text-decoration: underline;
}

.section-card--primary:hover .section-card__link {
    color: var(--lionex-primary);
}

.section-card--gold:hover .section-card__link {
    color: var(--lionex-accent-gold);
}

.section-card__image {
    flex: 0 0 18%;
    max-width: 18%;
    display: block;
    padding-left: var(--lionex-space-3);
    position: relative;
    overflow: visible;
}

.section-card__image img {
    width: 100%;
    height: 100%;
    min-height: 200px;
    max-width: 100%;
    object-fit: cover;
    border-radius: var(--lionex-radius);
    display: block;
    background-color: #e0e0e0;
}

@media (max-width: 768px) {
    .section-card__content {
        flex-direction: column;
        gap: var(--lionex-space-4);
        min-height: auto;
    }

    .section-card__image {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        padding-left: 0;
        padding-top: var(--lionex-space-2);
    }

    .section-card__image img {
        min-height: 150px;
        max-height: 200px;
    }
}

/* ================================================
   Section title
   ================================================ */

.section-title {
    margin: 0 0 var(--lionex-space-5) 0;
    font-weight: 600;
    color: var(--lionex-heading);
    line-height: 1.3;
}

.section-title--underline {
    padding-bottom: var(--lionex-space-3);
    border-bottom: 2px solid var(--lionex-accent);
}

/* ================================================
   Button and link variants
   ================================================ */

.btn {
    display: inline-block;
    padding: var(--lionex-space-2) var(--lionex-space-4);
    font-family: inherit;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--lionex-radius);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn--primary {
    background: var(--lionex-primary);
    color: #fff;
}

.btn--primary:hover {
    background: var(--lionex-primary-dark);
}

.link {
    color: var(--lionex-primary);
    text-decoration: none;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

.link--muted {
    color: var(--lionex-text-light);
}

.link--muted:hover {
    color: var(--lionex-accent);
}

/* ================================================
   Contact block (callout)
   ================================================ */

.callout {
    padding: var(--lionex-space-5);
    background: #eef2f7;
    border: 1px solid rgba(0, 91, 159, 0.12);
    border-left: 4px solid var(--lionex-primary);
}

.callout h3 {
    margin-top: 0;
    margin-bottom: var(--lionex-space-3);
    color: var(--lionex-primary);
}

/* ================================================
   Contact info (grid layout)
   ================================================ */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--lionex-space-3) var(--lionex-space-5);
}

.contact-item {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.contact-label {
    font-weight: 600;
    width: 70px;
    color: var(--lionex-text-secondary);
}

.contact-item a {
    color: var(--lionex-primary);
    text-decoration: none;
}

.contact-item a:hover,
.contact-item a:focus {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-label {
        width: 100%;
        margin-bottom: var(--lionex-space-1);
    }
}

/* ================================================
   CTA overlay button (card / image overlay)
   ================================================ */

.order-button {
    position: absolute;
    bottom: var(--lionex-space-3);
    left: 50%;
    transform: translateX(-50%);
    padding: var(--lionex-space-2) var(--lionex-space-4);
    font-family: inherit;
    font-weight: 600;
    color: var(--lionex-heading);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--lionex-radius);
    cursor: pointer;
    transition: background-color var(--lionex-transition);
    white-space: nowrap;
    z-index: 10;
    max-width: calc(100% - var(--lionex-space-6));
    box-sizing: border-box;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    text-align: center;
}

.order-button:hover,
.order-button:active {
    background: rgba(255, 255, 255, 0.98);
}

.order-button:focus-visible {
    outline: 2px solid rgba(0, 91, 159, 0.5);
    outline-offset: 2px;
}

a.order-button {
    text-decoration: none;
    display: inline-block;
}

/* ================================================
   Feature / benefit item
   ================================================ */

.feature {
    padding: var(--lionex-space-5);
    border: var(--lionex-border-subtle);
    display: flex;
    align-items: flex-start;
    gap: var(--lionex-space-3);
}

.feature__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.feature__title {
    margin: 0 0 var(--lionex-space-2) 0;
    color: var(--lionex-primary);
}

.feature__desc {
    margin: 0;
    color: var(--lionex-text-secondary);
}

/* ================================================
   Form primitives
   ================================================ */

.form {
    display: flex;
    flex-direction: column;
    gap: var(--lionex-space-5);
}

.form__title,
.form h4 {
    margin: 0 0 var(--lionex-space-2) 0;
    font-weight: 600;
    color: var(--lionex-primary);
}

.form label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--lionex-space-1);
    color: var(--lionex-text-secondary);
}

.form input,
.form textarea,
.form select {
    width: 100%;
    padding: var(--lionex-space-3) var(--lionex-space-3);
    font-family: inherit;
    color: var(--lionex-text);
    background: var(--lionex-bg);
    border: var(--lionex-input-border);
    border-radius: var(--lionex-radius);
    box-shadow: var(--lionex-shadow-sm);
    box-sizing: border-box;
    transition: border-color var(--lionex-transition), box-shadow var(--lionex-transition);
}

.form input::placeholder,
.form textarea::placeholder {
    color: var(--lionex-text-light);
}

.form input:focus,
.form textarea:focus,
.form select:focus {
    border-color: var(--lionex-primary);
    outline: 2px solid rgba(0, 91, 159, 0.2);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(0, 91, 159, 0.1);
}

.form__submit {
    padding: var(--lionex-space-3) var(--lionex-space-6);
    font-family: inherit;
    font-weight: 600;
    color: #fff;
    background: var(--lionex-primary);
    border: none;
    border-radius: var(--lionex-radius);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 91, 159, 0.3);
    transition: background-color var(--lionex-transition), box-shadow var(--lionex-transition);
}

.form__submit:hover {
    background: var(--lionex-primary-dark);
    box-shadow: 0 4px 12px rgba(0, 91, 159, 0.4);
}

.form__submit:focus-visible {
    outline: 2px solid rgba(0, 91, 159, 0.5);
    outline-offset: 2px;
}

.form__submit:active {
    box-shadow: 0 2px 4px rgba(0, 91, 159, 0.3);
}

/* ================================================
   Tabs (CSS-Only Radio Pattern)
   ================================================ */

.tabs-container {
    display: flex;
    flex-wrap: wrap;
    column-gap: 4px;
    /* Space between buttons */
    row-gap: 0;
    /* No space between buttons and content */
    margin-top: 30px;
    /* Legacy margin-top */
    margin-bottom: 0px;
    /* Aligns with content */
}

.tab-input {
    display: none;
}

.tab-label {
    padding: 10px 20px;
    font-family: inherit;
    font-weight: bold;
    color: #555;
    background: #f0f0f0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    /* Legacy border */
    border-bottom: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
    /* Legacy shadow */
}

.tab-label:hover {
    background: #e8e8e8;
}

/* Selected Tab Style */
.tab-input:checked+.tab-label {
    background: var(--lionex-primary);
    color: #fff;
    border-color: var(--lionex-primary);
    box-shadow: 0 -3px 6px rgba(0, 91, 159, 0.2);
    /* Legacy active shadow */
    border-bottom: none;
}

/* Tab Content */
.tab-content {
    display: none;
    order: 999;
    /* Force content to bottom */
    width: 100%;
    /* Full width */
    padding: var(--lionex-space-6);
    background: var(--lionex-bg);
    border: var(--lionex-border-subtle);
    border-top: none;
    box-shadow: var(--lionex-shadow-md);
}

/* Prevent jumping when switching tabs due to different first-child margins */
.tab-content > :first-child {
    margin-top: 0 !important;
}


@media (max-width: 768px) {
    .tab-label {
        padding: var(--lionex-space-2) var(--lionex-space-4);
        white-space: nowrap;
        flex: 1;
        text-align: center;
    }
}

/* ================================================
   Spec / key-value list
   ================================================ */

.spec-list {
    display: grid;
    gap: var(--lionex-space-2) var(--lionex-space-4);
}

.spec-list--2col {
    grid-template-columns: auto 1fr;
}

.spec-term {
    font-weight: 600;
    color: var(--lionex-text-secondary);
}

.spec-value {
    color: var(--lionex-text);
}

/* ================================================
   Accessibility
   ================================================ */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
