/* ================================================================
   Konnect Decon — Global Stylesheet
   ================================================================ */

/* ── Variables ── */
:root {
    --primary : #121212;
    --accent  : #FF7F00; /* Proper Orange */
    --dark    : #1A1A1A;
    --light   : #F5F5F5;
    --brand-color: #FF7F00; /* Vibrant Orange */
    --font-title: 'Abunas', 'Alumni Sans', 'Aboreto', sans-serif;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

h1, h2, h3, .font-title {
    font-family: var(--font-title);
    font-weight: 700;
}

.font-title {
    color: var(--brand-color);
    font-weight: 900;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

/* Logo title — white on transparent header (dark hero bg) */
.header-transparent .font-title {
    color: #ffffff !important;
}

/* Logo title — brand orange once nav is scrolled (white bg) */
.header-transparent #navbar.nav-scrolled .font-title {
    color: var(--brand-color) !important;
}

/* ── Custom Gold Scrollbar ── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #b5952f; }

/* ── PROJECT DROPDOWN & NESTED HOVER FIX ── */
.group:hover > .absolute,
.group:hover > div[class*="opacity-0"] {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Fix for named nested groups group/nested */
.group\/nested:hover > .absolute,
.group\/nested:hover > div[class*="opacity-0"] {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure sub-menus are above everything */
.absolute.opacity-0.invisible {
    z-index: 100;
}

/* ================================================================
   CUSTOM CURSOR — Desktop only (≥1025px, non-touch)
   ================================================================ */
.custom-cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2147483647;
  transform: translate3d(-100px, -100px, 0);
  transition: width 0.2s, height 0.2s, background 0.2s, margin 0.2s;
  margin-left: -3px;
  margin-top: -3px;
  display: none; /* hidden by default; shown by JS only on non-touch */
}
.custom-cursor-circle {
  position: fixed;
  top: 0; left: 0;
  width: 40px; height: 40px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2147483646;
  transform: translate3d(-100px, -100px, 0);
  transition: width 0.2s, height 0.2s, border-color 0.2s, background 0.2s, margin 0.2s;
  margin-left: -20px;
  margin-top: -20px;
  display: none; /* hidden by default; shown by JS only on non-touch */
}

/* Hover States */
.custom-cursor-dot.cursor-hover {
  background: transparent;
}
.custom-cursor-circle.cursor-hover {
  width: 64px;
  height: 64px;
  background: transparent;
  border-color: rgba(212, 175, 55, 0.9);
  margin-left: -32px;
  margin-top: -32px;
}

/* Desktop pointer-none only when custom cursor is active */
body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button,
body.has-custom-cursor input,
body.has-custom-cursor textarea,
body.has-custom-cursor select,
body.has-custom-cursor .pf-item,
body.has-custom-cursor .team-card,
body.has-custom-cursor .testi-dot,
body.has-custom-cursor .testi-arrow,
body.has-custom-cursor .pf-btn,
body.has-custom-cursor .pf-modal-close,
body.has-custom-cursor [class*="btn-"],
body.has-custom-cursor .nav-link,
body.has-custom-cursor .hero-btn-custom,
body.has-custom-cursor .tri-item,
body.has-custom-cursor .hero-thumb,
body.has-custom-cursor .triangle-btn,
body.has-custom-cursor .faq-question {
  cursor: none !important;
}

/* Always restore pointer for mobile / tablet / touch devices */
@media (max-width: 1024px) {
  .custom-cursor-dot, .custom-cursor-circle { display: none !important; }
  html, body, input, textarea, select, .faq-question {
    cursor: auto !important;
  }
  a, button, .pf-item, .team-card, .testi-dot, .testi-arrow, .pf-btn, .pf-modal-close,
  [class*="btn-"], .nav-link, .hero-btn-custom, .tri-item, .hero-thumb,
  .triangle-btn {
    cursor: pointer !important;
  }
}

/* ================================================================
   NAVBAR
   ================================================================ */
#navbar {
    background-color: rgba(255,255,255,0); /* Explicitly transparent rgba */
    box-shadow: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 9999 !important; /* Extremely high z-index to prevent overlapping */
}

/* Scrolled state — slightly stronger shadow */
/* Scrolled state — Full Opaque White */
body #navbar.nav-scrolled {
    background-color: #ffffff !important;
    background: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    opacity: 1 !important;
}

/* Nav link base */
.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.4px;
    color: var(--dark);
    text-decoration: none;
    transition: color 0.25s, background 0.25s;
}

/* Transparent header logic — white links on load */
.header-transparent .nav-link {
    color: #ffffff !important;
}

/* Scrolled state — return to dark links */
.header-transparent #navbar.nav-scrolled .nav-link,
.header-transparent #navbar.nav-scrolled #mobile-menu-btn {
    color: var(--dark) !important;
}

/* Burger Button Visibility */
#mobile-menu-btn {
    color: #ffffff !important;
    transition: color 0.3s ease;
}
#navbar.nav-scrolled #mobile-menu-btn {
    color: var(--dark) !important;
}

/* Hover — subtle pill */
.nav-link:hover {
    color: var(--accent);
    background: rgba(212,175,55,0.08);
}

/* Active — solid gold pill */
.nav-link.active {
    color: var(--primary) !important;
    background: var(--accent);
}

/* Remove old ::after underline (replaced by pill background) */
.nav-link::after { display: none; }

/* Shift main dropdown to anchor on the right, giving space for nested submenus to open rightwards without overflowing */
@media (min-width: 768px) {
    #navbar .group > .absolute.left-0 {
        left: auto !important;
        right: 0 !important;
        transform-origin: top right !important;
    }
}

/* ================================================================
   TYPOGRAPHY HELPERS
   ================================================================ */
.border-text  { -webkit-text-stroke: 1px rgba(255,255,255,0.8); color:transparent; }
.font-outline { -webkit-text-stroke: 2px rgba(255,255,255,0.9); }

/* ================================================================
   HERO — parallax images handled via enhancements.js
   ================================================================ */
.zoom-effect { animation: zoomIn 20s infinite alternate linear; }
@keyframes zoomIn {
    0%   { transform: scale(1); }
    100% { transform: scale(1.15); }
}

/* ================================================================
   PORTFOLIO / FILTER
   ================================================================ */
.filter-btn.active {
    border-color: var(--accent) !important;
    color: var(--primary) !important;
    font-weight: 700;
    background: var(--accent);
}

.portfolio-item.hidden { display: none; }

.portfolio-item {
    animation: fadeIn 0.5s ease forwards;
}

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

/* ================================================================
   FLIP CARD (project pages)
   ================================================================ */
.flip-card {
    background: transparent;
    width: 100%;
    height: 450px;
    perspective: 1000px;
}
.flip-card-inner {
    position: relative;
    width: 100%; height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%; height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.flip-card-back { transform: rotateY(180deg); }

/* ================================================================
   SERVICE CARD (used in some old sections)
   ================================================================ */
.service-card {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: transform 0.3s;
}
.service-card:hover { transform: translateY(-4px); }
.service-card::before {
    content: "";
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 0%;
    background: rgba(212,175,55,0.05);
    z-index: -1;
    transition: height 0.5s ease;
}
.service-card:hover::before { height: 100%; }

/* ================================================================
   ABOUT SECTION SLIDER (horizontal scroll snap)
   ================================================================ */
.about-slider-wrap {
    overflow: hidden;
    position: relative;
}
.about-slider-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.77,0,0.175,1);
    will-change: transform;
}
.about-slide {
    min-width: 100%;
    flex-shrink: 0;
}

/* ================================================================
   CATEGORY PAGE HERO
   ================================================================ */
.cat-hero {
    position: relative;
    background: var(--primary);
    padding: 120px 0 80px;
    overflow: hidden;
}
.cat-hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image: radial-gradient(var(--accent) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

/* Gold bottom border on category page */
.cat-hero-bottom-line {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent) 40%, transparent);
}

/* ================================================================
   LIGHTBOX (all pages)
   ================================================================ */
#lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.94);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}
#lightbox-overlay.hidden { display: none !important; }
#lightbox-img {
    max-width: 90vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}

/* ================================================================
   GLOBAL BUTTON RESET
   ================================================================ */
/* button default cursor is set by has-custom-cursor class on body */

/* ================================================================
   SECTION FADE HELPERS (works alongside AOS)
   ================================================================ */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].revealed {
    opacity: 1;
    transform: none;
}

/* ================================================================
   FAQ ACCORDION
   ================================================================ */
.faq-section {
    padding: 100px 0;
    background: #fff;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #eee;
    padding: 1.5rem 0;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    text-align: left;
    padding: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: color 0.3s;
}

.faq-question:hover {
    color: var(--accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #666;
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    max-height: 500px; /* arbitrary large value */
    margin-top: 1rem;
}

.faq-icon {
    width: 24px;
    height: 24px;
    position: relative;
    transition: transform 0.4s;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background: currentColor;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.faq-icon::before {
    width: 12px;
    height: 2px;
}

.faq-icon::after {
    width: 2px;
    height: 12px;
    transition: transform 0.4s;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-item.active .faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}
