/*
Theme Name: SERRAC Child
Template: kadence
Version: 1.0.0
Description: Child theme for SERRAC — vertical server racking solutions.
*/

/* =============================================
   GOOGLE FONTS
============================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Sora:wght@600;700;800&display=swap');

/* =============================================
   SERRAC BRAND TOKENS
   Apply these surgically — do NOT override
   --global-palette variables here because
   Kadence uses those to control per-block
   text/background colors set in the editor.
============================================= */
:root {
    --serrac-green:        #457C57;
    --serrac-green-dark:   #3a6b4a;
    --serrac-green-light:  #e8f3ec;
    --serrac-dark:         #272727;
    --serrac-grey:         #D4D4D4;
    --serrac-grey-light:   #f5f5f5;
    --serrac-font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --serrac-font-heading: 'Sora', 'Inter', sans-serif;
}

/* =============================================
   BASE TYPOGRAPHY
   Only set font-family and sizing — NOT color.
   Kadence controls heading/text colors
   per-block; overriding color here makes
   text invisible on dark-background sections.
============================================= */
body,
p,
li,
td,
th {
    font-family: var(--serrac-font-body);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6,
.wp-block-heading {
    font-family: var(--serrac-font-heading);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* =============================================
   LINKS
============================================= */
a {
    color: var(--serrac-green);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--serrac-green-dark);
}

/* =============================================
   BUTTONS
============================================= */
.wp-block-button__link,
.kt-button,
.kb-btn,
button[type="submit"],
input[type="submit"] {
    background-color: var(--serrac-green) !important;
    border-color: var(--serrac-green) !important;
    color: #ffffff !important;
    font-family: var(--serrac-font-body);
    font-weight: 600;
    border-radius: 4px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.wp-block-button__link:hover,
.kt-button:hover,
.kb-btn:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    background-color: var(--serrac-green-dark) !important;
    border-color: var(--serrac-green-dark) !important;
    color: #ffffff !important;
}

.wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent !important;
    border-color: var(--serrac-green) !important;
    color: var(--serrac-green) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--serrac-green) !important;
    color: #ffffff !important;
}

/* =============================================
   NAVIGATION
============================================= */
.main-navigation a,
.site-navigation a {
    font-family: var(--serrac-font-body);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.main-navigation a:hover,
.site-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current-page-ancestor > a {
    color: var(--serrac-green);
}

/* =============================================
   HERO SECTION
   Uses the branded Header.png from uploads.
   Targets Kadence's first full-width row/cover.
============================================= */
.wp-block-cover:first-of-type,
.kb-row-layout-wrap:first-of-type {
    background-image: url('/wp-content/uploads/2020/07/Header.png');
    background-size: cover;
    background-position: center;
    min-height: 70vh;
}

/* =============================================
   FEATURE / BENEFIT CARDS
============================================= */
.wp-block-kadence-infobox,
.kt-blocks-info-box-wrap {
    border-radius: 8px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wp-block-kadence-infobox:hover,
.kt-blocks-info-box-wrap:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.kt-blocks-info-box-icon svg,
.kt-blocks-info-box-icon i {
    color: var(--serrac-green);
    fill: var(--serrac-green);
}

/* =============================================
   FOOTER
============================================= */
#colophon,
.site-footer,
.kadence-footer-wrap {
    background-color: var(--serrac-dark);
    color: #cccccc;
}

.site-footer a,
#colophon a {
    color: var(--serrac-grey);
}

.site-footer a:hover,
#colophon a:hover {
    color: #ffffff;
}

.site-footer h2,
.site-footer h3,
.site-footer h4,
#colophon h2,
#colophon h3,
#colophon h4 {
    color: #ffffff;
}

/* =============================================
   CUSTOM NAVIGATION (header.php)
============================================= */

.sh-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid var(--serrac-grey);
    transition: box-shadow 0.2s ease;
}

.sh-nav--scrolled {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.sh-nav__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.sh-nav__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.sh-nav__logo-img {
    display: block;
    height: 32px;
    width: auto;
    object-fit: contain;
}

/* Nav links */
.sh-nav__menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sh-nav__menu ul li a {
    display: inline-block;
    padding: 8px 14px;
    font-family: var(--serrac-font-body);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--serrac-dark);
    text-decoration: none;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.sh-nav__menu ul li a:hover {
    color: var(--serrac-green);
    background-color: var(--serrac-green-light);
}

/* Contact CTA button in nav */
.sh-nav__menu ul li a.sh-nav__cta {
    background-color: var(--serrac-green);
    color: #ffffff;
    padding: 8px 20px;
    margin-left: 8px;
}

.sh-nav__menu ul li a.sh-nav__cta:hover {
    background-color: var(--serrac-green-dark);
    color: #ffffff;
}

/* Hamburger button */
.sh-nav__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
}

.sh-nav__toggle span {
    display: block;
    height: 2px;
    background: var(--serrac-dark);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.sh-nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sh-nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.sh-nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 768px) {
    .sh-nav__toggle {
        display: flex;
    }

    .sh-nav__menu {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--serrac-grey);
        padding: 12px 0 20px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    }

    .sh-nav__menu.is-open {
        display: block;
    }

    .sh-nav__menu ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 0 16px;
    }

    .sh-nav__menu ul li {
        width: 100%;
    }

    .sh-nav__menu ul li a {
        display: block;
        width: 100%;
        padding: 12px 8px;
        border-radius: 4px;
    }

    .sh-nav__menu ul li a.sh-nav__cta {
        margin-left: 0;
        margin-top: 8px;
        text-align: center;
    }
}

/* =============================================
   HOMEPAGE TEMPLATE (front-page.php)
============================================= */

/* --- Layout utilities --- */
#serrac-home {
    font-family: var(--serrac-font-body);
}

.sh-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.sh-section {
    padding: 96px 0;
}

.sh-section--dark {
    background-color: var(--serrac-dark);
    color: #e0e0e0;
}

.sh-section--green {
    background-color: var(--serrac-green);
    color: #ffffff;
}

.sh-section__header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 64px;
}

.sh-section__header h2 {
    margin: 8px 0 16px;
}

.sh-section__sub {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* --- Eyebrow labels --- */
.sh-eyebrow {
    display: inline-block;
    font-family: var(--serrac-font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--serrac-green);
}

.sh-eyebrow--light {
    color: rgba(255,255,255,0.75);
}

/* --- Split layout --- */
.sh-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.sh-split--reverse {
    direction: rtl;
}

.sh-split--reverse > * {
    direction: ltr;
}

.sh-split__text h2 {
    margin: 8px 0 20px;
}

.sh-split__text p {
    margin-bottom: 16px;
    font-size: 1.05rem;
    line-height: 1.75;
}

.sh-split__image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.sh-split__image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* --- Benefits split layout --- */
.sh-benefits__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.sh-benefits__cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sh-benefits__diagram img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

/* --- Cards --- */
.sh-card {
    background: #ffffff;
    border: 1px solid var(--serrac-grey);
    border-radius: 10px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.sh-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.sh-card--row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
}

.sh-card__icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
}

.sh-card__icon svg {
    width: 56px;
    height: 56px;
}

.sh-card__body {
    flex: 1;
}

.sh-card h3 {
    font-family: var(--serrac-font-heading);
    font-size: 1.05rem;
    margin: 0 0 8px;
    color: var(--serrac-dark);
}

.sh-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.65;
    margin: 0;
}

/* --- Buttons --- */
.sh-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 4px;
    font-family: var(--serrac-font-body);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.sh-btn--primary {
    background-color: var(--serrac-green);
    color: #ffffff;
    border: 2px solid var(--serrac-green);
}

.sh-btn--primary:hover {
    background-color: var(--serrac-green-dark);
    border-color: var(--serrac-green-dark);
    color: #ffffff;
}

.sh-btn--outline {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.sh-btn--outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    color: #ffffff;
}

/* --- Hero --- */
.sh-hero {
    position: relative;
    line-height: 0; /* removes gap under img */
}

.sh-hero__img {
    width: 100%;
    height: auto;
    display: block;
}

.sh-hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 28px 24px;
    background-color: var(--serrac-dark);
}

/* --- Product section --- */
.sh-section--dark h2 {
    color: #ffffff;
}

.sh-section--dark p {
    color: #cccccc;
}

.sh-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
}

.sh-list li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: #cccccc;
    font-size: 0.97rem;
}

.sh-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--serrac-green);
}

.sh-product .sh-split__image img {
    max-width: 100%;
    height: 850px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
}

/* --- About / stats --- */
.sh-about__stat-block {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 40px;
    background: var(--serrac-green-light);
    border-radius: 12px;
    border-left: 4px solid var(--serrac-green);
}

.sh-stat__number {
    display: block;
    font-family: var(--serrac-font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--serrac-green);
    line-height: 1;
    margin-bottom: 4px;
}

.sh-stat__label {
    font-size: 0.9rem;
    color: #555;
}

/* --- Contact --- */
.sh-section--green h2 {
    color: #ffffff;
}

.sh-contact__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.sh-contact__item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 20px;
}

.sh-contact__item svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.9;
}

.sh-contact__item strong {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: #ffffff;
}

.sh-contact__item p {
    margin: 0;
    font-size: 0.97rem;
    opacity: 0.85;
}

.sh-contact__item a {
    color: #ffffff;
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.4);
}

.sh-contact__item a:hover {
    text-decoration-color: #ffffff;
    color: #ffffff;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .sh-benefits__layout,
    .sh-split,
    .sh-split--reverse {
        grid-template-columns: 1fr;
        direction: ltr;
        gap: 48px;
    }

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

    .sh-section {
        padding: 64px 0;
    }
}

@media (max-width: 600px) {
    .sh-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

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

/* About section — two column: heading left, text right */
.sh-about__inner {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 80px;
    align-items: start;
}

.sh-about__left h2 {
    margin: 12px 0 0;
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
}

.sh-about__right p {
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 16px;
    color: #444;
}

.sh-about__right p:last-child {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .sh-about__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* =============================================
   CUSTOM STYLES — add below this line
============================================= */
