/* ========================================
   KLEIN THERAPY - GLOBAL STYLES
   Centralized Color Management & Layout System
   ======================================== */

/* ========================================
   SECTION 1: COLOR SYSTEM & VARIABLES 
   ======================================== */
:root {
    /* ========================================
       PRIMARY BRAND COLORS - BLUE THEME
       ======================================== */
    --primary-color: #27548A;          /* Main brand blue */
    --primary-color-light: #7FA2C3;    /* Lighter blue for accents */
    --primary-color-dark: #1C3B63;     /* Darker blue for emphasis */
    --primary-color-rgb: 39, 84, 138;  /* RGB for opacity/transparency */
    --primary-color-cta-button: var(--primary-color);
    
    /* ========================================
       SECONDARY COLORS
       ======================================== */
    --secondary-color: #276B8A;        /* Secondary blue */
    --secondary-color-rgb: 39, 107, 138;
    --accent-color: #4A75A6;          /* Accent blue */
    --accent-color-rgb: 74, 117, 166;
    --accent-color-dark: #1C3B63;
    
    /* ========================================
       NEUTRAL COLORS
       ======================================== */
    --text-color-dark: #333333;
    --text-color-dark-rgb: 51, 51, 51;
    --text-color-light: #ffffff;
    --text-color-light-rgb: 255, 255, 255;
    --background-light: #FDFBF8;
    --background-light-rgb: 253, 251, 248;
    --background-white: #ffffff;
    --background-white-rgb: 255, 255, 255;
    --background-off-white: #f8f9fa;
    
    /* ========================================
       INTERACTIVE COLORS
       ======================================== */
    --link-color: var(--primary-color);
    --link-hover-color: var(--accent-color);
    --button-primary-bg: var(--primary-color);
    --button-primary-text: var(--text-color-light);
    --button-primary-hover-bg: var(--primary-color-dark);
    --button-secondary-bg: transparent;
    --button-secondary-text: var(--primary-color);
    --button-secondary-border: var(--primary-color);
    --button-secondary-hover-bg: var(--primary-color);
    --button-secondary-hover-text: var(--text-color-light);
    
    /* ========================================
       FOCUS & ACCESSIBILITY
       ======================================== */
    --focus-outline-color: var(--accent-color);
    --focus-outline-width: 3px;
    --focus-outline-offset: 2px;
    
    /* ========================================
       FORM INPUT STYLES
       ======================================== */
    --input-border-color: #cccccc;
    --input-focus-border-color: var(--accent-color);
    --input-background-color: #ffffff;
    --input-error-border-color: #dc3545;
    --input-error-background-color: rgba(220, 53, 69, 0.05);
    
    /* ========================================
       SHADOWS & EFFECTS
       ======================================== */
    --box-shadow-standard: 0 5px 20px rgba(0,0,0,0.07);
    --box-shadow-hover: 0 10px 30px rgba(0,0,0,0.1);
    --box-shadow-card: 0 4px 15px rgba(0,0,0,0.08);
    --box-shadow-button: 0 4px 12px rgba(0,0,0,0.3);
    --box-shadow-raised: 0 6px 20px rgba(0,0,0,0.15);
    
    /* ========================================
       TYPOGRAPHY
       ======================================== */
    --font-primary: 'Lato', sans-serif;
    --font-secondary: 'Merriweather', serif;
    --font-size-base: 17px;
    --line-height-base: 1.7;
    
    /* ========================================
       SPACING & LAYOUT
       ======================================== */
    --border-radius: 8px;
    --border-radius-small: 4px;
    --border-radius-large: 12px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* ========================================
       TRANSITIONS
       ======================================== */
    --transition-standard: all 0.3s ease;
    
    /* ========================================
       ADDITIONAL VARIABLES FROM USER CSS
       ======================================== */
    --icon-color-light: #7FA2C3;
    --icon-color-dark: #4A75A6;
    --highlight-on-dark-bg: #EAEFEF;
    --navbar-background-white: #ffffff;
    --navbar-box-shadow-standard: 0 5px 20px rgba(0,0,0,0.07);
    --navbar-font-secondary: 'Merriweather', serif;
    --navbar-primary-color: #27548A;
    --navbar-secondary-color: #276B8A;
    --navbar-transition-standard: all 0.3s ease;
    --navbar-accent-color: #4A75A6;
    --navbar-border-radius: 8px;
    --navbar-text-color-light: #ffffff;
    --navbar-accent-color-dark: #1C3B63;
    --footer-secondary-color: #276B8A;
    --footer-text-color-light: #ffffff;
    --footer-font-primary: 'Lato', sans-serif;
    --footer-highlight-on-dark-bg: #EAEFEF;
    --footer-transition-standard: all 0.3s ease;
    --footer-accent-color: #4A75A6;
}

/* ========================================
   SECTION 2: GLOBAL RESETS & BASE STYLES
   ======================================== */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html { 
    scroll-behavior: smooth; 
}

body {
    font-family: var(--font-primary);
    color: var(--text-color-dark);
    background-color: var(--background-light);
    line-height: var(--line-height-base);
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   SECTION 3: ACCESSIBILITY & UTILITIES
   ======================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a:focus-visible, 
button:focus-visible, 
[tabindex]:not([tabindex="-1"]):focus-visible {
    outline: var(--focus-outline-width) solid var(--focus-outline-color);
    outline-offset: var(--focus-outline-offset);
    box-shadow: 0 0 0 4px rgba(var(--accent-color-rgb), 0.3);
}

a:focus, 
button:focus, 
[tabindex]:not([tabindex="-1"]):focus {
    outline: none; 
}

/* ========================================
   SECTION 4: LAYOUT COMPONENTS
   ======================================== */
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
    width: 100%;
}

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

.mb-large { 
    margin-bottom: 40px; 
}

/* ========================================
   SECTION 5: TYPOGRAPHY & HEADINGS
   ======================================== */
.section-title {
    font-family: var(--font-secondary);
    font-size: clamp(2rem, 5vw, 2.8rem);
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 60px;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

/* ========================================
   SECTION 6: CONTENT SECTIONS
   ======================================== */
.content-section { 
    padding: 90px 0;
}

.intro-section {
    background-color: var(--background-white);
    border-top: 1px solid rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.intro-section p {
    font-size: 1.1rem;
    color: var(--text-color-dark);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* ========================================
   SECTION 7: SERVICE CARDS & GRIDS
   ======================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background-color: var(--background-white);
    padding: 30px 25px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow-card);
    transition: var(--transition-standard);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--box-shadow-hover);
}

.service-card .icon {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 20px;
    background-color: rgba(var(--primary-color-rgb), 0.50);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    transition: var(--transition-standard);
}

.service-card:hover .icon {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    transform: scale(1.1);
}

/* Road icon stripes - ensure visibility on hover */
.service-card .icon-road .road-stripe {
    fill: var(--background-white) !important;
}

.service-card:hover .icon-road .road-stripe {
    fill: var(--accent-color) !important;
}

.service-card h3 {
    font-family: var(--font-secondary);
    font-size: 1.35rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
    min-height: 2.7em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card h4 {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--accent-color);
    font-weight: 600;
}

.service-card p {
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 20px;
    color: var(--text-color-dark);
    line-height: 1.6;
}

.service-card .learn-more-btn {
    display: inline-block;
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 700;
    transition: var(--transition-standard);
    margin-top: auto;
}

.service-card .learn-more-btn:hover, 
.service-card .learn-more-btn:focus-visible {
    background-color: var(--accent-color);
    color: var(--text-color-light);
}

/* ========================================
   SECTION 8: ABOUT KAREN SECTION
   ======================================== */
.about-karen-section { 
    padding: 90px 0;
    background-color: var(--background-white);
}

.about-karen-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.about-karen-text { 
    flex: 2 1 400px;
}

.about-karen-text h2 { 
    font-family: var(--font-secondary);
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.about-karen-text h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

.about-karen-text p { 
    font-size: 1.1rem;
    color: var(--text-color-dark);
    line-height: 1.8;
    margin-bottom: 25px;
}

.about-karen-text .learn-more-karen {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-color-light);
    padding: 12px 25px;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 700;
    transition: var(--transition-standard);
    border: 2px solid var(--primary-color);
}

.about-karen-text .learn-more-karen:hover {
    background-color: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

/* ========================================
   SECTION 9: LOCATIONS SECTION
   ======================================== */
.locations-section {
    padding: 90px 0;
    background-color: var(--background-light);
    position: relative;
    overflow: hidden;
}

.locations-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/content/images/fieldtree-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.1;
    z-index: 1;
}

.locations-section .container { 
    position: relative;
    z-index: 2;
}

.locations-section .section-title { 
    color: var(--secondary-color);
}

.locations-section .section-title::after {
    background-color: var(--accent-color);
}

.location-info { 
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.location-info p {
    font-size: 1.1rem;
    color: var(--text-color-dark);
    margin-bottom: 15px;
    line-height: 1.8;
}

.location-info strong,
.location-info b {
    color: var(--secondary-color);
    font-weight: 700;
}

.location-info a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.location-info a:hover,
.location-info a:focus-visible {
    color: var(--primary-color);
    text-decoration: underline;
}

.office-image-container { 
    text-align: center;
    margin-top: 30px;
}

.office-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-standard);
    border: 5px solid var(--background-white);
    transition: var(--transition-standard);
}

.office-image-container img:hover {
    transform: scale(1.02);
    box-shadow: var(--box-shadow-hover);
}

/* ========================================
   SECTION 10: FINAL CTA SECTION
   ======================================== */
.final-cta-section { 
    padding: 90px 0;
    background-color: var(--primary-color);
    color: var(--text-color-light);
    text-align: center;
}

.final-cta-section .section-title {
    color: var(--text-color-light);
}
 
.final-cta-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    transition: var(--transition-standard);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-method:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.contact-method i {
    font-size: 1.5rem;
    color: var(--primary-color-light);
}

.contact-method a {
    color: var(--text-color-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.contact-method a:hover,
.contact-method a:focus-visible {
    color: var(--primary-color-light);
}

/* ========================================
   SECTION 11: BUTTONS & CTAs
   ======================================== */
.cta-button {
    display: inline-flex;
    align-items: center;
    background-color: var(--button-primary-bg);
    color: var(--button-primary-text);
    padding: 15px 30px;
    border-radius: var(--border-radius);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-standard);
    font-size: 1.05rem;
    box-shadow: var(--box-shadow-button);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid var(--button-primary-bg);
}

.cta-button:hover, 
.cta-button:focus-visible {
    background-color: var(--button-primary-hover-bg);
    border-color: var(--button-primary-hover-bg);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.cta-button.outline {
    background-color: var(--button-secondary-bg);
    color: var(--button-secondary-text);
    border-color: var(--button-secondary-border);
}

.cta-button.outline:hover {
    background-color: var(--button-secondary-hover-bg);
    color: var(--button-secondary-hover-text);
}

.cta-button.primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.cta-button.primary:hover {
    background-color: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
}

/* ========================================
   SECTION 12: RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .about-karen-content {
        flex-direction: column;
        text-align: center;
    }
    
    .about-karen-text h2 { 
        font-size: 1.8rem;
    }
    
    .about-karen-text h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .content-section {
        padding: 60px 0;
    }
    
    .service-card {
        padding: 25px 20px;
    }
    
    .contact-methods {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-method {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .cta-button {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .about-karen-image img {
        max-width: 250px;
    }
}

/* ========================================
   SECTION 13: UTILITY CLASSES
   ======================================== */

/* Background color utility classes */
.bg-off-white {
    background-color: var(--background-off-white);
}

/* Content section utility classes */
.content-section {
    padding: 4rem 0;
}

/* ========================================
   SECTION 14: FORM ELEMENTS
   ======================================== */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.number-input-wrapper input[type="number"] {
    text-align: center;
}