/*
 * KCdesi Custom Stylesheet
 * Replaces Appearance > Customize > Additional CSS
 * Location: /wp-content/themes/[child-theme]/assets/css/custom.css
 */

@import url('https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@2.44.0/tabler-icons.min.css');

/* ----------------------------------------------------------
   FIX 1: Header logo — constrain to compact size
   Problem: Logo rendering at 585×172px (full natural size)
   ---------------------------------------------------------- */

.site-header .custom-logo {
    max-height: 52px;
    width: auto !important;
    height: auto !important;
    display: block;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Hide the redundant tagline under the logo in the header */
.site-branding .site-tagline {
    display: none;
}

/* Hide the separate site-title text span if logo image is present */
.custom-logo-link + div .site-title {
    display: none;
}


/* ----------------------------------------------------------
   FIX 2: Footer — social link buttons visibility
   Problem: Text color rgb(26,11,48) — near-black on dark bg
   ---------------------------------------------------------- */

.site-footer .social-link {
    color: rgba(255, 255, 255, 0.88) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

.site-footer .social-link:hover {
    color: #ffffff !important;
    background: rgba(232, 101, 26, 0.25) !important;
    border-color: #E8651A !important;
}

/* Footer column headings */
.site-footer .footer-col h4,
.site-footer .footer-nav-title,
.site-footer h4 {
    color: #ffffff !important;
}

/* Footer navigation links */
.site-footer .footer-nav a,
.site-footer .footer-links a,
.site-footer nav a,
.site-footer ul li a,
.site-footer a:not(.social-link) {
    color: rgba(255, 255, 255, 0.72) !important;
    text-decoration: none;
}

.site-footer a:not(.social-link):hover {
    color: #E8651A !important;
}

/* Footer brand tagline and about text */
.site-footer .fl-tagline,
.site-footer .fl-about,
.site-footer p {
    color: rgba(255, 255, 255, 0.65) !important;
}

/* Footer bottom bar text */
.footer-bottom,
.footer-bottom p,
.footer-bottom a {
    color: rgba(255, 255, 255, 0.5) !important;
}

.footer-bottom a:hover {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Admin bar + fixed header offset */
.admin-bar .site-header {
    top: 32px;
}

.admin-bar main,
.admin-bar #main,
.admin-bar .site-main {
    padding-top: 96px;
}

/* ── Tagline: nuclear specificity to override any conflicting rule ── */
body.home .site-header .site-tagline,
body .site-header span.site-tagline,
html body .site-tagline {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
}

/* ── Mobile fixes (below 768px) ── */
@media (max-width: 767px) {

    /* Header always white on mobile, never transparent */
    .site-header {
        background: #ffffff !important;
    }

    /* Hamburger — visible, teal colored, large tap target */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
        background: transparent !important;
        border: none !important;
        color: #1C6B5A !important;
        cursor: pointer;
    }

    /* Hamburger bars — make sure they're dark/teal not invisible */
    .menu-toggle .bar,
    .menu-toggle span,
    .menu-toggle i {
        background-color: #1C6B5A !important;
        color: #1C6B5A !important;
    }

    /* Search icon — bigger tap target */
    .astm-search-menu a,
    nav .search-icon,
    .header-actions .search-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        font-size: 20px !important;
    }

    /* Search SVG icon inside nav */
    .astm-search-menu svg {
        width: 22px !important;
        height: 22px !important;
    }

    /* Hide desktop nav items on mobile, show only when toggled */
    nav.nav-primary > ul {
        display: none;
    }

    nav.nav-primary.toggled > ul,
    nav.nav-primary > ul.toggled {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
        padding: 8px 0;
        z-index: 999;
    }

    nav.nav-primary.toggled > ul li a,
    nav.nav-primary > ul.toggled li a {
        display: block;
        padding: 12px 20px;
        font-size: 15px;
        color: #1a1a1a !important;
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    /* Admin bar offset on mobile */
    .admin-bar .site-header {
        top: 46px;
    }
}

/* ----------------------------------------------------------
   Single post — Featured image
   ---------------------------------------------------------- */

.kcdesi-featured-image {
    float: left;
    width: 35%;
    max-width: none;
    margin: 4px 24px 18px 0;
    box-sizing: border-box;
}

.kcdesi-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

@media (max-width: 767px) {
    .kcdesi-featured-image {
        float: none;
        width: 100%;
        margin: 0 0 16px 0;
    }
}

/* ----------------------------------------------------------
   Single post — Editorial excerpt box
   ---------------------------------------------------------- */

.post-excerpt {
    position: relative;
    width: 72%;
    margin: 20px auto 32px;
    padding: 28px 36px 28px 44px;
    background: #FFF8F0;
    border-left: 5px solid #E8651A;
    border-radius: 0 10px 10px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    text-align: left;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-style: italic;
    color: #3A3A3A;
    line-height: 1.8;
}

.post-excerpt::before {
    content: '\201C';
    position: absolute;
    top: -10px;
    left: 12px;
    font-size: 5rem;
    font-family: 'Playfair Display', Georgia, serif;
    color: #E8651A;
    opacity: 0.25;
    line-height: 1;
    pointer-events: none;
}

@media (max-width: 767px) {
    .post-excerpt {
        width: 100%;
        padding: 22px 20px 22px 28px;
        font-size: 0.97rem;
    }
}

/* ----------------------------------------------------------
   Single post — CTA cards
   ---------------------------------------------------------- */

.post-cta-section {
    margin: 48px 0 16px;
    padding-top: 32px;
    border-top: 0.5px solid rgba(0,0,0,.1);
}

.post-cta-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #aaa;
    margin: 0 0 16px;
}

.post-cta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.post-cta-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,.09);
    border-radius: 12px;
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.post-cta-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 2px;
    flex-shrink: 0;
}

.post-cta-card__icon--orange { background: #FEF0E7; color: #c95512; }
.post-cta-card__icon--teal   { background: #E1F5EE; color: #0F6E56; }
.post-cta-card__icon--indigo { background: #EEEDFE; color: #534AB7; }

.post-cta-card h4 {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.3;
}

.post-cta-card p {
    font-size: 13px;
    color: #666;
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

.post-cta-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all .15s;
}

.post-cta-card__btn--primary {
    background: #1C6B5A;
    color: #fff !important;
    border: 1px solid #1C6B5A;
}
.post-cta-card__btn--primary:hover {
    background: #154f42;
    border-color: #154f42;
}

.post-cta-card__btn--outline {
    background: #f5f5f5;
    color: #333 !important;
    border: 1px solid rgba(0,0,0,.12);
}
.post-cta-card__btn--outline:hover {
    background: #ebebeb;
}

@media (max-width: 767px) {
    .post-cta-grid {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------------------------
   Events page — Magazine cards + timeline
   ---------------------------------------------------------- */

.kcd-events-wrap { width: 100%; }

.kcd-group { margin-bottom: 36px; }

.kcd-group-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #999;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ede9e2;
}

@media (min-width: 768px) {
    .kcd-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: start;
    }
    .kcd-group-label {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }
}

.kcd-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    border: 1px solid #f0ede8;
    transition: transform .2s ease, box-shadow .2s ease;
    margin-bottom: 16px;
}
.kcd-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0,0,0,.1);
}
@media (min-width: 768px) {
    .kcd-card { margin-bottom: 0; }
}

.kcd-card-header {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: #1C6B5A;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 10px;
}

.kcd-card-img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.kcd-img-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.45) 0%, rgba(0,0,0,.08) 70%);
}

.kcd-date-badge {
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,.93);
    border-radius: 8px;
    padding: 5px 10px;
    text-align: center;
    min-width: 44px;
}
.kcd-day {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: #111;
    line-height: 1;
}
.kcd-mon {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #666;
    margin-top: 2px;
}

.kcd-card-body { padding: 14px 16px 16px; }

.kcd-title {
    font-size: 16px;
    line-height: 1.4;
    margin: 0 0 8px;
    color: #1a1a1a;
    font-weight: 600;
}
.kcd-title a { color: inherit; text-decoration: none; }
.kcd-title a:hover { color: #1C6B5A; }

.kcd-excerpt {
    font-size: 12px;
    color: #888;
    line-height: 1.55;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kcd-card-footer { display: flex; justify-content: flex-end; }

.kcd-cta {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #fff !important;
    background: #1C6B5A;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background .15s ease;
}
.kcd-cta:hover {
    background: #154f42;
    color: #fff !important;
}

.kcd-no-events {
    text-align: center;
    color: #aaa;
    padding: 60px 0;
    font-size: 15px;
}
.kcd-no-events a { color: #1C6B5A; }