/*
Theme Name: Apex Teletherapy Child
Theme URI: https://www.apextxsolutions.com
Author: Your Name Here
Author URI: https://yourwebsite.com
Description: Child theme for Apex Teletherapy Base. Make all your customizations — colors, fonts, layout tweaks, component overrides — here. The parent theme will handle all baseline styles and functionality.
Template: apex-parent-theme
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apex-child
*/

/*
 * ============================================================
 *  APEX CHILD THEME — Your Customization Workspace
 * ============================================================
 *
 *  HOW THIS WORKS:
 *  ─────────────────────────────────────────────────────────
 *  The parent theme (apex-parent-theme) loads first and
 *  provides all base styles. This file is loaded after,
 *  so anything you write here will override the parent.
 *
 *  BRAND COLOR PALETTE (from Apex Therapy Solutions logo):
 *  ─────────────────────────────────────────────────────────
 *
 *  --color-orange:       #F47B20   Peak gradient / "THERAPY SOLUTIONS" text
 *  --color-orange-dark:  #C95F0A   Deeper orange for hover states
 *  --color-orange-light: #FBAC5C   Soft orange for backgrounds / tints
 *  --color-red:          #D94030   Right mountain face / warm accent
 *  --color-teal:         #3AAFB9   Left river/valley — cool contrast accent
 *  --color-teal-dark:    #1F7F89   Deeper teal for hover / borders
 *  --color-purple:       #7B3FA0   Lower-right mountain — supporting accent
 *  --color-charcoal:     #2E2E38   "APEX" text — primary dark / body text
 *  --color-charcoal-mid: #4A4A58   Softer dark for secondary text
 *  --color-cream:        #FDF8F2   Off-white page background
 *  --color-cream-dark:   #F2EBE0   Section alternating background
 *
 * ============================================================
 */

/* ── STEP 1: Brand color variables ───────────────────────── */
:root {
  /* ── Logo-derived brand palette ── */
  --color-orange:        #F47B20;
  --color-orange-dark:   #C95F0A;
  --color-orange-light:  #FBAC5C;
  --color-red:           #D94030;
  --color-teal:          #3AAFB9;
  --color-teal-dark:     #1F7F89;
  --color-teal-light:    #A8DDE2;
  --color-purple:        #7B3FA0;
  --color-charcoal:      #2E2E38;
  --color-charcoal-mid:  #4A4A58;
  --color-cream:         #FDF8F2;
  --color-cream-dark:    #F2EBE0;

  /* ── Semantic role mappings ── */
  /* Primary action color: orange (matches logo "THERAPY SOLUTIONS") */
  --color-primary:       var(--color-orange);
  --color-primary-dark:  var(--color-orange-dark);
  --color-primary-light: var(--color-orange-light);

  /* Secondary / cool accent: teal (matches logo river) */
  --color-secondary:     var(--color-teal);
  --color-secondary-dark:var(--color-teal-dark);

  /* Page backgrounds */
  --color-bg:            var(--color-cream);
  --color-bg-alt:        var(--color-cream-dark);

  /* Text */
  --color-text:          var(--color-charcoal);
  --color-text-muted:    var(--color-charcoal-mid);

  /* Links */
  --color-link:          var(--color-orange);
  --color-link-hover:    var(--color-orange-dark);

  /* Borders / dividers */
  --color-border:        #D9CFC4;

  /* ── Legacy variable aliases ──────────────────────────────
   * If the parent theme uses --color-sage, --color-gold,
   * or --color-slate, remap them to new brand colors so
   * every parent component automatically re-skins.
   * ──────────────────────────────────────────────────────── */
  --color-sage:          var(--color-teal);
  --color-sage-dark:     var(--color-teal-dark);
  --color-sage-light:    var(--color-teal-light);
  --color-gold:          var(--color-orange);
  --color-slate:         var(--color-charcoal);
}


/* ── STEP 2: Global base overrides ───────────────────────── */

body {
  background-color: var(--color-cream);
  color: var(--color-charcoal);
}

a {
  color: var(--color-orange);
}

a:hover,
a:focus {
  color: var(--color-orange-dark);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-charcoal);
}

/* Buttons — primary */
.btn,
.button,
button[type="submit"],
input[type="submit"],
.wp-block-button__link {
  background-color: var(--color-orange) !important;
  border-color: var(--color-orange) !important;
  color: #fff !important;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
  background-color: var(--color-orange-dark) !important;
  border-color: var(--color-orange-dark) !important;
  color: #fff !important;
}

/* Buttons — secondary/outline */
.btn-secondary,
.button-secondary {
  background-color: transparent !important;
  border-color: var(--color-teal) !important;
  color: var(--color-teal) !important;
}

.btn-secondary:hover,
.button-secondary:hover {
  background-color: var(--color-teal) !important;
  color: #fff !important;
}

/* Accent / highlight color used by parent theme */
.accent,
.highlight,
.text-accent {
  color: var(--color-orange);
}

/* Section alternating backgrounds */
.bg-alt,
.section-alt,
.section--alt {
  background-color: var(--color-cream-dark);
}

/* Horizontal rules / dividers */
hr {
  border-color: var(--color-border);
}


/* ── STEP 3: Header ──────────────────────────────────────── */

.site-header,
#site-header {
  background-color: var(--color-cream) !important;
  border-bottom: 3px solid var(--color-orange);
  position: relative !important;
  top: auto !important;
  z-index: auto !important;
}

/* Header inner layout */
.site-header .header-inner {
  min-height: 150px;
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
}

/* Logo container */
.site-logo {
  flex: 0 0 auto;
}

/* Logo image — all selectors to beat WP inline attrs */
.site-logo .custom-logo,
.site-logo a img,
.custom-logo-link img {
  width: auto !important;
  max-width: 280px !important;
  height: auto !important;
  max-height: 150px !important;
  display: block;
}

/* Logo link — prevent stretching */
.custom-logo-link {
  display: inline-block !important;
  line-height: 0;
  max-width: 280px !important;
}

/* Navigation links */
.main-navigation a {
  color: var(--color-charcoal);
  transition: color 0.2s ease;
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a {
  color: var(--color-orange);
}

/* Nav underline / active indicator */
.main-navigation .current-menu-item > a::after,
.main-navigation a:hover::after {
  background-color: var(--color-orange);
}

/* Mobile toggle */
.menu-toggle span {
  background-color: var(--color-charcoal);
}

.menu-toggle:hover span {
  background-color: var(--color-orange);
}


/* ── STEP 4: Footer ──────────────────────────────────────── */

.site-footer,
#site-footer,
footer {
  background-color: var(--color-charcoal);
  color: var(--color-cream);
  border-top: 4px solid var(--color-orange);
}

.site-footer a,
footer a {
  color: var(--color-orange-light);
}

.site-footer a:hover,
footer a:hover {
  color: #fff;
}

.site-footer h3,
.site-footer h4,
footer h3,
footer h4 {
  color: var(--color-orange-light);
}


/* ── STEP 5: Split sections ──────────────────────────────── */

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: 520px;
}

.split-section > * {
  min-width: 0;
}

.split-section p:empty,
.split-section > p:empty {
  display: none;
}

.split-section.reverse {
  grid-template-columns: 1fr 1fr;
}

.split-section.reverse .split-content {
  order: -1;
  background: var(--color-cream-dark);
}

.split-section.reverse .split-image {
  order: 1;
}

.split-section .split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 1024px) {
  .split-section,
  .split-section.reverse {
    grid-template-columns: 1fr;
  }

  .split-section.reverse .split-content { order: 0; }
  .split-section.reverse .split-image  { order: 1; }

  .split-section .split-image {
    min-height: 300px;
  }
}


/* ── STEP 6: CTA / Banner sections ───────────────────────── */

.cta-banner,
.cta-section {
  background: linear-gradient(135deg, var(--color-orange) 0%, var(--color-charcoal) 100%);
  color: #fff;
}

.cta-banner h2,
.cta-section h2 {
  color: #fff;
}


/* ── STEP 7: Cards ───────────────────────────────────────── */

.card,
.service-card {
  border-top: 4px solid var(--color-orange);
  background: #fff;
}

.card:hover,
.service-card:hover {
  border-top-color: var(--color-teal);
  box-shadow: 0 8px 32px rgba(46, 46, 56, 0.12);
}

.card h3,
.service-card h3 {
  color: var(--color-charcoal);
}


/* ── STEP 8: About page — team bio ───────────────────────── */

.team-bio {
  display: grid;
  grid-template-columns: 580px 1fr;
  align-items: start;
  padding: var(--space-lg) 0;
}


/* ── STEP 9: Forms ───────────────────────────────────────── */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea,
select {
  border-color: var(--color-border);
  color: var(--color-charcoal);
  background: #fff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border-color: var(--color-orange);
  outline: 2px solid var(--color-orange-light);
  outline-offset: 0;
}

label {
  color: var(--color-charcoal-mid);
}


/* ── STEP 10: Responsive logo ────────────────────────────── */

@media (max-width: 1024px) {
  .site-header .header-inner {
    min-height: 100px;
  }

  .site-logo .custom-logo,
  .site-logo a img,
  .custom-logo-link img {
    max-width: 220px !important;
    max-height: 120px !important;
  }

  .custom-logo-link {
    max-width: 220px !important;
  }
}

@media (max-width: 768px) {
  .site-header .header-inner {
    min-height: 80px;
    padding: 8px 16px;
    flex-wrap: wrap;
  }

  .site-logo .custom-logo,
  .site-logo a img,
  .custom-logo-link img {
    max-width: 180px !important;
    max-height: 80px !important;
  }

  .custom-logo-link {
    max-width: 180px !important;
  }
}

@media (max-width: 480px) {
  .site-header .header-inner {
    min-height: 70px;
    padding: 6px 12px;
  }

  .site-logo .custom-logo,
  .site-logo a img,
  .custom-logo-link img {
    max-width: 150px !important;
    max-height: 65px !important;
  }

  .custom-logo-link {
    max-width: 150px !important;
  }
}


/* ── STEP 11: Your additional customizations go below ────── */
/*
 * Add component overrides, page-specific styles,
 * and new components here. Group by page or component.
 */
