/*
Theme Name: Abby Performance
Description: Custom theme for Abby Auto Performance.
Author: Custom Build
Version: 3.1.0
Text Domain: abby-performance
*/

/* ============================================================
   VARIABLES & RESET (UPDATED TO RED/BLACK SCHEME)
============================================================ */
:root {
    --primary:       #c8102e; /* Performance Red */
    --primary-dark:  #990c23;
    --primary-light: rgba(200, 16, 46, 0.08);
    --black:         #050505;
    --off-black:     #111111;
    --white:         #ffffff;
    --grey-light:    #f4f4f5;
    --grey-mid:      #e5e7eb;
    --text-dark:     #171717;
    --text-body:     #404040;
    --text-muted:    #737373;
    --header-h:      74px;
    --radius:        8px;
    --shadow-sm:     0 2px 8px rgba(0,0,0,0.08);
    --shadow-md:     0 6px 24px rgba(0,0,0,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    color: var(--text-body);
    background-color: var(--grey-light);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }

/* ============================================================
   HEADER
============================================================ */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--grey-mid);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-h);
}

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

.site-logo a { display: flex; align-items: center; text-decoration: none; }
.site-logo img { height: 48px; width: auto; }

.main-navigation { display: flex; align-items: center; }
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 4px;
    align-items: center;
}
.main-navigation a {
    display: block;
    text-decoration: none;
    font-family: 'Barlow', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    color: var(--text-dark);
    padding: 8px 14px;
    border-radius: var(--radius);
    transition: color 0.15s, background 0.15s;
}
.main-navigation a:hover {
    color: var(--primary);
    background: var(--primary-light);
}
.main-navigation .current-menu-item a {
    color: var(--primary);
    font-weight: 700;
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: var(--white) !important;
    text-decoration: none;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    padding: 10px 20px;
    border-radius: var(--radius);
    transition: background 0.15s, transform 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.header-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    color: var(--white) !important;
}
.header-cta-icon { font-size: 0.9rem; }

.menu-toggle {
    display: none;
    background: transparent;
    border: 1.5px solid var(--grey-mid);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 9px 10px;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    transition: border-color 0.15s;
    flex-shrink: 0;
}
.menu-toggle:hover { border-color: var(--primary); }
.menu-toggle .hamburger-icon { display: flex; flex-direction: column; gap: 5px; }
.menu-toggle .hamburger-icon span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
    transform-origin: center;
}

.menu-toggle.is-open .hamburger-icon span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open .hamburger-icon span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.is-open .hamburger-icon span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media screen and (max-width: 768px) {
    .header-cta-text { display: none; }
    .header-cta { padding: 10px 12px; }
    .menu-toggle { display: flex; }
    .main-navigation {
        display: none;
        position: absolute;
        top: calc(var(--header-h) + 1px);
        left: 0;
        right: 0;
        background: var(--white);
        border-top: 2px solid var(--primary);
        border-bottom: 1px solid var(--grey-mid);
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        z-index: 999;
        padding: 8px 0 16px;
    }
    .main-navigation.toggled { display: block; }
    .main-navigation ul { flex-direction: column; gap: 0; padding: 0; }
    .main-navigation li { border-bottom: 1px solid var(--grey-light); }
    .main-navigation li:last-child { border-bottom: none; }
    .main-navigation a { padding: 15px 24px; border-radius: 0; font-size: 1.05rem; }
}

.site-main { max-width: 1200px; margin: 0 auto; padding: 40px 24px; min-height: 60vh; }
body.page .site-main { padding: 0; max-width: 100%; }

/* ============================================================
   FOOTER
============================================================ */
.site-footer {
    background: var(--black);
    color: var(--white);
    margin-top: 0;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 24px 48px;
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.2fr;
    gap: 48px;
    align-items: start;
}
.footer-logo { height: 44px; width: auto; margin-bottom: 20px; }
.footer-tagline { color: #9ca3af; font-size: 0.95rem; line-height: 1.7; }
.footer-heading {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 18px;
}
.footer-nav ul, .footer-contact ul, .footer-services ul {
    list-style: none; display: flex; flex-direction: column; gap: 10px;
}
.footer-nav a, .footer-contact a {
    color: #d1d5db; text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: color 0.15s;
}
.footer-nav a:hover, .footer-contact a:hover { color: var(--white); }
.footer-contact li { display: flex; gap: 12px; align-items: flex-start; color: #d1d5db; font-size: 0.92rem; line-height: 1.6; }
.footer-contact a { font-weight: 600; }
.footer-icon { flex-shrink: 0; font-size: 0.95rem; margin-top: 2px; }
.footer-services li { color: #9ca3af; font-size: 0.9rem; padding-left: 14px; position: relative; }
.footer-services li::before {
    content: '—'; position: absolute; left: 0; color: var(--primary); font-size: 0.7rem; top: 4px;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 20px 24px; text-align: center;
}
.footer-bottom p { color: #6b7280; font-size: 0.82rem; max-width: 1200px; margin: 0 auto; }

@media (max-width: 900px) {
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; }
    .footer-brand { grid-column: span 2; }
}
@media (max-width: 560px) {
    .footer-inner { grid-template-columns: 1fr; padding: 44px 20px 32px; }
    .footer-brand { grid-column: span 1; }
}

/* ============================================================
   WORDPRESS CORE BLOCK SUPPORT
   (Enables wp-block-columns, alignfull, alignwide, buttons)
============================================================ */

/* Alignments */
.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
.aligncenter { margin-left: auto; margin-right: auto; }

/* Columns block */
.wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: normal;
    margin-bottom: 1.75em;
}
.wp-block-columns.are-vertically-aligned-center { align-items: center; }
.wp-block-columns.are-vertically-aligned-top { align-items: flex-start; }
.wp-block-columns.are-vertically-aligned-bottom { align-items: flex-end; }

.wp-block-column {
    flex-grow: 1;
    flex-basis: 0;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Stack columns on tablet/mobile */
@media (max-width: 781px) {
    .wp-block-columns {
        flex-direction: column;
        gap: 32px;
    }
    .wp-block-column {
        flex-basis: 100% !important;
    }
}

/* Buttons block */
.wp-block-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.wp-block-button__link {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(200, 16, 46, 0.25);
}

/* Group block */
.wp-block-group { box-sizing: border-box; }