/*
Theme Name: OODP
Theme URI: http://kuga.ca/
Author: Kuga K
Description: Custom OODP theme built with Tailwind CSS and ACF.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oodp
*/

/* ── Sticky footer — full-height content stretch ── */
html { height: 100%; scroll-behavior: smooth; }
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Roboto', sans-serif;
}
#page {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}
#content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}
footer { flex-shrink: 0; }

/* Per-template backgrounds fill the stretched #content */
.page-template-page-consultant-corner #content { background: #f4f4f4; }
.page-template-page-free-resources    #content { background: #3D3B52; }

/* ── Base typography ── */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Zilla Slab', serif;
}

/* ── Nav active underline (red) ── */
.nav-link { position: relative; padding-bottom: 4px; font-family: 'Zilla Slab', serif; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 100%; height: 3px;
    background: #C0392B;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s;
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

/* ── Dropdown ── */
.has-dropdown { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; left: 0;
    min-width: 200px;
    background: #1A6496;
    z-index: 200;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    list-style: none;
    padding: 0;
    margin: 0;
}
.has-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #fff;
    font-size: 13px;
    white-space: nowrap;
    text-decoration: none;
    font-family: 'Zilla Slab', serif;
}
.dropdown-menu a:hover { background: rgba(0,0,0,0.15); }

/* ── Zigzag border (blue, sits right below header) ── */
.zigzag-strip {
    height: 8px;
    background:
        linear-gradient(135deg, #fff 33.33%, transparent 33.33%) 0 0,
        linear-gradient(225deg, #fff 33.33%, transparent 33.33%) 0 0;
    background-color: #2980B9;
    background-size: 16px 8px;
    background-repeat: repeat-x;
}

/* ── Mobile menu ── */
#mobile-menu { display: none; list-style: none; padding: 0; margin: 0; }
#mobile-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 1rem 0;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
#mobile-menu a {
    display: block;
    padding: 10px 24px;
    color: #333;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    text-decoration: none;
    font-family: 'Zilla Slab', serif;
}
@media (min-width: 1024px) { #menu-toggle { display: none !important; } }
@media (max-width: 1023px) { #desktop-menu { display: none; } }

/* ── Back to top ── */
#back-to-top {
    position: fixed;
    bottom: 30px; right: 30px;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; }

/* ── Hero section ── */
.hero-section {
    position: relative;
    background-size: cover;
    background-position: center;
}
.hero-section .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

/* ── Service card hover ── */
.service-card { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.25);
}
.service-card-img { position: relative; }
.service-card-img img { transition: transform 0.35s ease; }
.service-card:hover .service-card-img img { transform: scale(1.06); }

/* ── Section divider line ── */
.section-divider {
    width: 60px; height: 3px;
    background: #C0392B;
    margin: 16px 0 24px;
}

/* ── Red service buttons ── */
.service-btn {
    display: block;
    background: #8B1A1A;
    color: #fff;
    text-align: center;
    padding: 18px 24px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 6px;
    transition: background 0.2s;
    text-decoration: none;
}
.service-btn:hover { background: #6B1A1A; color: #fff; }

/* ── Flip boxes (Resources page category cards) ── */
.flip-box {
    height: 260px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
@media (max-width: 767px) { .flip-box { height: 200px; } }
.flip-front, .flip-back {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    color: #fff;
}
.flip-front {
    background: #3D3B52;
    transform: translateY(0);
}
.flip-back {
    background: #C0392B;
    transform: translateY(100%);
    text-decoration: none;
}
.flip-box:hover .flip-front { transform: translateY(-100%); }
.flip-box:hover .flip-back  { transform: translateY(0); }
.flip-btn {
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.7);
    color: #fff;
    padding: 5px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ── Free Resources category tile grid responsive ── */
@media (max-width: 1023px) { .free-resources-grid { grid-template-columns: repeat(2,1fr) !important; } }
@media (max-width: 599px)  { .free-resources-grid { grid-template-columns: repeat(1,1fr) !important; } }

/* ── Logo grid (Partner / Related Organizations) — hover fade-in ── */
.logo-flip-box {
    height: 160px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.logo-flip-front, .logo-flip-back {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    transition: opacity 0.35s ease;
}
.logo-flip-front {
    background: #fff;
    opacity: 1;
}
.logo-flip-back {
    color: #fff;
    opacity: 0;
    text-decoration: none;
}
.logo-flip-box:hover .logo-flip-front { opacity: 0; }
.logo-flip-box:hover .logo-flip-back  { opacity: 1; }

/* ── Resource grid responsive ── */
@media (max-width: 1023px) { .resource-grid { grid-template-columns: repeat(2,1fr) !important; } }
@media (max-width: 599px)  { .resource-grid { grid-template-columns: repeat(2,1fr) !important; } }

/* ── About section responsive ── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 767px) { .about-grid { grid-template-columns: 1fr !important; } }

/* ── Resources page grid responsive ── */
.resources-page-grid { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 767px) { .resources-page-grid { grid-template-columns: 1fr !important; } }

/* ── Scroll fade-up ── */
.fade-up {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ──────────────────────────────────────────
   CONSULTANT CORNER
   ────────────────────────────────────────── */

/* Page layout: sidebar + main */
.cc-page {
    display: grid;
    grid-template-columns: 190px 1fr;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
}
@media (max-width: 767px) { .cc-page { grid-template-columns: 1fr; } }

/* Left sidebar */
.cc-sidebar {
    padding: 20px 12px;
    border-right: 1px solid #e0e0e0;
    background: #f7f7f7;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Category box — matches "OODP Operations" style */
.cc-sidebar-box {
    border: 2px solid #ccc;
    background: #e4e4e4;
    color: #444;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    padding: 14px 10px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.15s;
    font-family: 'Roboto', sans-serif;
    line-height: 1.4;
    width: 100%;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.cc-sidebar-box:hover {
    background: #C0392B;
    border-color: #C0392B;
    color: #fff;
    transform: translateX(3px);
}
.cc-sidebar-box.active {
    background: #C0392B;
    border-color: #C0392B;
    color: #fff;
    transform: translateX(3px);
}
.cc-sidebar-label { display: block; }
.cc-sidebar-count {
    display: inline-block;
    background: rgba(0,0,0,0.15);
    color: inherit;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    min-width: 22px;
}
.cc-sidebar-box.active .cc-sidebar-count,
.cc-sidebar-box:hover .cc-sidebar-count {
    background: rgba(255,255,255,0.25);
}

/* Main area */
.cc-main { padding: 28px 36px 48px; }

/* Header row */
.cc-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}
.cc-title {
    font-size: 26px;
    font-weight: 700;
    color: #2D2D2D;
    margin: 0;
    font-family: 'Zilla Slab', serif;
}
.cc-form-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #4BBFCF;
    color: #fff;
    padding: 10px 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}
.cc-form-btn:hover { background: #2980B9; color: #fff; }

/* Toolbar: search + view toggle */
.cc-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.cc-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}
.cc-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 13px;
    pointer-events: none;
}
.cc-search-input {
    width: 100%;
    border: 2px solid #e0e0e0;
    padding: 9px 14px 9px 36px;
    font-size: 13px;
    font-family: 'Roboto', sans-serif;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.cc-search-input:focus { border-color: #4BBFCF; }
.cc-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 4px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: color 0.15s;
}
.cc-search-clear:hover { color: #C0392B; }

/* View toggle buttons */
.cc-view-toggle { display: flex; gap: 2px; }
.cc-view-btn {
    background: #e8e8e8;
    border: none;
    padding: 9px 13px;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
}
.cc-view-btn:hover { background: #ddd; }
.cc-view-btn.active { background: #C0392B; color: #fff; }

/* Divider below toolbar */
.cc-divider {
    border: none;
    border-top: 2px solid #4BBFCF;
    margin-bottom: 8px;
}

/* Accordion */
.cc-accordion { margin-bottom: 3px; }
.cc-accordion-header {
    width: 100%;
    background: #C0392B;
    color: #fff;
    border: none;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: left;
    text-transform: uppercase;
    font-family: 'Roboto', sans-serif;
    transition: background 0.2s;
}
.cc-accordion-header:hover        { background: #a93226; }
.cc-accordion-header[aria-expanded="true"] { background: #96281B; }

.cc-check-icon { font-size: 16px; opacity: 0.85; flex-shrink: 0; }
.cc-cat-name   { flex: 1; }

/* Document count badge on accordion header */
.cc-accordion-count {
    background: rgba(255,255,255,0.2);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    letter-spacing: 0;
    flex-shrink: 0;
}

/* Chevron — rotates when open */
.cc-chevron {
    font-size: 13px;
    flex-shrink: 0;
    transition: transform 0.28s ease;
    opacity: 0.8;
}
.cc-accordion-header[aria-expanded="true"] .cc-chevron { transform: rotate(180deg); }

/* Accordion body */
.cc-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e8e8e8;
    border-top: none;
    background: #fff;
}

/* ── Grid view (default) ── */
.cc-docs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px 16px 8px;
}
@media (max-width: 1100px) { .cc-docs-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .cc-docs-grid { grid-template-columns: repeat(2, 1fr); } }

.cc-doc-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    padding: 10px 6px;
    gap: 8px;
    border-radius: 2px;
    transition: background 0.15s;
}
.cc-doc-link:hover { background: #f5f5f5; }
.cc-doc-icon  { font-size: 40px; display: block; flex-shrink: 0; }
.cc-doc-name  { font-size: 12px; color: #4BBFCF; line-height: 1.4; word-break: break-word; font-family: 'Roboto', sans-serif; }
.cc-doc-dl    { display: none; }

/* ── List view ── */
.is-list-view .cc-docs-grid {
    grid-template-columns: 1fr;
    gap: 1px;
    padding: 6px 0;
}
.is-list-view .cc-doc-link {
    flex-direction: row;
    text-align: left;
    padding: 11px 20px;
    gap: 14px;
    border-bottom: 1px solid #f2f2f2;
    border-radius: 0;
    align-items: center;
}
.is-list-view .cc-doc-link:hover { background: #fafafa; }
.is-list-view .cc-doc-icon { font-size: 20px; }
.is-list-view .cc-doc-name { flex: 1; font-size: 14px; color: #333; }
.is-list-view .cc-doc-dl   { display: flex; color: #4BBFCF; font-size: 14px; }

/* ── Sub-section accordion ── */
.cc-sub-accordion {
    border-top: 1px solid #f0f0f0;
    margin: 4px 0;
}
.cc-sub-header {
    width: 100%;
    background: #f8fafb;
    border: none;
    border-left: 3px solid #4BBFCF;
    padding: 12px 18px 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-align: left;
    font-family: 'Roboto', sans-serif;
    transition: background 0.15s;
}
.cc-sub-header:hover { background: #eef7f9; }
.cc-sub-header[aria-expanded="false"] { border-left-color: #ccc; background: #fafafa; }

.cc-subsection-icon {
    width: 20px; height: 20px;
    background: #4BBFCF;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
    border-radius: 2px;
    transition: background 0.15s;
}
.cc-sub-header[aria-expanded="false"] .cc-subsection-icon { background: #bbb; }

.cc-sub-count {
    background: #4BBFCF;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    transition: background 0.15s;
}
.cc-sub-header[aria-expanded="false"] .cc-sub-count { background: #ccc; }

.cc-sub-chevron {
    font-size: 11px;
    color: #aaa;
    margin-left: auto;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}
.cc-sub-header[aria-expanded="false"] .cc-sub-chevron { transform: rotate(-90deg); }

.cc-sub-body {
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cc-sub-body .cc-docs-grid { padding: 10px 16px 8px; }

/* ── Sort select ── */
.cc-sort-select {
    border: 2px solid #e0e0e0;
    padding: 8px 12px;
    font-size: 13px;
    font-family: 'Roboto', sans-serif;
    color: #555;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    height: 38px;
}
.cc-sort-select:focus { border-color: #4BBFCF; }

/* Archived section */
.cc-archived { padding: 0 0 12px; }
.cc-archived-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 8px;
    font-size: 12px;
    color: #888;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
}
.cc-archived-divider::before,
.cc-archived-divider::after { content: ''; flex: 1; border-top: 1px solid #ddd; }
.cc-archived-grid { background: #f5f5f5; padding: 8px 16px 12px !important; }
.cc-archived-grid .cc-doc-name { color: #999; }

/* Empty state */
.cc-empty { padding: 20px 16px; color: #bbb; font-size: 13px; font-style: italic; }

/* Lock link */
.cc-lock-link { color: #bbb; font-size: 12px; text-decoration: none; }
.cc-lock-link:hover { color: #C0392B; }

/* ── Testimonial slider ── */
.testimonial-track { transition: transform 0.4s ease; }

/* ── Contact Us — WPForms styled to sit on the blue panel (translucent
   white overlay, so it reads correctly on any background colour) ── */
.contact-form-panel {
    /* WPForms "Modern" markup reads these custom properties directly */
    --wpforms-field-border-style: none;
    --wpforms-field-border-size: 0px;
    --wpforms-field-background-color: rgba(255,255,255,0.13);
    --wpforms-field-text-color: rgba(255,255,255,0.9);
    --wpforms-label-color: rgba(255,255,255,0.9);
    --wpforms-button-background-color: #8B1A1A;
    --wpforms-button-text-color: #fff;
    --wpforms-button-border-radius: 999px;
    --wpforms-container-shadow-size-box-shadow: none;
}
/* Fallback overrides for older/Classic WPForms markup */
.contact-form-panel .wpforms-field-label { color: #fff; }
.contact-form-panel .wpforms-field-medium,
.contact-form-panel textarea.wpforms-field-medium {
    background: rgba(255,255,255,0.13);
    border: none;
    color: #fff;
}
.contact-form-panel input::placeholder,
.contact-form-panel textarea::placeholder { color: rgba(255,255,255,0.6); }
.contact-form-panel .wpforms-submit {
    background: #8B1A1A;
    color: #fff;
    border: none;
}
.contact-form-panel .wpforms-submit:hover { background: #6B1A1A; }

/* ── Stat counter ── */
.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: #C0392B;
}

/* ============================================================================
   Rounded (pill) buttons + soft shadow — applied sitewide
   Covers every button-style element in the theme: .btn-cta (the shared class
   used on plain inline-styled CTAs), flip-card "More" buttons, service
   buttons, WPForms submit, Consultant Corner form button, and the red/white
   CTA buttons used across the hero, text+image, and CTA banner sections
   (all share the "tracking-wide" utility class).
   TO REVERT: delete this block — everything returns to sharp corners / no shadow.
   ========================================================================= */
.btn-cta,
.flip-btn,
.service-btn,
.wpforms-submit,
.cc-form-btn,
a[class*="tracking-wide"] {
    border-radius: 999px !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-cta:hover,
.flip-btn:hover,
.service-btn:hover,
.cc-form-btn:hover,
a[class*="tracking-wide"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.24);
}
