/*
Theme Name:     Joofda Child
Theme URI:      https://joofda.com
Description:     Bespoke Divi child theme for Joofda Facility Management & Labour Consult.
                 Carries the full Joofda design system — navy + green on Inter —
                 as design tokens, reusable components, security hardening,
                 accessibility features and a floating WhatsApp CTA.
Author:         Joofda Facility Management & Labour Consult
Template:       Divi
Version:        1.0.0
License:        Private
Text Domain:    joofda-child
*/

/* ============================================================
   1. DESIGN TOKENS  —  change these, the whole site follows
   ============================================================ */
:root {
    /* Brand */
    --brand-blue:      #0F4C81;   /* primary — corporate navy-blue */
    --brand-blue-mid:  #1A6AAF;   /* gradient / hover blue */
    --brand-blue-deep: #0C2A4A;   /* deep bands, HSE section */
    --brand-green:     #2ECC71;   /* accent — action green */
    --brand-green-dk:  #27AE60;   /* hover green */
    --brand-dark:      #0F172A;   /* near-black slate, footers/contact */
    --brand-darker:    #050A14;   /* footer base */

    /* Neutrals */
    --bg-light:  #F8FAFC;
    --text-main: #334155;
    --text-lite: #64748B;
    --line:      #E2E8F0;
    --white:     #FFFFFF;

    /* Effects */
    --card-shadow: 0 20px 25px -5px rgba(0,0,0,.05), 0 10px 10px -5px rgba(0,0,0,.01);
    --card-lift:   0 25px 50px -12px rgba(0,0,0,.10);
    --radius:      14px;
    --radius-lg:   20px;
    --ease:        all .3s cubic-bezier(.4,0,.2,1);
    --maxw:        1180px;
}

/* ============================================================
   2. BASE / TYPOGRAPHY
   ============================================================ */
body,
body.et-db #et-boc .et-l,
.et_pb_text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-main);
    line-height: 1.7;
}

h1, h2, h3, h4, h5,
.et_pb_module h1, .et_pb_module h2, .et_pb_module h3, .et_pb_module h4 {
    font-family: 'Inter', sans-serif;
    color: var(--brand-dark);
    font-weight: 800;
    letter-spacing: -.5px;
    line-height: 1.2;
}

h1 { font-size: clamp(2.6rem, 4.5vw, 4.2rem); letter-spacing: -2px; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem);   letter-spacing: -1px; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

a { transition: var(--ease); }

/* Kill Divi's default section padding drift; our modules control spacing */
.et_pb_row { max-width: var(--maxw); }

/* ============================================================
   3. EYEBROW + SECTION HEADERS
   ============================================================ */
.joofda-eyebrow p,
.joofda-eyebrow {
    color: var(--brand-green);
    font-weight: 700;
    text-transform: uppercase;
    font-size: .78rem;
    letter-spacing: 3px;
    margin: 0 0 .3rem;
}

.joofda-lead p {
    color: var(--text-lite);
    font-size: 1.06rem;
    line-height: 1.75;
}

/* On dark sections, invert */
.joofda-on-dark h1, .joofda-on-dark h2,
.joofda-on-dark h3, .joofda-on-dark h4 { color: #fff; }
.joofda-on-dark .joofda-lead p { color: rgba(255,255,255,.68); }

/* ============================================================
   4. BUTTONS
   ============================================================ */
.joofda-btn-blue.et_pb_button,
.joofda-btn-blue .et_pb_button {
    background: var(--brand-blue) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    letter-spacing: .3px;
    padding: 15px 32px !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.1);
    transition: var(--ease);
}
.joofda-btn-blue.et_pb_button:hover,
.joofda-btn-blue .et_pb_button:hover {
    background: var(--brand-green) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.15);
    padding: 15px 32px !important;
}

.joofda-btn-green.et_pb_button {
    background: var(--brand-green) !important;
    color: var(--brand-dark) !important;
    border: none !important;
    border-radius: 50px !important;
    font-weight: 800 !important;
    padding: 15px 32px !important;
    box-shadow: 0 8px 20px rgba(46,204,113,.28);
}
.joofda-btn-green.et_pb_button:hover {
    background: var(--brand-green-dk) !important;
    transform: translateY(-2px);
    padding: 15px 32px !important;
}

.joofda-btn-ghost.et_pb_button {
    background: transparent !important;
    color: #fff !important;
    border: 1.5px solid rgba(255,255,255,.25) !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    padding: 15px 32px !important;
}
.joofda-btn-ghost.et_pb_button:hover {
    border-color: #fff !important;
    background: rgba(255,255,255,.08) !important;
    padding: 15px 32px !important;
}

/* ============================================================
   5. HERO
   ============================================================ */
.joofda-hero { position: relative; overflow: hidden; }
.joofda-hero::before {   /* blueprint rule lines */
    content: '';
    position: absolute; inset: 0;
    background-image: repeating-linear-gradient(0deg,
        transparent 0 47px, rgba(255,255,255,.022) 47px 48px);
    pointer-events: none; z-index: 0;
}
.joofda-hero::after {    /* green left-edge accent */
    content: '';
    position: absolute; left: 0; top: 15%; bottom: 15%;
    width: 3px; background: var(--brand-green);
    border-radius: 0 2px 2px 0; z-index: 2; pointer-events: none;
}
.joofda-hero .et_pb_row { position: relative; z-index: 2; }

.joofda-hero__eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    color: rgba(255,255,255,.5);
    font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 3px;
    margin-bottom: 1.6rem;
}
.joofda-hero__eyebrow .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--brand-green); flex-shrink: 0;
}
.joofda-hero__accent {
    background: var(--brand-green); color: var(--brand-dark);
    padding: 2px 12px 5px; font-weight: 800;
    box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.joofda-hero__trust {
    display: flex; flex-wrap: wrap; gap: 1.6rem;
    margin-top: 2.2rem; padding-top: 1.8rem;
    border-top: 1px solid rgba(255,255,255,.1);
}
.joofda-hero__trust span {
    display: inline-flex; align-items: center; gap: 8px;
    color: rgba(255,255,255,.55);
    font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1.5px;
}
.joofda-hero__trust i { color: var(--brand-green); }

/* Floating stat badge that can sit in the hero right column */
.joofda-hero__badge {
    display: inline-flex; align-items: center; gap: 1.2rem;
    background: var(--brand-green); color: var(--brand-dark);
    padding: 1rem 1.5rem; border-radius: 6px;
    box-shadow: 0 8px 28px rgba(46,204,113,.4);
}
.joofda-hero__badge b { font-size: 3rem; font-weight: 900; line-height: 1; letter-spacing: -2px; }
.joofda-hero__badge span {
    font-size: .8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; line-height: 1.4;
    border-left: 2px solid rgba(15,23,42,.25); padding-left: 1rem;
}

/* ============================================================
   6. STAT STRIP (dark band, 4 stats)
   ============================================================ */
.joofda-stat { text-align: center; padding: 1.2rem 1rem; }
.joofda-stat i { font-size: 1.7rem; color: var(--brand-green); display: block; margin-bottom: .6rem; }
.joofda-stat b { display: block; font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: .2rem; }
.joofda-stat span { font-size: .76rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: 1px; }

/* ============================================================
   7. CARDS  (vision/mission, generic 3-up)
   ============================================================ */
.joofda-card {
    background: var(--white);
    padding: 2.6rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0,0,0,.03);
    position: relative; overflow: hidden;
    height: 100%;
    transition: var(--ease);
}
.joofda-card::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 4px; background: var(--brand-green);
    transform: scaleX(0); transform-origin: left; transition: transform .4s ease;
}
.joofda-card:hover::before { transform: scaleX(1); }
.joofda-card:hover { transform: translateY(-8px); box-shadow: var(--card-lift); }
.joofda-card__ic {
    font-size: 1.5rem; color: var(--brand-blue);
    background: rgba(15,76,129,.1);
    width: 58px; height: 58px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.4rem;
}
.joofda-card h3 { font-size: 1.35rem; margin-bottom: .8rem; }
.joofda-card h4 { font-size: 1.15rem; margin-bottom: .6rem; }
.joofda-card p  { color: var(--text-lite); font-size: .95rem; margin: 0; }

/* ============================================================
   8. SERVICE ROW  (alternating text / image)
   ============================================================ */
.joofda-svc__tag {
    display: inline-block;
    background: rgba(15,76,129,.1); color: var(--brand-blue);
    font-size: .74rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 2px; padding: 6px 14px; border-radius: 50px;
    margin-bottom: 1.1rem;
}
.joofda-svc h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1rem; }
.joofda-svc > p { color: var(--text-lite); margin-bottom: 1.6rem; }
.joofda-svc__feats {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    margin-bottom: 1.8rem; list-style: none; padding: 0;
}
.joofda-svc__feats li {
    display: flex; align-items: flex-start; gap: 10px;
    font-weight: 600; font-size: .9rem; color: var(--brand-dark);
}
.joofda-svc__feats li i { color: var(--brand-green); font-size: .9rem; margin-top: 4px; flex-shrink: 0; }
.joofda-svc__link {
    color: var(--brand-blue); font-weight: 700; text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px; transition: gap .3s, color .3s;
}
.joofda-svc__link:hover { gap: 14px; color: var(--brand-green); }
.joofda-svc__img { border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0,0,0,.22); }
.joofda-svc__img img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   9. STRENGTH / FEATURE GRID  (small icon cards)
   ============================================================ */
.joofda-fgrid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.8rem;
}
.joofda-fitem {
    background: var(--white); padding: 2.2rem 1.8rem;
    border-radius: var(--radius); box-shadow: var(--card-shadow);
    border: 1px solid rgba(0,0,0,.04); transition: var(--ease);
}
.joofda-fitem:hover { transform: translateY(-6px); box-shadow: var(--card-lift); }
.joofda-fitem__ic {
    width: 52px; height: 52px; border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-mid));
    display: flex; align-items: center; justify-content: center; margin-bottom: 1.2rem;
}
.joofda-fitem__ic i { color: #fff; font-size: 1.3rem; }
.joofda-fitem h4 { font-size: 1.08rem; margin-bottom: .5rem; }
.joofda-fitem p  { color: var(--text-lite); font-size: .9rem; margin: 0; }

/* ============================================================
   10. PROFESSIONAL / ADVISORY GRID  (numbered discipline cards)
   ============================================================ */
.joofda-pro {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2.2rem 2rem;
    height: 100%;
    position: relative;
    transition: var(--ease);
    overflow: hidden;
}
.joofda-pro::after {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: var(--brand-blue);
    transform: scaleY(0); transform-origin: top; transition: transform .4s ease;
}
.joofda-pro:hover { border-color: transparent; box-shadow: var(--card-lift); transform: translateY(-6px); }
.joofda-pro:hover::after { transform: scaleY(1); }
.joofda-pro__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.joofda-pro__ic {
    width: 54px; height: 54px; border-radius: 12px; flex-shrink: 0;
    background: rgba(15,76,129,.09); color: var(--brand-blue);
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.joofda-pro__no {
    font-size: .72rem; font-weight: 800; letter-spacing: 2px;
    color: var(--brand-green); text-transform: uppercase;
}
.joofda-pro h4 { font-size: 1.2rem; margin: .1rem 0 0; }
.joofda-pro > p { color: var(--text-lite); font-size: .93rem; margin: 0 0 1rem; }
.joofda-pro ul { list-style: none; padding: 0; margin: 0; }
.joofda-pro ul li {
    display: flex; align-items: flex-start; gap: 9px;
    font-size: .88rem; color: var(--text-main); margin-bottom: .5rem;
}
.joofda-pro ul li i { color: var(--brand-green); font-size: .82rem; margin-top: 4px; flex-shrink: 0; }

/* ============================================================
   11. HSE  (dark section with objective list + pillars)
   ============================================================ */
.joofda-hse__list { list-style: none; padding: 0; margin: 0 0 2rem; }
.joofda-hse__list li {
    display: flex; align-items: flex-start; gap: 12px; margin-bottom: 1rem;
    color: rgba(255,255,255,.82); font-size: .95rem;
}
.joofda-hse__list li i { color: var(--brand-green); margin-top: 4px; flex-shrink: 0; }
.joofda-hse__pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.joofda-hse__pillar {
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px; padding: 1.2rem;
}
.joofda-hse__pillar i { color: var(--brand-green); font-size: 1.3rem; display: block; margin-bottom: .5rem; }
.joofda-hse__pillar span { font-size: .9rem; font-weight: 600; color: rgba(255,255,255,.9); }
.joofda-hse__img { border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 30px 60px -15px rgba(0,0,0,.5); position: relative; }
.joofda-hse__img img { width: 100%; height: 100%; object-fit: cover; }
.joofda-hse__badge {
    position: absolute; bottom: 24px; left: 24px;
    background: var(--brand-green); color: var(--brand-dark);
    font-weight: 800; font-size: .82rem; padding: 11px 18px; border-radius: 10px;
    display: inline-flex; align-items: center; gap: 8px;
}

/* ============================================================
   12. SECTOR CARDS
   ============================================================ */
.joofda-sector {
    border: 2px solid var(--line); border-radius: var(--radius);
    padding: 2.4rem 1.5rem; text-align: center; transition: var(--ease); height: 100%;
}
.joofda-sector:hover { border-color: var(--brand-blue); transform: translateY(-6px); box-shadow: 0 20px 40px -10px rgba(15,76,129,.12); }
.joofda-sector__ic {
    width: 60px; height: 60px; border-radius: 14px; margin: 0 auto 1.1rem;
    background: var(--bg-light); display: flex; align-items: center; justify-content: center; transition: var(--ease);
}
.joofda-sector__ic i { font-size: 1.5rem; color: var(--brand-blue); transition: var(--ease); }
.joofda-sector:hover .joofda-sector__ic { background: var(--brand-blue); }
.joofda-sector:hover .joofda-sector__ic i { color: #fff; }
.joofda-sector h4 { font-size: .96rem; line-height: 1.4; margin: 0; }

/* ============================================================
   13. MATERIALS / PRICE-STYLE TABLE
   ============================================================ */
.joofda-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--card-shadow); }
.joofda-table th { background: var(--brand-blue); color: #fff; text-align: left; padding: 16px 20px; font-size: .82rem; text-transform: uppercase; letter-spacing: 1px; }
.joofda-table td { padding: 15px 20px; border-top: 1px solid var(--line); font-size: .95rem; color: var(--text-main); }
.joofda-table tr:hover td { background: var(--bg-light); }

/* ============================================================
   14. FAQ
   ============================================================ */
.joofda-faq { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.7rem; margin-bottom: 1rem; background: #fff; }
.joofda-faq h4 { font-size: 1.08rem; margin: 0 0 .5rem; display: flex; gap: 10px; }
.joofda-faq h4 i { color: var(--brand-green); flex-shrink: 0; }
.joofda-faq p { color: var(--text-lite); font-size: .94rem; margin: 0; }

/* ============================================================
   15. STEP / PROCESS
   ============================================================ */
.joofda-step { display: flex; gap: 1.4rem; padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.joofda-step:last-child { border-bottom: none; }
.joofda-step__n {
    width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%;
    background: var(--brand-blue); color: #fff; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.joofda-step h4 { font-size: 1.1rem; margin: 0 0 .3rem; }
.joofda-step p { color: var(--text-lite); font-size: .93rem; margin: 0; }

/* ============================================================
   16. CTA BAND
   ============================================================ */
.joofda-cta { background: var(--brand-dark); position: relative; overflow: hidden; }
.joofda-cta::after {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(var(--brand-green) 1px, transparent 1px);
    background-size: 30px 30px; opacity: .04; pointer-events: none;
}
.joofda-cta .et_pb_row { position: relative; z-index: 2; }

/* ============================================================
   17. CONTACT ROWS
   ============================================================ */
.joofda-contact-row { display: flex; align-items: flex-start; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.joofda-contact-row:last-child { border-bottom: none; }
.joofda-contact-row i { color: var(--brand-blue); font-size: 1.2rem; margin-top: 3px; }
.joofda-contact-row b { display: block; color: var(--brand-dark); font-size: .95rem; }
.joofda-contact-row span, .joofda-contact-row a { color: var(--text-lite); font-size: .94rem; text-decoration: none; }
.joofda-contact-row a:hover { color: var(--brand-green); }

/* ============================================================
   18. FORM WRAP  (WPForms styling)
   ============================================================ */
.joofda-form-wrap .wpforms-field-label { font-weight: 600 !important; font-size: .82rem !important; color: var(--brand-dark) !important; text-transform: uppercase; letter-spacing: .5px; }
.joofda-form-wrap input[type=text],
.joofda-form-wrap input[type=email],
.joofda-form-wrap input[type=tel],
.joofda-form-wrap select,
.joofda-form-wrap textarea {
    border: 2px solid var(--line) !important; border-radius: 10px !important;
    background: var(--bg-light) !important; padding: 14px 16px !important;
    font-family: 'Inter', sans-serif !important; font-size: 1rem !important;
}
.joofda-form-wrap input:focus,
.joofda-form-wrap select:focus,
.joofda-form-wrap textarea:focus {
    border-color: var(--brand-blue) !important; background: #fff !important;
    box-shadow: 0 0 0 4px rgba(15,76,129,.1) !important; outline: none !important;
}
.joofda-form-wrap .wpforms-submit {
    background: var(--brand-blue) !important; color: #fff !important;
    border: none !important; border-radius: 12px !important;
    padding: 16px 40px !important; font-weight: 700 !important; font-size: 1.02rem !important;
    width: 100%; transition: var(--ease);
}
.joofda-form-wrap .wpforms-submit:hover { background: var(--brand-green) !important; }

/* ============================================================
   19. PAGE HERO  (inner pages)
   ============================================================ */
.joofda-page-hero { position: relative; overflow: hidden; }
.joofda-page-hero::after {
    content: ''; position: absolute; left: 0; top: 25%; bottom: 25%;
    width: 3px; background: var(--brand-green); z-index: 2;
}

/* ============================================================
   20. FOOTER  (Divi footer overrides — optional if using theme footer)
   ============================================================ */
#main-footer { background: var(--brand-darker); }
#main-footer a:hover { color: var(--brand-green) !important; }
#footer-bottom { background: #04070f; }

/* ============================================================
   21. NAV / HEADER
   ============================================================ */
#main-header { box-shadow: 0 1px 0 rgba(0,0,0,.06); }
#top-menu a { font-weight: 500; }
.et_pb_button.joofda-nav-cta { border-radius: 50px !important; }

/* ============================================================
   22. FLOATING WHATSAPP CTA
   ============================================================ */
.joofda-wa {
    position: fixed; bottom: 26px; right: 26px; z-index: 9999;
    display: inline-flex; align-items: center; gap: 10px;
    background: #25D366; color: #fff !important;
    padding: 14px 22px; border-radius: 50px;
    font-weight: 700; font-size: .95rem; text-decoration: none;
    box-shadow: 0 10px 24px rgba(37,211,102,.35);
    transition: var(--ease);
}
.joofda-wa:hover { transform: scale(1.05); box-shadow: 0 15px 30px rgba(37,211,102,.45); }
.joofda-wa i { font-size: 1.4rem; }

/* ============================================================
   23. ACCESSIBILITY
   ============================================================ */
.joofda-skip {
    position: absolute; left: -9999px; top: 0; z-index: 100000;
    background: var(--brand-blue); color: #fff; padding: 12px 20px; border-radius: 0 0 8px 0;
}
.joofda-skip:focus { left: 0; }
a:focus, button:focus, input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-green); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ============================================================
   24. RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
    .joofda-svc__feats { grid-template-columns: 1fr; }
    .joofda-hse__pillars { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
    h1 { font-size: 2.3rem; letter-spacing: -1px; }
    .joofda-wa span { display: none; }
    .joofda-wa { padding: 15px; border-radius: 50%; }
    .joofda-hero__trust { justify-content: flex-start; }
    .joofda-hero__badge b { font-size: 2.2rem; }
}
