/*
Theme Name: David Karinguri Child Theme
Description: Professional child theme for David Karinguri
Author: David Karinguri
Template: astra
Version: 1.0.4
Text Domain: davidkaringuri-child
*/

/* =================================================================== */
/* TABLE OF CONTENTS
/* =================================================================== */
/*  1. CSS Custom Properties (:root)
/*  2. Base & Element Styles
/*  3. Reusable Components
/*  4. General Responsive Design
/*  5. Utility & Helper Classes
/* =================================================================== */

/* 1. CSS Custom Properties (:root) */
:root {
    --primary-color: #1F2937; /* Dark Gray for text */
    --accent-color: #3B82F6; /* Blue for CTAs and highlights */
    --secondary-color: #F59E0B; /* Yellow/Orange for accents */
    --background-color: #F9FAFB; /* Very light gray page background */
    --text-color: #111827; /* Near black for primary text */
    --light-gray: #F3F4F6; /* Light gray for card backgrounds, borders */
    --medium-gray: #6B7280; /* Medium gray for paragraphs, subtitles */
    --border-color: #E5E7EB; /* Standard border color */
    --white-color: #FFFFFF;

    --font-primary: 'Inter', sans-serif;
    --font-heading: 'IBM Plex Sans', sans-serif;

    --container-max-width: 1200px;
    --section-padding: 80px 0;
    --border-radius: 8px;
    --border-radius-lg: 16px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 2. Base & Element Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-primary);
    color: var(--text-color);
    background-color: var(--white-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
}
h1 { font-size: 3.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2.5rem; letter-spacing: -0.02em; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; }
p { margin-bottom: 1.5rem; color: var(--medium-gray); }
p:last-child { margin-bottom: 0; }
.lead-text { font-size: 1.25rem; font-weight: 400; color: var(--text-color); }
section { padding: var(--section-padding); }

/* 3. Reusable Components */
.container { max-width: var(--container-max-width); margin: 0 auto; padding: 0 1.5rem; }
.cta-primary, .cta-secondary { display: inline-flex; align-items: center; justify-content: center; padding: 14px 28px; border-radius: var(--border-radius); font-weight: 600; text-decoration: none; transition: all 0.3s ease; cursor: pointer; border: 2px solid transparent; font-size: 1rem; }
.cta-primary { background-color: var(--accent-color); color: var(--white-color); box-shadow: var(--shadow-sm); }
.cta-primary:hover { background-color: #2563EB; transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--white-color); }
.cta-secondary { background-color: transparent; color: var(--accent-color); border-color: var(--accent-color); }
.cta-secondary:hover { background-color: var(--accent-color); color: var(--white-color); transform: translateY(-2px); }

/* Modifier class for icon buttons (like carousel nav) */
.cta-icon {
    padding: 14px 18px; /* Make padding more square */
    font-size: 1.25rem;  /* Make chevron icon larger */
    line-height: 1;      /* Improve vertical alignment */
}

.section-header { text-align: center; max-width: 700px; margin: 0 auto 4rem; }
.section-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; color: var(--primary-color); }
.section-subtitle, .section-description { font-size: 1.125rem; color: var(--medium-gray); line-height: 1.7; }
.highlight-text { color: var(--accent-color); }

/* 4. General Responsive Design */
@media (max-width: 1024px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.25rem; }
    .section-title { font-size: 2rem; }
}

@media (max-width: 768px) {
    :root { --section-padding: 60px 0; }
    h1 { font-size: 2.5rem; }
    h2, .section-title { font-size: 1.875rem; }
    h3 { font-size: 1.25rem; }
    p, .section-description, .hero-description { font-size: 1rem; }
}

/* 5. Utility & Helper Classes */
.full-width-background {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* General Styling - Fix Overflow */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #fff;
    overflow-x: hidden; /* Ensure no horizontal overflow */
    width: 100%; /* Explicitly set body width */
}

/* Full-Width Background Fix */
.full-width-background {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    /* Add this to handle scrollbar width on desktop */
    margin-right: calc(-50vw + 8px); /* Adjust for scrollbar width (typically 8px on desktop) */
}

/* Container Adjustment */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%; /* Ensure container doesn’t exceed viewport */
}

@media (max-width: 768px) {
    .full-width-background {
        margin-right: -50vw; /* Reset margin on mobile to avoid unnecessary adjustment */
    }
}

/* Ensure No Unintended Widths or Margins */
.site-main {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Additional Debugging - Remove if Not Needed */
* {
    box-sizing: border-box;
    /* Uncomment to debug and identify overflow elements */
    /* outline: 1px solid red; */
}