/*
 * Java Energy Solutions
 * Theme Stylesheet
 * assets/css/style.css
 * ─────────────────────────────────────────────────────────────────────────────
 */


/* ═══════════════════════════════════════════════════════════════════════════
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ═══════════════════════════════════════════════════════════════════════════ */
body {
    background-color: #02050c;
}
:root {
    /* ── Brand Colors ── */
    --primary-green:       #f3b932;
    --primary-green-dark:  #408a56;
    --primary-green-light: #34d399;
    --accent-orange:       #e57424;
    --accent-blue:         #3498db;

    /* ── Backgrounds ── */
    --white-bg:       #ffffff;
    --gray-bg:        #f9fafb;
    --gray-surface:   #f3f4f6;
    --gray-elevated:  #e5e7eb;

    /* ── Text ── */
    --text-primary:   #111827;
    --text-secondary: #4b5563;
    --text-muted:     #6b7280;

    /* ── Border & Effects ── */
    --border-color:   #e5e7eb;
    --glow-color:     rgba(16, 185, 129, 0.3);
    --transition:     all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* ── Spacing ── */
    --section-py:     5rem;
    --container-px:   1.25rem;
    --radius-sm:      0.75rem;
    --radius-md:      1.25rem;
    --radius-lg:      2rem;
    --radius-xl:      3rem;

    /* ── Shadows ── */
    --shadow-sm:   0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md:   0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg:   0 10px 40px rgba(0,0,0,0.1);
    --shadow-green: 0 8px 30px rgba(16, 185, 129, 0.25);
}


/* ═══════════════════════════════════════════════════════════════════════════
   2. RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; }


/* ═══════════════════════════════════════════════════════════════════════════
   3. SCROLLBAR
   ═══════════════════════════════════════════════════════════════════════════ */

::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: var(--primary-green); border-radius: 10px; }


/* ═══════════════════════════════════════════════════════════════════════════
   4. TYPOGRAPHY UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--primary-green);
}

.section-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   5. NAVBAR
   ═══════════════════════════════════════════════════════════════════════════ */

/* .header {
    transition: var(--transition);
} */

/* .header.scrolled {
    box-shadow: var(--shadow-md);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
} */

/* Nav links */

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #408a56;
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover,
.nav-link.active {
    color: #408a56;
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdown */
.dropdown-menu {
    /* position: absolute;
    top: calc(100% + 1rem);
    left: 50%;
    transform: translateX(-50%);
    background: var(--white-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 230px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(8px);
    transition: var(--transition);
    z-index: 1100; */
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 1rem 1.2rem;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-align: left;
}

.dropdown-menu li a:hover {
    background: var(--gray-bg);
    color: #408a56;
    padding-left: 1.25rem;
}

/* Mobile toggle animation */
.mobile-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
.mobile-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }


/* ═══════════════════════════════════════════════════════════════════════════
   6. BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Primary button used site-wide */
.java-primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem 0.85rem 1.75rem;
    background: var(--primary-green);
    color: #02050c;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    transition: var(--transition);
    border: 2px solid var(--primary-green);
    white-space: nowrap;
}
.java-primary-btn.java-primary-btn-green {      
    background-color: #408a56;
    border: 2px solid #408a56;
    color: #fff;
}


.java-primary-btn:hover {
    background: var(--primary-green-dark);
    border-color: var(--primary-green-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-green);
}

/* Arrow circle inside button */
.arrow-circle,
.arrow-circle-light {
    width: 2.2rem;
    height: 2.2rem;
    background: rgba(2, 5, 12, 0.2);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.java-primary-btn:hover .arrow-circle,
.java-primary-btn:hover .arrow-circle-light {
    background: rgba(255,255,255,0.35);
    transform: translateX(3px);
}

/* Dark background variant */
.java-primary-btn.dark {
    background: transparent;
    color: var(--primary-green);
    border-color: var(--primary-green);
}

.java-primary-btn.dark:hover {
    background: var(--primary-green);
    color: #fff;
}


/* ═══════════════════════════════════════════════════════════════════════════
   7. HERO SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.hero-section {
    position: relative;
}

.hero-content {
    animation: heroReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes heroReveal {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-title .title-line {
    display: block;
}

/* Typed cursor blink */
.typed-cursor {
    color: var(--primary-green);
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* Scroll indicator */
.scroll-indicator { pointer-events: none; }


/* ═══════════════════════════════════════════════════════════════════════════
   8. SECTION COMMON
   ═══════════════════════════════════════════════════════════════════════════ */

.container {
    width: 100%;
    max-width: 1280px !important; 
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 768px) {
    .container { padding-left: 2.5rem; padding-right: 2.5rem; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   9. WHY-US CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.why-tech-card {
    transition: var(--transition);
}

.why-tech-card:hover {
    transform: translateY(-6px);
}

.why-icon-box {
    transition: var(--transition);
}


/* ═══════════════════════════════════════════════════════════════════════════
   10. SERVICES PIN / SCROLL
   ═══════════════════════════════════════════════════════════════════════════ */

.p-left-img,
.p-right-img,
.p-text-content {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ═══════════════════════════════════════════════════════════════════════════
   11. GALLERY
   ═══════════════════════════════════════════════════════════════════════════ */

.gallery-item {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity  0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
    transform: translateY(-4px);
}

.gallery-filter.active {
    background: var(--text-primary) !important;
    color: #fff !important;
}

#lightbox         { display: none; }
#lightbox.open    { display: flex !important; }


/* ═══════════════════════════════════════════════════════════════════════════
   12. FAQ ACCORDION
   ═══════════════════════════════════════════════════════════════════════════ */

.faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                opacity    0.35s ease,
                padding    0.35s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    opacity: 1;
    padding-top: 1.25rem;
}

.faq-icon {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                color     0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--primary-green);
}


/* ═══════════════════════════════════════════════════════════════════════════
   13. CONTACT FORM
   ═══════════════════════════════════════════════════════════════════════════ */

.form-input {
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-green) !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}


/* ═══════════════════════════════════════════════════════════════════════════
   14. TICKER / MARQUEE
   ═══════════════════════════════════════════════════════════════════════════ */

.ticker-wrapper {
    overflow: hidden;
    user-select: none;
}

.ticker-track {
    will-change: transform;
}


/* ═══════════════════════════════════════════════════════════════════════════
   15. FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.footer-contact li i {
    flex-shrink: 0;
}

.footer a {
    transition: color 0.3s ease;
}

/* Back to Top */
.back-to-top {
    transition: var(--transition);
}

.back-to-top.visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   16. MOBILE MENU OVERLAY
   ═══════════════════════════════════════════════════════════════════════════ */

#mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
    transform: translateX(0);
}


/* ═══════════════════════════════════════════════════════════════════════════
   17. GLASS CARD UTILITY
   ═══════════════════════════════════════════════════════════════════════════ */

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}


/* ═══════════════════════════════════════════════════════════════════════════
   18. REVEAL / AOS UTILITY
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Services intro word reveal — CSS sets initial state ── */
.je-si-label {
    opacity: 0;                  /* GSAP → opacity:1 */
}
.je-si-inner {
    display: inline-block;
    transform: translateY(110%); /* GSAP → translateY(0%) */
    will-change: transform;
}

/* No-JS fallback for text reveal */
.no-js .je-si-label  { opacity: 1 !important; }
.no-js .je-si-inner  { transform: none !important; }
/* .img-wrapper and #hero-img initial states live in services-intro.php <style> block */

/* Services pin accordion body */
.sp-body {
    height: 0;
    opacity: 0;
    transition: height 0.5s cubic-bezier(0.4,0,0.2,1),
                opacity 0.4s ease;
    overflow: hidden;
}

/* GSAP sets inline styles — these are fallbacks if JS is disabled */
@media (prefers-reduced-motion: reduce) {
    .reveal-text {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Safety: if GSAP hasn't run yet, don't leave things invisible forever */
.no-js .reveal-text,
.no-js .why-label-reveal,
.no-js .why-title-reveal,
.no-js .why-tech-card {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   19. TIMELINE (About page)
   ═══════════════════════════════════════════════════════════════════════════ */

.timeline-line {
    height: 0%;
    transition: height 0.1s linear;
}

.image-container {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.image-container img {
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 1024px) {
    .image-container:hover img { transform: scale(1.06); }
}


/* ═══════════════════════════════════════════════════════════════════════════
   20. UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════════ */

.text-primary-green { color: var(--primary-green); }
.bg-primary-green   { background-color: var(--primary-green); }
.border-primary     { border-color: var(--primary-green); }

.animate-bounce-slow {
    animation: bounceSlow 3s ease-in-out infinite;
}

@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}


/* ═══════════════════════════════════════════════════════════════════════════
   21. RESPONSIVE HELPERS
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .nav-menu { display: none; }
    .header-cta { display: none; }
}

@media (max-width: 768px) {
    :root {
        --section-py: 3rem;
    }
    .hero-title { font-size: 2.75rem; }
    .dropdown-menu { display: none; }
}

@media (max-width: 480px) {
    .hero-stats-inline { gap: 1.25rem; }
    .java-primary-btn  { font-size: 0.8rem; padding: 0.75rem 0.85rem 0.75rem 1.4rem; }
}

/* =============================================
   PAGE LOADER
   ============================================= */
/* =============================================
   PAGE LOADER
   ============================================= */
#site-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #02050c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#site-loader.loaded { opacity: 0; visibility: hidden; }

.loader-logo { color: #fff; font-size: 22px; font-weight: 600; }
.loader-logo span { color: #4ade80; }

/* ── Sun loader — enlarged container to fit outer glow ring ── */
.sun-loader { position: relative; width: 110px; height: 110px; }

/* ── Sun core — centred inside the larger container ── */
.sun-core {
  position: absolute;
  /* centre the core: (110 - 40) / 2 = 35px each side */
  inset: 35px;
  background: #f5a623;
  border-radius: 50%;
  animation: pulse-core 1.6s ease-in-out infinite;
  /* warm glow radiating from core */
  box-shadow:
    0 0 12px 4px rgba(245,166,35,0.55),
    0 0 28px 8px rgba(245,166,35,0.25);
}

/* ── Rays — orbit the core, same inset as the original ── */
.rays {
  position: absolute;
  /* keep rays centred on the core (35px offset each side) */
  inset: 0;
  animation: spin-ring 4s linear infinite;
}
.ray {
  position: absolute;
  width: 3px; height: 10px;
  background: #f5a623;
  border-radius: 2px;
  left: 50%;
  /* transform-origin distance = half container (55px) - a small gap (4px) ≈ 51px
     so rays orbit just outside the core without changing their relative position */
  transform-origin: 50% 55px;
  opacity: 0.65;
}
.ray:nth-child(1) { transform: translateX(-50%) rotate(0deg); }
.ray:nth-child(2) { transform: translateX(-50%) rotate(45deg); }
.ray:nth-child(3) { transform: translateX(-50%) rotate(90deg); }
.ray:nth-child(4) { transform: translateX(-50%) rotate(135deg); }
.ray:nth-child(5) { transform: translateX(-50%) rotate(180deg); }
.ray:nth-child(6) { transform: translateX(-50%) rotate(225deg); }
.ray:nth-child(7) { transform: translateX(-50%) rotate(270deg); }
.ray:nth-child(8) { transform: translateX(-50%) rotate(315deg); }

/* ── Inner spin ring — sits just outside the rays ── */
.sun-ring {
  position: absolute;
  /* 8px inset = ring sits ~10px outside the core edge */
  inset: 8px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(245,166,35,0.5);
  border-right-color: rgba(245,166,35,0.5);
  animation: spin-ring 1.2s linear infinite;
}

/* ── Outer glow ring — far from the sun, softly glowing ── */
.sun-ring-outer {
  position: absolute;
  /* negative inset = ring extends OUTSIDE the container bounds */
  inset: -10px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  /* visible arc segments in amber */
  border-top-color: rgba(245,166,35,0.9);
  border-right-color: rgba(245,166,35,0.25);
  border-bottom-color: rgba(245,166,35,0.0);
  border-left-color: rgba(245,166,35,0.55);
  animation: spin-ring 2.4s linear infinite reverse;
  /* the glow — makes it feel lit rather than just a thin line */
  filter: drop-shadow(0 0 6px rgba(245,166,35,0.7)) drop-shadow(0 0 14px rgba(245,166,35,0.35));
}

/* ── Dots ── */
.loader-dots span {
  display: inline-block; width: 5px; height: 5px;
  border-radius: 50%; background: #4ade80;
  margin: 0 3px; animation: dot-bounce 1.2s ease-in-out infinite;
}
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ── Keyframes ── */
@keyframes spin-ring  { to { transform: rotate(360deg); } }
@keyframes pulse-core {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(0.88); opacity: 0.75; }
}
@keyframes dot-bounce {
  0%, 80%, 100% { transform: translateY(0);    opacity: 0.4; }
  40%            { transform: translateY(-6px); opacity: 1; }
}

/* hero mobile responsive */
/* ── Stat pills — mobile row layout fix ── */
@media (max-width: 1023px) {
    /* Stack the two-col hero into single col, centre-aligned */
    .hero-content > .flex {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1.5rem !important;
    }

    /* Stat pills sit in a row on mobile, full-width on sm */
    .hero-content .flex.flex-row.lg\\:flex-col {
        flex-direction: row !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .hero-stat-pill {
        flex: 1;
        min-width: 0;
    }

    /* Slightly smaller headline on tablet */
    .hero-title {
        font-size: clamp(2rem, 5.5vw, 3.2rem);
    }

    /* Description max-width full on mobile */
    .hero-description {
        font-size: 16px;
        max-width: 100%;
    }
}

/* ── Extra small screens ── */
@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(1.8rem, 7vw, 2.4rem);
    }

    .hero-badge {
        font-size: 10px;
        padding: 0.35rem 0.8rem;
    }

    .hero-stat-pill-num { font-size: 1.4rem; }
    .hero-stat-pill-label { font-size: 10px; }

    .hero-stat-pill {
        padding: 0.9rem 1rem;
    }

    .java-primary-btn {
        font-size: 12px;
        padding: 0.85rem 1.4rem;
    }
}
.dropdown-menu {
    z-index: 99999;
}