/**
 * KF Cooling Co. — Main Styles
 * Core layout, typography, components, utilities.
 *
 * @package KF_Cooling
 */

/* ── CSS Custom Properties ────────────────────────────── */
:root {
    --primary: #EA1B29;
    --primary-dark: #C41520;
    --primary-light: #FDEAEB;
    --secondary: #003293;
    --secondary-light: #E6EBF5;
    --text-dark: #212121;
    --text-body: #424242;
    --text-light: #757575;
    --bg-white: #FFFFFF;
    --bg-light: #F5F7FA;
    --bg-dark: #003293;
    --border: #E0E0E0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: 0.3s ease;
    --max-width: 1200px;
    --header-height: 80px;
}

/* ── Reset & Base ─────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-body);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ── Typography ───────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-body);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ── Layout ───────────────────────────────────────────── */
.kf-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.kf-section {
    padding: 80px 0;
}

.kf-section--light {
    background-color: var(--bg-light);
}

.kf-section--dark {
    background-color: var(--bg-dark);
    color: #fff;
}

.kf-section--dark h2,
.kf-section--dark h3,
.kf-section--dark h4 {
    color: #fff;
}

.kf-section--dark p {
    color: rgba(255, 255, 255, 0.85);
}

/* ── Section Headers ──────────────────────────────────── */
.kf-section-label {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 12px;
}

.kf-section-title {
    margin-bottom: 20px;
}

.kf-section-desc {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
}

.kf-section--dark .kf-section-desc {
    color: rgba(255, 255, 255, 0.7);
}

.kf-section-header {
    text-align: center;
    margin-bottom: 50px;
}

.kf-section-header .kf-section-desc {
    margin-left: auto;
    margin-right: auto;
}

/* ── Buttons ──────────────────────────────────────────── */
.kf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

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

.kf-btn--primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kf-btn--outline {
    background-color: transparent;
    color: #fff;
    border-color: #fff;
}

.kf-btn--outline:hover {
    background-color: #fff;
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.kf-btn--secondary {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.kf-btn--secondary:hover {
    background-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kf-btn--sm {
    padding: 10px 24px;
    font-size: 0.875rem;
}

.kf-btn--lg {
    padding: 16px 40px;
    font-size: 1rem;
}

.kf-btn svg,
.kf-btn .kf-btn-icon {
    width: 18px;
    height: 18px;
    transition: transform var(--transition);
}

.kf-btn:hover svg,
.kf-btn:hover .kf-btn-icon {
    transform: translateX(4px);
}

/* ── Cards ────────────────────────────────────────────── */
.kf-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition);
}

.kf-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-light);
}

.kf-card__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 1.5rem;
}

/* Service card image (top of card) */
.kf-card__image {
    margin: -32px -32px 24px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.kf-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kf-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.kf-card__text {
    color: var(--text-light);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* ── Grid Utilities ───────────────────────────────────── */
.kf-grid {
    display: grid;
    gap: 30px;
}

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

.kf-grid--services { grid-template-columns: repeat(3, 1fr); }

/* ── Flex Utilities ───────────────────────────────────── */
.kf-flex { display: flex; }
.kf-flex-center { display: flex; align-items: center; justify-content: center; }
.kf-flex-between { display: flex; align-items: center; justify-content: space-between; }
.kf-flex-col { flex-direction: column; }
.kf-gap-sm { gap: 16px; }
.kf-gap-md { gap: 24px; }
.kf-gap-lg { gap: 40px; }

/* ── Text Utilities ───────────────────────────────────── */
.kf-text-center { text-align: center; }
.kf-text-white { color: #fff; }
.kf-mt-0 { margin-top: 0; }
.kf-mb-0 { margin-bottom: 0; }
.kf-mb-sm { margin-bottom: 16px; }
.kf-mb-md { margin-bottom: 32px; }
.kf-mb-lg { margin-bottom: 48px; }

/* ── Separator ────────────────────────────────────────── */
.kf-divider {
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    margin: 16px auto 0;
}

.kf-section-header .kf-divider {
    margin-left: auto;
    margin-right: auto;
}

/* ── Scroll Animations ────────────────────────────────── */
.kf-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.kf-fade-in.kf-visible {
    opacity: 1;
    transform: translateY(0);
}

.kf-fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.kf-fade-in-left.kf-visible {
    opacity: 1;
    transform: translateX(0);
}

.kf-fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.kf-fade-in-right.kf-visible {
    opacity: 1;
    transform: translateX(0);
}

/* ── WordPress Core Overrides ─────────────────────────── */
.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: var(--text-light);
    padding-top: 8px;
}

.gallery {
    display: grid;
    gap: 10px;
}

.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1em;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
