/* ============================================================
   histo-co-joomla-custom.css
   Histologics Corporate Joomla custom CSS.

   - Derived from _onepage/style.css.
   - Loads AFTER theme.13.css (Joomla/YOOtheme baseline).
   - All rules are scoped under .histo-co-home so this file
     cannot affect other Joomla pages.
   - Exactly one intentional global rule: `html { scroll-behavior: smooth }`
     (theme.13.css does not provide it; required for #anchor jumps to
     animate). Delete that single line if site-wide smooth scroll is
     unwanted.
   - Background image paths are prefixed `images/backgrounds/...`
     (relative). If the CSS is loaded from a path where this won't
     resolve to the site-root, change to absolute `/images/backgrounds/...`.
     See README for details.
   ============================================================ */

/* ============================================================
   GLOBAL — single intentional un-scoped rule
   ============================================================ */
html { scroll-behavior: smooth; }

/* ============================================================
   SCOPED ELEMENT RESETS
   Targeted equivalent of the dropped global `* { margin:0 }` reset.
   Neutralizes theme.13.css element-level defaults (p/h*/button) that
   would otherwise leak unwanted vertical spacing and button styles
   into our modules. Affects ONLY .histo-co-home descendants.
   ============================================================ */
.histo-co-home p,
.histo-co-home h1,
.histo-co-home h2,
.histo-co-home h3,
.histo-co-home h4 {
    margin: 0;
}

.histo-co-home button {
    font: inherit;
}

/* ============================================================
   ANCHOR OFFSET
   When a Joomla menu item links to #hero / #about / etc., the
   browser scrolls the matching section to the top of the
   viewport. YOOtheme's fixed header would then cover the top of
   the section. scroll-margin-top pushes the landing point down
   by an estimated header height. Adjust the value if YOOtheme's
   header is taller/shorter on this site.
   ============================================================ */
.histo-co-home[id],
.histo-co-home [id] {
    scroll-margin-top: 90px;
}

/* ============================================================
   DESIGN TOKENS (scoped — not :root)
   ============================================================ */
.histo-co-home {
    /* Corporate Color Palette */
    --primary-blue: #003366;
    --dark-black: #050A10;
    --mid-black: #2B2E33;
    --light-black: #6A7078;

    /* Light Mode Palette */
    --white: #ffffff;
    --off-white: #f8f9fa;
    --light-gray: #e9ecef;
    --border-gray: #dee2e6;

    /* Text Colors */
    --text-dark: #1a1a1a;
    --text-gray: #4a5568;
    --text-light: #718096;
    --text-white: #ffffff;

    /* Semantic Mappings */
    --bg-body: var(--white);
    --bg-section-alt: var(--off-white);
    --bg-card: var(--white);
    --border-color: var(--border-gray);

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 3vh 0;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* ============================================================
   SHARED BUTTONS
   ============================================================ */
.histo-co-home .btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition-normal);
    cursor: pointer;
    border: 2px solid transparent;
}

.histo-co-home .btn-primary {
    background: var(--primary-blue);
    color: var(--text-white);
}

.histo-co-home .btn-primary:hover {
    background: #004488;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.histo-co-home .btn-action {
    background: #0E7490;
    color: var(--text-white);
}

.histo-co-home .btn-action:hover {
    background: #0C647E;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.histo-co-home .btn-media {
    display: inline-block;
    padding: 8px 20px;
    background: #0E7490;
    color: var(--text-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: var(--transition-normal);
    align-self: flex-start;
}

.histo-co-home .btn-media:hover {
    background: #0C647E;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================================
   SHARED SECTION HELPERS
   ============================================================ */
.histo-co-home .section-header {
    margin-bottom: min(30px, 3vh);
    width: 100%;
    text-align: center;
}

.histo-co-home .text-left { text-align: left; }
.histo-co-home .text-right { text-align: right; }
.histo-co-home .text-center { text-align: center; }

.histo-co-home .text-left .section-subtitle,
.histo-co-home .text-right .section-subtitle,
.histo-co-home .text-center .section-subtitle {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.histo-co-home .section-title {
    font-family: var(--font-heading);
    font-size: min(2.4rem, 4.2vh);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: min(6px, 0.8vh);
    text-align: center;
}

.histo-co-home .section-subtitle {
    font-size: min(1.1rem, 2vh);
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

/* Generic full-width section wrapper */
.histo-co-home .section-inner {
    width: 100%;
    padding: 0 35px;
    display: flex;
    flex-direction: column;
}

/* CTA button — pinned to bottom-center of each section on desktop.
   Every section uses position:relative + min-height:100vh.
   section-cta is always a direct child of the section. */
.histo-co-home .section-cta {
    position: absolute;
    bottom: max(9vh, 90px);
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

/* Card scroll animation — opt-in only. The Joomla build does not
   add the .animate-ready class to modules (no JS observer), so
   content renders fully visible by default. Kept here for future
   opt-in. */
.histo-co-home .animate-ready {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.histo-co-home .animate-ready.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   SLIDE 1: HERO
   ============================================================ */
.histo-co-home.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    background: url('/images/backgrounds/histo-company-bg01-1600.webp') repeat fixed center center / cover;
    color: var(--white);
    overflow: hidden;
}

.histo-co-home .hero-kbride {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 400px;
    z-index: 0;
    pointer-events: none;
}

.histo-co-home .hero-kbride img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.histo-co-home .hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 140px 35px 30px;
    gap: 0;
    align-items: center;
}

.histo-co-home .hero-title {
    font-family: var(--font-heading);
    font-size: min(2.3rem, 3.8vh);
    font-weight: 700;
    line-height: 1.15;
    color: var(--dark-black);
    text-shadow: 0 0 8px #fff, 0 0 16px #fff, 0 0 32px #fff, 0 0 50px #fff, 0 0 80px rgba(255,255,255,0.9);
    text-align: center;
    width: 100%;
}

.histo-co-home .hero-subtitle {
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--dark-black);
    text-shadow: 0 0 8px #fff, 0 0 16px #fff, 0 0 32px #fff, 0 0 50px #fff, 0 0 80px rgba(255,255,255,0.9);
    text-align: center;
    max-width: 640px;
    margin: 22px auto 0;
    white-space: nowrap;
}

.histo-co-home .hero-sep {
    padding: 0 28px;
}

/* Hero department buttons */
.histo-co-home .hero-dept-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 80px auto 0;
}

.histo-co-home .hero-dept-btn {
    display: inline-block;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    width: 160px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.histo-co-home .hero-dept-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.histo-co-home .hero-dept-wh  { background: #8E2F6C; }
.histo-co-home .hero-dept-wh:hover  { background: #7a2860; }
.histo-co-home .hero-dept-wc  { background: #4B257C; }
.histo-co-home .hero-dept-wc:hover  { background: #3e1f68; }
.histo-co-home .hero-dept-vet { background: #1B4D2A; }
.histo-co-home .hero-dept-vet:hover { background: #163f22; }

.histo-co-home .hero-cta {
    position: absolute;
    bottom: max(5vh, 45px);
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 3;
}

.histo-co-home .btn-learn-more {
    display: inline-block;
    padding: 12px 30px;
    background-color: #003366;
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.histo-co-home .btn-learn-more:hover {
    background-color: #002244;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   SLIDE 2: ABOUT
   ============================================================ */
.histo-co-home.about-section {
    position: relative;
    padding: var(--section-padding);
    background: url('/images/backgrounds/histo-company-bg02-1600.webp') repeat fixed center center / cover;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.histo-co-home.about-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    z-index: 0;
}

.histo-co-home.about-section > .section-header,
.histo-co-home.about-section > .about-inner {
    position: relative;
    z-index: 1;
}

.histo-co-home .about-inner {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 0 35px 80px;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    align-items: flex-start;
}

.histo-co-home .about-right {
    flex: 0 0 min(640px, 80%);
    display: flex;
    flex-direction: column;
    gap: min(18px, 2vh);
}

.histo-co-home .about-text {
    font-size: 1rem;
    color: var(--text-gray);
    line-height: 1.75;
}

.histo-co-home .about-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.histo-co-home .about-card {
    background: rgba(255, 255, 255, 0.88);
    padding: 18px 22px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-blue);
    box-shadow: var(--shadow-sm);
}

.histo-co-home .about-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.histo-co-home .about-card-text {
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.6;
}

/* ============================================================
   SLIDE 3: KYLON
   ============================================================ */
.histo-co-home.kylon-section {
    position: relative;
    padding: var(--section-padding);
    background: url('/images/backgrounds/histo-company-bg03-1600.webp') repeat fixed center center / cover;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.histo-co-home .kylon-header {
    padding: 0 35px;
    margin-bottom: min(16px, 1.8vh);
    text-align: center;
}

.histo-co-home .kylon-inner {
    display: flex;
    gap: 50px;
    padding: 0 35px 80px;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    align-items: flex-start;
}

.histo-co-home .kylon-left {
    flex: 0 0 58%;
}

.histo-co-home .kylon-right {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10px;
}

.histo-co-home .tech-img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.histo-co-home .kylon-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.histo-co-home .kylon-cards-cta {
    margin-top: 16px;
    display: flex;
    justify-content: flex-start;
}

.histo-co-home .kylon-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 8px;
    padding: 16px 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 51, 102, 0.08);
}

.histo-co-home .kylon-card-label {
    flex: 0 0 68px;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.histo-co-home .kylon-card-text {
    flex: 1;
    font-size: 0.92rem;
    color: var(--text-gray);
    line-height: 1.55;
}

/* ============================================================
   SLIDE 4: MARKETS
   ============================================================ */
.histo-co-home.markets-section {
    position: relative;
    padding: var(--section-padding);
    background: url('/images/backgrounds/histo-company-bg04-1600.webp') repeat fixed center center / cover;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.histo-co-home .markets-inner {
    width: 100%;
    padding: 0 35px;
    display: flex;
    flex-direction: column;
    gap: min(20px, 2.2vh);
}

.histo-co-home .markets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.histo-co-home .markets-grid .markets-card:nth-child(3) {
    grid-column: 1 / 3;
    justify-self: center;
    width: calc(50% - 15px);
}

/* ============================================================
   SLIDE 7: ORDER (shares card styling with Markets)
   ============================================================ */
.histo-co-home.order-section {
    position: relative;
    padding: var(--section-padding);
    background: url('/images/backgrounds/histo-company-bg07-1600.webp') repeat fixed center center / cover;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.histo-co-home .order-inner {
    width: 100%;
    padding: 0 35px;
    display: flex;
    flex-direction: column;
    gap: min(20px, 2.2vh);
}

.histo-co-home .order-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.histo-co-home .order-grid .order-card:nth-child(3) {
    grid-column: 1 / 3;
    justify-self: center;
    width: calc(50% - 15px);
}

.histo-co-home .markets-card,
.histo-co-home .order-card {
    background: var(--bg-card);
    padding: 18px 22px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(0, 51, 102, 0.1);
}

.histo-co-home .markets-card:hover,
.histo-co-home .order-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-blue);
}

.histo-co-home .ind-card-logo {
    width: 130px;
    height: auto;
    margin-bottom: 10px;
}

.histo-co-home .ind-card-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-black);
    margin-bottom: 6px;
}

.histo-co-home .ind-card-tagline {
    font-size: 0.85rem;
    color: var(--light-black);
    font-style: italic;
    margin-bottom: 14px;
    line-height: 1.4;
}

.histo-co-home .ind-btn {
    margin-top: auto;
    width: 100%;
    max-width: 200px;
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* ============================================================
   SLIDE 5 (file order 6 in spec): RESOURCES
   ============================================================ */
.histo-co-home.resources-section {
    position: relative;
    padding: var(--section-padding);
    background: url('/images/backgrounds/histo-company-bg05-1600.webp') repeat fixed center center / cover;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.histo-co-home .resources-inner {
    width: 100%;
    padding: 0 35px;
    display: flex;
    flex-direction: column;
    gap: min(16px, 1.8vh);
}

/* 5 cards: 3 on top row, 2 centered on bottom row using 6-col grid */
.histo-co-home .resources-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.histo-co-home .resources-grid .resource-card:nth-child(1) { grid-column: 1 / 3; }
.histo-co-home .resources-grid .resource-card:nth-child(2) { grid-column: 3 / 5; }
.histo-co-home .resources-grid .resource-card:nth-child(3) { grid-column: 5 / 7; }
.histo-co-home .resources-grid .resource-card:nth-child(4) { grid-column: 2 / 4; }
.histo-co-home .resources-grid .resource-card:nth-child(5) { grid-column: 4 / 6; }

.histo-co-home .resource-market-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: auto;
    padding-top: 8px;
}

.histo-co-home .resource-dept-btn {
    display: inline-block;
    padding: 5px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.histo-co-home .resource-dept-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.histo-co-home .resource-card {
    background: var(--bg-card);
    padding: 22px 20px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.histo-co-home .resource-card .btn,
.histo-co-home .markets-card .btn,
.histo-co-home .order-card .btn {
    font-size: 0.85rem;
    padding: 8px 20px;
    margin-top: auto;
}

.histo-co-home .resource-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.histo-co-home .resource-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.histo-co-home .resource-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.histo-co-home .resource-description {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 12px;
    line-height: 1.55;
}

.histo-co-home .resource-link {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.histo-co-home .resource-link:hover {
    color: var(--primary-blue);
}

/* ============================================================
   SLIDE 6 (file order 5 in spec): MEDIA
   ============================================================ */
.histo-co-home.media-section {
    position: relative;
    padding: var(--section-padding);
    background: url('/images/backgrounds/histo-company-bg06-1600.webp') repeat fixed center center / cover;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.histo-co-home .media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.histo-co-home .media-card {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: row;
}

.histo-co-home .media-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

.histo-co-home .media-image {
    width: 180px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--bg-section-alt);
}

.histo-co-home .media-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.histo-co-home .media-card:hover .media-image img {
    transform: scale(1.05);
}

.histo-co-home .media-content {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.histo-co-home .media-category {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary-blue);
    color: var(--text-white);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.histo-co-home .media-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
}

.histo-co-home .media-excerpt {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.55;
    flex: 1;
}

/* ============================================================
   SLIDE 8: CONTACT / FOOTER
   ============================================================ */
.histo-co-home.footer {
    background: url('/images/backgrounds/histo-company-bg08-1600.webp') repeat fixed center center / cover;
    color: var(--text-gray);
    padding: var(--section-padding);
    border-top: 1px solid var(--border-color);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.histo-co-home .contact-inner {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 40px;
    padding: 0 35px;
    flex: 1;
    min-height: 0;
}

.histo-co-home .contact-left {
    flex: 0 0 65%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 51, 102, 0.08);
    overflow-y: auto;
}

.histo-co-home .contact-form-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
}

.histo-co-home .contact-form {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px 10px;
}

.histo-co-home .form-group {
    grid-column: span 6;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.histo-co-home .form-group.col-half {
    grid-column: span 3;
}

.histo-co-home .form-group.col-third {
    grid-column: span 2;
}

.histo-co-home .form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}

.histo-co-home .form-group input,
.histo-co-home .form-group textarea,
.histo-co-home .form-group select {
    padding: 6px 10px;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: var(--font-primary);
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.9);
    transition: border-color var(--transition-fast);
}

.histo-co-home .form-group input:focus,
.histo-co-home .form-group textarea:focus,
.histo-co-home .form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.histo-co-home .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.histo-co-home .form-submit {
    grid-column: span 6;
    justify-self: start;
    padding: 10px 28px;
    font-size: 0.95rem;
    border: none;
}

.histo-co-home .contact-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: min(14px, 1.6vh);
}

.histo-co-home .contact-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.histo-co-home .contact-card {
    background: rgba(255, 255, 255, 0.88);
    border-radius: 8px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 51, 102, 0.08);
}

.histo-co-home .contact-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.histo-co-home .contact-card-body {
    flex: 1;
    font-size: 0.88rem;
    color: var(--text-gray);
    line-height: 1.65;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.histo-co-home .contact-card-body a {
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition-fast);
}

.histo-co-home .contact-card-body a:hover {
    color: var(--primary-blue);
}

.histo-co-home .contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}

.histo-co-home .contact-social {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
}

.histo-co-home .social-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.histo-co-home .social-link:hover {
    color: var(--primary-blue);
}

/* Footer bottom bar */
.histo-co-home .footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: min(16px, 1.8vh);
    margin-top: min(14px, 1.5vh);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.histo-co-home .footer-nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
}

.histo-co-home .footer-nav-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition-fast);
}

.histo-co-home .footer-nav-links a:hover {
    color: var(--text-dark);
}

.histo-co-home .footer-nav-links .separator {
    color: var(--border-color);
}

.histo-co-home .trademarks {
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.6;
    font-style: italic;
}

.histo-co-home .copyright {
    font-size: 0.82rem;
    color: var(--text-light);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 1024px) {
    .histo-co-home .hero-right {
        flex-direction: column;
    }

    .histo-co-home .order-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .histo-co-home .hero-dept-btns {
        flex-direction: column;
        align-items: center;
    }

    .histo-co-home .kylon-inner {
        flex-direction: column;
    }

    .histo-co-home .kylon-left,
    .histo-co-home .kylon-right {
        flex: 0 0 auto;
        width: 100%;
    }

    .histo-co-home .about-right {
        flex: 0 0 auto;
        width: 100%;
    }

    .histo-co-home .contact-inner {
        flex-direction: column;
        width: 100%;
        align-self: auto;
    }

    .histo-co-home .contact-left,
    .histo-co-home .contact-right {
        flex: 0 0 auto;
        width: 100%;
    }

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

    .histo-co-home .resources-grid .resource-card:nth-child(1),
    .histo-co-home .resources-grid .resource-card:nth-child(2),
    .histo-co-home .resources-grid .resource-card:nth-child(3),
    .histo-co-home .resources-grid .resource-card:nth-child(4),
    .histo-co-home .resources-grid .resource-card:nth-child(5) { grid-column: auto; }

    .histo-co-home .media-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .histo-co-home .hero-inner {
        padding-top: 100px;
    }

    .histo-co-home .hero-title {
        font-size: 1.8rem;
        width: 100%;
    }

    .histo-co-home .hero-subtitle {
        font-size: 1rem;
        max-width: 90vw;
        white-space: normal;
    }

    .histo-co-home .hero-sep {
        padding: 0 12px;
    }

    .histo-co-home .hero-dept-btns {
        margin-top: 40px;
    }

    .histo-co-home .hero-dept-btn {
        padding: 10px 28px;
        font-size: 0.9rem;
        min-width: 140px;
    }

    .histo-co-home .section-title {
        font-size: 1.8rem;
    }

    .histo-co-home .hero-right {
        flex-direction: column;
    }

    .histo-co-home .markets-grid,
    .histo-co-home .order-grid {
        grid-template-columns: 1fr;
    }

    .histo-co-home .markets-grid .markets-card:nth-child(3),
    .histo-co-home .order-grid .order-card:nth-child(3) {
        grid-column: auto;
        justify-self: auto;
        width: 100%;
    }

    .histo-co-home .resources-grid {
        grid-template-columns: 1fr;
    }

    .histo-co-home .resources-grid .resource-card:nth-child(n) { grid-column: auto; }

    .histo-co-home .media-grid {
        grid-template-columns: 1fr;
    }

    .histo-co-home .media-card {
        flex-direction: column;
    }

    .histo-co-home .media-image {
        width: 100%;
        height: 160px;
    }

    .histo-co-home .contact-card {
        flex-direction: column;
        gap: 8px;
    }

    .histo-co-home .contact-card-title {
        flex: 0 0 auto;
    }

    .histo-co-home .form-group.col-half,
    .histo-co-home .form-group.col-third {
        grid-column: span 6;
    }

    .histo-co-home .hero-kbride {
        width: clamp(72px, 20vw, 180px);
    }

    /* Mobile: drop fixed height and overflow:hidden so content isn't clipped */
    .histo-co-home.about-section,
    .histo-co-home.kylon-section,
    .histo-co-home.markets-section,
    .histo-co-home.media-section,
    .histo-co-home.resources-section,
    .histo-co-home.order-section,
    .histo-co-home.footer {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
        padding-bottom: 32px;
    }

    /* Mobile: CTA returns to normal flow — no longer absolute */
    .histo-co-home .section-cta {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        margin-top: 24px;
        padding-bottom: 8px;
    }

    /* Remove the CTA-clearance padding from inner wrappers on mobile */
    .histo-co-home .about-inner,
    .histo-co-home .kylon-inner {
        padding-bottom: 0;
    }
}

@media (max-width: 480px) {
    .histo-co-home.hero {
        min-height: 500px;
    }

    .histo-co-home .hero-inner {
        padding-top: 80px;
    }

    .histo-co-home .hero-title {
        font-size: 1.5rem;
    }

    /* Center kbride image at bottom on small mobile */
    .histo-co-home .hero-kbride {
        position: absolute;
        width: 35vw;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        bottom: 0;
    }
}
