/*
Theme Name: SRIII Consulting
Theme URI: https://sriiiconsulting.com
Author: SRIII Consulting Team
Author URI: https://sriiiconsulting.com
Description: Custom business consulting theme with integrated funnels and CoachAccountable integration
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sriii-consulting
Tags: business, consulting, coaching, professional, custom-colors, custom-menu, featured-images, flexible-header, full-width-template, sticky-post, theme-options, threaded-comments, translation-ready
*/

/* ==========================================================================
   Base Styles
   ========================================================================== */

:root {
    --primary-color: #0052CC;
    --primary-dark: #003D99;
    --primary-light: #4A90E2;
    --secondary-color: #00A3E0;
    --accent-warm: #F4B942;
    --text-dark: #1A1A1A;
    --text-medium: #4A4A4A;
    --text-light: #6B7280;
    --bg-light: #F8FAFC;
    --bg-blue-light: #E8F4F8;
    --white: #FFFFFF;
    --border-color: #E2E8F0;
    --success-color: #10B981;
    --error-color: #EF4444;
    --neutral-100: #F7FAFC;
    --neutral-200: #EDF2F7;
    --neutral-700: #2D3748;
    --neutral-800: #1A202C;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Poppins', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Layout & Container
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.1rem 0;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-navigation a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0;
}

.main-navigation a:hover,
.main-navigation a.active {
    color: var(--primary-color);
}

.cta-button {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
}

.cta-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004999 100%);
    color: var(--white);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
}

.hero-section h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #ff5520;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--bg-light);
}

/* ==========================================================================
   Services Section
   ========================================================================== */

.services-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card h3 {
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.learn-more {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cta-section {
    background: var(--primary-color);
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 0.5rem;
}

.footer-widget a {
    color: rgba(255,255,255,0.8);
}

.footer-widget a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255,255,255,0.7);
}

/* ==========================================================================
   Page-Specific Helpers
   ========================================================================== */

.services-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3rem;
    align-items: flex-start;
}

.hero-ctas {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.hero-ctas a {
    flex: 1 1 220px;
    text-align: center;
}

.page-template-page-knowledge-hub .hub-search form {
    flex-wrap: wrap;
}

.page-template-page-knowledge-hub .hub-search input[type="search"] {
    min-width: 0;
    flex: 1 1 240px;
}

.page-template-page-knowledge-hub .page-header {
    padding: 3.5rem 0;
}

/* Knowledge Hub */
.page-template-page-knowledge-hub {
    background: #f7f8fb;
}

.knowledge-hub-page {
    padding: 3rem 0 5rem;
}

.knowledge-section {
    padding: 0 0 3.5rem;
}

.knowledge-section--featured {
    padding-top: 1rem;
}

.knowledge-heading {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    color: var(--text-dark);
}

.knowledge-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}

.kh-card {
    background: var(--white);
    border: 1px solid #e8edf4;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kh-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.kh-card__image {
    position: relative;
    padding-top: 60%;
    background: #f5f7fb;
    overflow: hidden;
}

.kh-card__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kh-card.is-featured .kh-card__image {
    padding-top: 65%;
}

.kh-card__body {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.kh-card__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.kh-pill {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: #eef2ff;
    color: var(--primary-color);
    border-radius: 999px;
    font-size: 0.813rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: capitalize;
}

.kh-meta-author {
    color: var(--text-light);
    font-weight: 600;
}

.kh-card__title {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.35;
}

.kh-card__description {
    margin: 0;
    color: var(--text-medium);
    line-height: 1.55;
}

.kh-card__link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    color: #0f67ff;
}

.kh-card__link span {
    transition: transform 0.2s ease;
}

.kh-card__link:hover span {
    transform: translateX(4px);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 900px) {
    .services-hero {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .hero-ctas {
        flex-direction: column;
    }

    .hero-ctas a {
        flex: 1 1 100% !important;
        width: 100% !important;
        white-space: normal !important;
        text-align: center !important;
    }

    .page-template-page-knowledge-hub .hub-search form {
        flex-direction: column;
        padding: 0.75rem 1rem;
        border-radius: 16px;
    }

    .page-template-page-knowledge-hub .hub-search button {
        width: 100%;
    }

    .page-template-page-knowledge-hub .hub-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .page-template-page-knowledge-hub .hub-filters .filter-btn {
        width: 100%;
        text-align: center;
    }

    .page-template-page-knowledge-hub .featured-carousel,
    .page-template-page-knowledge-hub .resources-grid {
        grid-template-columns: 1fr;
    }

    .page-template-page-knowledge-hub .knowledge-featured-grid,
    .page-template-page-knowledge-hub .knowledge-grid {
        grid-template-columns: 1fr;
    }

    .page-template-page-knowledge-hub .knowledge-heading {
        font-size: 2rem;
    }

    .page-template-page-knowledge-hub section {
        padding: 3rem 0 !important;
    }

    .wp-block-columns {
        flex-direction: column;
        gap: 1.5rem;
    }

    .main-header .header-inner nav {
        display: none !important;
    }

    .main-header .header-inner .cta-button {
        display: none !important;
    }

    .main-header .header-inner .menu-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}

.primary-menu { position: relative; }
.primary-menu .menu-item-has-children { position: relative; }
.primary-menu .menu-item-has-children > a span { font-size: 0.8em; color: var(--text-light); }
.primary-menu .menu-item-has-children .sub-menu {
    display: none;
    list-style: none;
    position: absolute;
    top: 110%;
    left: 0;
    min-width: 220px;
    background: #fff;
    padding: 0.75rem 0;
    margin: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    z-index: 2000;
}
.primary-menu .menu-item-has-children:hover > .sub-menu,
.primary-menu .menu-item-has-children:focus-within > .sub-menu {
    display: block !important;
}
.primary-menu .sub-menu li a {
    display: block;
    padding: 0.6rem 1rem;
    color: #1f2937;
}
.primary-menu .sub-menu li a:hover {
    background: #f3f4f6;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }
    
    .main-navigation li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .menu-toggle {
        display: block !important;
    }
    
    .top-bar {
        display: none;
    }
    
    .main-header .header-inner nav {
        display: none;
    }
    
    .main-header .header-inner .cta-button {
        display: none;
    }
    
    .main-header .header-inner .menu-toggle {
        display: block !important;
    }
    
    .services-grid {
        grid-template-columns: 1fr !important;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }

    /* Knowledge Hub mobile tweaks */
    .page-template-page-knowledge-hub .knowledge-heading {
        font-size: 1.75rem !important;
        margin-bottom: 1.75rem !important;
    }
    .page-template-page-knowledge-hub .knowledge-featured-grid,
    .page-template-page-knowledge-hub .knowledge-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
    .page-template-page-knowledge-hub .kh-card__body {
        padding: 1rem 1rem 1.25rem !important;
    }
    .page-template-page-knowledge-hub .cta-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .page-template-page-knowledge-hub .newsletter-subscribe {
        flex-direction: column;
        gap: 0.75rem;
        max-width: 100% !important;
    }
    .page-template-page-knowledge-hub .newsletter-subscribe button {
        width: 100%;
    }
    
    /* Mobile Hero */
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    .hero-motto {
        font-size: 1.5rem !important;
    }
    
    /* Mobile Service Cards */
    .service-card,
    .testimonial-card {
        margin-bottom: 1rem;
    }
    
    /* Mobile Grids */
    .story-grid,
    .service-detail {
        grid-template-columns: 1fr !important;
    }
    
    .service-detail .service-content {
        order: 1 !important;
    }
    
    .service-detail .service-image {
        order: 2 !important;
    }
    
    /* Add padding for mobile sticky CTA */
    body {
        padding-bottom: 80px;
    }

    /* Contact Page (tablet & mobile) – also match by .contact-grid for fallback */
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    .page-template-page-contact .page-header h1,
    .page .page-header h1 {
        font-size: 2.25rem !important;
    }
    .page-template-page-contact .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    .page-template-page-contact #contact-form {
        padding: 1.5rem !important;
    }
    .page-template-page-contact .name-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    .page-template-page-contact .newsletter-form {
        flex-direction: column;
        gap: 0.75rem;
    }
    .page-template-page-contact .newsletter-form button {
        width: 100%;
    }
    .page-template-page-contact .page-header {
        padding: 2.5rem 0 !important;
    }
    .page-template-page-contact .newsletter-form input {
        width: 100%;
        box-sizing: border-box;
    }

    /* Knowledge Hub mobile: header card & filters */
    .page-template-page-knowledge-hub .knowledge-hub-header {
        padding: 2rem 0 !important;
    }
    .page-template-page-knowledge-hub .knowledge-hub-header-card {
        padding: 2rem 1rem !important;
        border-radius: 16px !important;
    }
    .page-template-page-knowledge-hub .knowledge-hub-header h1 {
        font-size: 1.75rem !important;
        line-height: 1.25 !important;
    }
    .page-template-page-knowledge-hub .knowledge-hub-header p {
        font-size: 1rem !important;
    }
    .page-template-page-knowledge-hub .hub-filters {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        justify-content: flex-start !important;
    }
    .page-template-page-knowledge-hub .hub-filters .filter-btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
    }

    /* Service page mobile */
    .page-template-page-service .site-main > section,
    body.page-service .site-main > section {
        padding: 2.5rem 0 !important;
    }
    .page-template-page-service .services-hero,
    body.page-service .services-hero {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    .page-template-page-service .services-hero h1,
    body.page-service .services-hero h1 {
        font-size: 1.85rem !important;
        line-height: 1.25 !important;
    }
    .page-template-page-service .services-hero h2,
    body.page-service .services-hero h2 {
        font-size: 1.35rem !important;
    }
    .page-template-page-service .services-hero p,
    body.page-service .services-hero p {
        font-size: 1rem !important;
    }
    .page-template-page-service .hero-ctas,
    body.page-service .hero-ctas {
        flex-direction: column !important;
    }
    .page-template-page-service .hero-ctas a,
    body.page-service .hero-ctas a {
        width: 100% !important;
        white-space: normal !important;
        text-align: center !important;
        padding: 1rem !important;
    }
    .page-template-page-service .container h2,
    body.page-service .container h2 {
        font-size: 1.85rem !important;
    }
    .page-template-page-service .container h3,
    body.page-service .container h3 {
        font-size: 1.35rem !important;
    }
    .page-template-page-service .container ul,
    body.page-service .container ul {
        margin-bottom: 1.5rem !important;
    }
    .page-template-page-service .container ul li,
    body.page-service .container ul li {
        font-size: 0.95rem;
        margin-bottom: 0.75rem !important;
    }
    .page-template-page-service .service-cta-row,
    body.page-service .service-cta-row {
        flex-direction: column;
    }
    .page-template-page-service .service-cta-row a,
    body.page-service .service-cta-row a {
        width: 100% !important;
        text-align: center !important;
        box-sizing: border-box;
    }
    .page-template-page-service .service-cta-box,
    body.page-service .service-cta-box {
        padding: 1.5rem !important;
    }
    .page-template-page-service .service-hero-sidebar,
    body.page-service .service-hero-sidebar {
        padding: 1.5rem !important;
        min-width: 0;
    }

    /* Offerings page mobile */
    .offering-hero {
        padding: 2.5rem 0 !important;
    }
    .offering-hero-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    .offering-hero-grid h1 {
        font-size: 1.85rem !important;
    }
    .offering-hero-grid h2 {
        font-size: 1.35rem !important;
    }
    .offering-hero-grid ul {
        margin-bottom: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section h1 {
        font-size: 1.75rem !important;
    }
    
    .section-header h2 {
        font-size: 1.75rem !important;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .services-section,
    .cta-section {
        padding: 3rem 0;
    }

    /* Knowledge Hub small mobile */
    .page-template-page-knowledge-hub .page-header {
        padding: 2.5rem 0 !important;
    }
    .page-template-page-knowledge-hub .knowledge-section {
        padding: 0 0 2rem !important;
    }

    /* Contact Page (small mobile) */
    .page-template-page-contact section {
        padding: 3rem 0 !important;
    }
    .page-template-page-contact .page-header {
        padding: 2rem 0 !important;
    }
    .page-template-page-contact .page-header h1 {
        font-size: 1.75rem !important;
    }
    .page-template-page-contact #contact-form {
        padding: 1.25rem !important;
    }
    .page-template-page-contact #contact-form button[type="submit"] {
        font-size: 1rem;
    }
    .page-template-page-contact .page-header .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Knowledge Hub (small mobile) */
    .page-template-page-knowledge-hub .knowledge-hub-header-card {
        padding: 1.5rem 1rem !important;
    }
    .page-template-page-knowledge-hub .knowledge-hub-header h1 {
        font-size: 1.5rem !important;
    }

    /* Offerings (small mobile) */
    .offering-hero-grid h1 {
        font-size: 1.6rem !important;
    }
    .offering-hero .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Service page (small mobile) */
    .page-template-page-service .site-main > section,
    body.page-service .site-main > section {
        padding: 2rem 0 !important;
    }
    .page-template-page-service .services-hero h1,
    body.page-service .services-hero h1 {
        font-size: 1.6rem !important;
    }
    .page-template-page-service .container h2,
    body.page-service .container h2 {
        font-size: 1.6rem !important;
    }
}

/* ==========================================================================
   Form message & animation styles (moved from main.js for performance)
   ========================================================================== */
#form-message {
    text-align: center;
}
#form-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}
#form-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}
.fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
