/* ============================================================
   FILE: public/css/struktur.css
   Digunakan oleh: resources/views/frontend/struktur.blade.php
============================================================ */

        /* ══════════════════════════════════════════════
           CSS VARIABLES — selaras home.blade
        ══════════════════════════════════════════════ */
        :root {
            --blue-primary: #1a3a8f;
            --blue-mid: #1e4ec8;
            --blue-light: #3b82f6;
            --gold: #e9b945;
            --gold-light: #fcd96a;
            --white: #ffffff;
            --gray-50: #f8fafc;
            --gray-100: #f1f5f9;
            --gray-200: #e2e8f0;
            --gray-400: #94a3b8;
            --gray-600: #475569;
            --text-dark: #0f172a;
            --card-shadow: 0 8px 32px rgba(26, 58, 143, 0.10);
            --card-hover-shadow: 0 20px 60px rgba(26, 58, 143, 0.20);
            /* Easing selaras home.blade */
            --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
            --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
            --card-photo-ratio: 100%;
        }

        /* ══════════════════════════════════════════════
           RESET & BASE
        ══════════════════════════════════════════════ */
        .struktur-page * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        .struktur-page {
            font-family: var(--body-font);
            background: var(--gray-50);
            color: var(--text-dark);
            overflow-x: hidden;
        }

        /* ══════════════════════════════════════════════
           HERO BANNER
        ══════════════════════════════════════════════ */
        .page-hero {
            position: relative;
            background-color: var(--blue-primary);
            background-image: url('/images/hero2.png');
            background-position: center;
            background-size: cover;
            background-repeat: no-repeat;
            min-height: 200px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px 24px 36px;
            overflow: hidden;
            text-align: center;
            opacity: 1;
        }

        .page-hero::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(26, 58, 143, 0.75) 0%, rgba(15, 23, 42, 0.55) 100%);
        }

        .pf-hero__border {
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 100%;
            z-index: 4;
            pointer-events: none;
            height: 40px;
        }

        @media (min-width: 768px) {
            .pf-hero__border {
                height: 65px;
            }
        }

        .pf-hero__border .pf-parallax>use {
            animation: pf-wave 25s cubic-bezier(.55, .5, .45, .5) infinite;
        }

        .pf-hero__border .pf-parallax>use:nth-child(1) {
            animation-delay: -2s;
            animation-duration: 7s;
            fill: rgba(255, 255, 255, .20);
        }

        .pf-hero__border .pf-parallax>use:nth-child(2) {
            animation-delay: -3s;
            animation-duration: 10s;
            fill: rgba(255, 255, 255, .40);
        }

        .pf-hero__border .pf-parallax>use:nth-child(3) {
            animation-delay: -4s;
            animation-duration: 13s;
            fill: rgba(255, 255, 255, .60);
        }

        .pf-hero__border .pf-parallax>use:nth-child(4) {
            animation-delay: -5s;
            animation-duration: 20s;
            fill: #ffffff;
        }

        @keyframes pf-wave {
            0% {
                transform: translate3d(-90px, 0, 0);
            }

            100% {
                transform: translate3d(85px, 0, 0);
            }
        }

        /* Floating orbs */
        .hero-orb {
            position: absolute;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.055);
            animation: st-float-orb 8s ease-in-out infinite;
            z-index: 1;
            /* will-change agar orb dipromosikan ke GPU layer sendiri,
               menghindari repaint elemen lain saat animasi berjalan */
            will-change: transform;
        }

        .hero-orb:nth-child(1) {
            width: 300px;
            height: 300px;
            top: -80px;
            left: -60px;
            animation-delay: 0s;
        }

        .hero-orb:nth-child(2) {
            width: 200px;
            height: 200px;
            top: 20px;
            right: -40px;
            animation-delay: -3s;
        }

        .hero-orb:nth-child(3) {
            width: 150px;
            height: 150px;
            bottom: 10px;
            left: 30%;
            animation-delay: -5s;
        }

        @keyframes st-float-orb {

            0%,
            100% {
                transform: translateY(0) scale(1);
            }

            50% {
                transform: translateY(-20px) scale(1.05);
            }
        }

        /* Garis dekoratif kiri — selaras hp-hero__garis di home */
        .hero-garis {
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            background: linear-gradient(to bottom, transparent, var(--gold), transparent);
            opacity: 0;
            transform-origin: top;
            animation: st-garisIn 1.1s var(--ease-out-expo) 0.25s both;
            z-index: 2;
        }

        @keyframes st-garisIn {
            from {
                opacity: 0;
                transform: scaleY(0);
            }

            to {
                opacity: 0.6;
                transform: scaleY(1);
            }
        }

        .page-hero-content {
            position: relative;
            z-index: 2;
        }

        /* Animasi hero — selaras hp-fade-up di home */
        .page-hero h1 {
            font-family: var(--title-font);
            font-size: clamp(2rem, 4vw, 3rem);
            font-weight: 700;
            color: var(--white);
            letter-spacing: -0.5px;
            text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
            opacity: 0;
            animation: st-slideUp 0.75s var(--ease-out-expo) 0.05s both;
        }

        .breadcrumb-nav {
            margin-top: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-size: 0.875rem;
            color: rgba(255, 255, 255, 0.75);
            opacity: 0;
            animation: st-slideUp 0.75s var(--ease-out-expo) 0.22s both;
        }

        @keyframes st-slideUp {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .breadcrumb-nav a {
            color: var(--gold-light);
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .breadcrumb-nav a:hover {
            color: var(--white);
        }

        .breadcrumb-nav .sep {
            opacity: 0.45;
        }

        /* ══════════════════════════════════════════════
           SCROLL REVEAL — selaras .hp-reveal di home
        ══════════════════════════════════════════════ */
        .st-reveal {
            opacity: 0;
            transform: translateY(28px);
            transition: opacity 0.65s var(--ease-out-expo),
                transform 0.65s var(--ease-out-expo);
        }

        .st-reveal.st-visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* ══════════════════════════════════════════════
           MAIN SECTION
           Animasi CSS murni (autoplay saat paint) — TIDAK bergantung
           pada JS untuk tampil. Sebelumnya section ini opacity:0 dan
           hanya dimunculkan lewat class .content-ready dari struktur.js,
           yang bisa telat dieksekusi (antre di belakang download foto
           pengurus), menyebabkan section terlihat "kosong" hingga 8 detik.
        ══════════════════════════════════════════════ */
        .struktur-section {
            padding: 64px 0 100px;
            animation: st-sectionIn 0.6s var(--ease-out-expo) both;
            animation-delay: 0.05s;
        }

        @keyframes st-sectionIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .container-struktur {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 24px;
        }

        /* ══════════════════════════════════════════════
           SECTION TITLE
        ══════════════════════════════════════════════ */
        .section-main-title {
            text-align: center;
            margin-bottom: 64px;
        }

        .section-main-title h2 {
            font-family: var(--title-font);
            font-size: clamp(1.8rem, 3vw, 2.5rem);
            color: var(--blue-primary);
            margin-bottom: 12px;
            letter-spacing: -0.3px;
        }

        .title-underline {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }

        .title-underline::before,
        .title-underline::after {
            content: '';
            display: block;
            height: 2px;
            width: 64px;
            background: linear-gradient(90deg, transparent, var(--blue-light));
            border-radius: 2px;
        }

        .title-underline::after {
            background: linear-gradient(90deg, var(--blue-light), transparent);
        }

        .title-underline .diamond {
            width: 8px;
            height: 8px;
            background: var(--gold);
            transform: rotate(45deg);
        }

        /* ══════════════════════════════════════════════
           DIVISI LABEL — shimmer selaras home badges
        ══════════════════════════════════════════════ */
        .divisi-label {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            background: linear-gradient(135deg, var(--blue-primary), var(--blue-mid));
            color: var(--white);
            font-size: 0.85rem;
            font-weight: 700;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            padding: 10px 28px;
            border-radius: 50px;
            margin-bottom: 40px;
            box-shadow: 0 4px 20px rgba(26, 58, 143, 0.25);
            position: relative;
            overflow: hidden;
            /* Animasi CSS murni (autoplay) — lihat catatan di .person-card
               di atas soal kenapa gate-by-JS-class dihindari di sini. */
            animation: st-labelIn 0.55s var(--ease-out-expo) both;
        }

        @keyframes st-labelIn {
            from {
                opacity: 0;
                transform: translateY(24px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* CATATAN: will-change SENGAJA tidak dipasang di sini.
           .divisi-label berulang untuk setiap divisi (jumlahnya mengikuti
           data), jadi will-change di sini akan memaksa browser membuat
           puluhan GPU layer sekaligus saat halaman dibuka — inilah yang
           bikin proses render jadi lambat/nyangkut di bagian hero. */
        .divisi-label::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.13), transparent);
            transform: translateX(-100%);
            animation: st-shimmer 3s ease infinite;
        }

        @keyframes st-shimmer {
            to {
                transform: translateX(200%);
            }
        }

        .divisi-label .dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--gold);
            animation: st-pulse-dot 2s ease infinite;
        }

        @keyframes st-pulse-dot {

            0%,
            100% {
                opacity: 1;
                transform: scale(1);
            }

            50% {
                opacity: 0.6;
                transform: scale(1.4);
            }
        }

        /* ══════════════════════════════════════════════
           PERSON CARD
        ══════════════════════════════════════════════ */
        .person-card {
            background: var(--white);
            border-radius: 20px;
            overflow: hidden;
            box-shadow: var(--card-shadow);
            border: 1.5px solid var(--gray-200);
            text-align: center;
            cursor: pointer;
            position: relative;
            display: flex;
            flex-direction: column;
            /* Reveal via animasi CSS murni (autoplay saat paint) — TIDAK
               menunggu JS. Sebelumnya opacity:0 hanya dimunculkan lewat
               class .visible dari IntersectionObserver di struktur.js;
               kalau file JS itu telat dimuat (antre di belakang download
               foto pengurus), semua kartu ikut tampak "hilang" walau HTML
               sudah ada di halaman — ini sumber jeda ~8 detik yang dilaporkan. */
            animation: st-cardIn 0.6s var(--ease-out-expo) both;
            transition: box-shadow 0.40s var(--ease-out-expo),
                border-color 0.3s ease,
                transform 0.45s var(--ease-out-expo);
        }

        @keyframes st-cardIn {
            from {
                opacity: 0;
                transform: translateY(28px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Hover — selaras hp-berita__card:hover di home.
           Dibungkus @media(hover:hover) agar tidak "nyangkut" aktif
           di perangkat sentuh (tap) dan tidak dihitung browser saat tidak relevan. */
        @media (hover: hover) {
            .person-card:hover {
                box-shadow: var(--card-hover-shadow);
                border-color: var(--blue-light);
                transform: translateY(-7px) scale(1.02);
            }
        }

        /* Gold bar atas — spring selaras hover di home */
        .person-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.45s var(--ease-out-expo);
            z-index: 2;
        }

        @media (hover: hover) {
            .person-card:hover::before {
                transform: scaleX(1);
            }
        }

        /* Photo wrapper */
        .card-photo-wrap {
            position: relative;
            width: 100%;
            padding-top: var(--card-photo-ratio);
            overflow: hidden;
            background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
            flex-shrink: 0;
        }

        .card-photo-wrap img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: top center;
            transition: transform 0.55s var(--ease-out-expo);
        }

        @media (hover: hover) {
            .person-card:hover .card-photo-wrap img {
                transform: scale(1.08);
            }
        }

        .card-photo-wrap::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, transparent 50%, rgba(26, 58, 143, 0.15) 100%);
            opacity: 0;
            transition: opacity 0.4s ease;
        }

        @media (hover: hover) {
            .person-card:hover .card-photo-wrap::after {
                opacity: 1;
            }
        }

        .card-photo-empty {
            position: absolute;
            inset: 0;
            display: none;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
            color: var(--gray-400);
        }

        /* Ditampilkan hanya saat foto tidak ada / gagal dimuat (lihat blade + onerror) */
        .card-photo-wrap.photo-error .card-photo-empty {
            display: flex;
        }

        .card-photo-wrap.photo-error img {
            display: none;
        }

        .card-photo-empty svg {
            width: 48px;
            height: 48px;
            opacity: 0.4;
        }

        /* Card body */
        .card-body {
            padding: 16px 14px 18px;
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

        .card-name {
            font-size: 0.8rem;
            font-weight: 700;
            color: var(--text-dark);
            line-height: 1.35;
            transition: color 0.3s ease;
        }

        @media (hover: hover) {
            .person-card:hover .card-name {
                color: var(--blue-primary);
            }
        }

        .card-role {
            font-size: 0.65rem;
            font-weight: 600;
            color: var(--blue-mid);
            letter-spacing: 0.5px;
            text-transform: uppercase;
            background: rgba(59, 130, 246, 0.08);
            padding: 3px 10px;
            border-radius: 50px;
            display: inline-block;
            transition: background 0.3s var(--ease-out-expo), color 0.3s ease;
        }

        @media (hover: hover) {
            .person-card:hover .card-role {
                background: var(--blue-primary);
                color: var(--white);
            }
        }

        /* ══════════════════════════════════════════════
           KETUA WRAP
        ══════════════════════════════════════════════ */
        .ketua-wrap {
            display: flex;
            justify-content: center;
            margin-bottom: 40px;
        }

        .card-ketua {
            width: 180px;
        }

        /* ══════════════════════════════════════════════
           CONNECTOR LINES
        ══════════════════════════════════════════════ */
        .connector {
            display: flex;
            justify-content: center;
            margin: -8px 0;
            position: relative;
            z-index: 0;
        }

        .connector-line {
            width: 2px;
            height: 36px;
            background: linear-gradient(to bottom, var(--gold), var(--blue-light));
            border-radius: 2px;
            /* Subtle draw-in animation when section is ready */
            transform-origin: top;
            animation: st-lineIn 0.6s var(--ease-out-expo) 0.5s both;
        }

        @keyframes st-lineIn {
            from {
                transform: scaleY(0);
                opacity: 0;
            }

            to {
                transform: scaleY(1);
                opacity: 1;
            }
        }

        /* ══════════════════════════════════════════════
           GRID LAYOUTS
        ══════════════════════════════════════════════ */
        .grid-3 {
            display: grid;
            grid-template-columns: repeat(3, 180px);
            gap: 20px;
            justify-content: center;
        }

        .grid-5 {
            display: grid;
            grid-template-columns: repeat(5, 180px);
            gap: 16px;
            justify-content: center;
        }

        .grid-4 {
            display: grid;
            grid-template-columns: repeat(4, 180px);
            gap: 16px;
            justify-content: center;
        }

        .grid-center-1 {
            display: flex;
            justify-content: center;
        }

        .grid-center-1 .person-card {
            width: 180px;
        }

        /* ══════════════════════════════════════════════
           STAGGER DELAYS — selaras hp-reveal-d1/d2/d3 di home
        ══════════════════════════════════════════════ */
        .stagger-children .person-card:nth-child(1) {
            animation-delay: 0.04s;
        }

        .stagger-children .person-card:nth-child(2) {
            animation-delay: 0.10s;
        }

        .stagger-children .person-card:nth-child(3) {
            animation-delay: 0.16s;
        }

        .stagger-children .person-card:nth-child(4) {
            animation-delay: 0.22s;
        }

        .stagger-children .person-card:nth-child(5) {
            animation-delay: 0.28s;
        }

        /* ══════════════════════════════════════════════
           DIVISI BLOCK
        ══════════════════════════════════════════════ */
        .divisi-block {
            margin-bottom: 72px;
            position: relative;
        }

        .divisi-header {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-bottom: 32px;
        }

        /* ══════════════════════════════════════════════
           PENGURUS INTI
        ══════════════════════════════════════════════ */
        .pengurus-inti {
            background: linear-gradient(180deg, rgba(26, 58, 143, 0.03) 0%, transparent 100%);
            border-radius: 32px;
            padding: 52px 32px 56px;
            border: 1px solid rgba(26, 58, 143, 0.08);
            margin-bottom: 72px;
            position: relative;
        }

        .pengurus-inti::before {
            content: '';
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 60%;
            height: 1px;
            background: linear-gradient(90deg, transparent, var(--gold), transparent);
        }

        /* ══════════════════════════════════════════════
           RIPPLE
        ══════════════════════════════════════════════ */
        .ripple {
            position: absolute;
            border-radius: 50%;
            background: rgba(59, 130, 246, 0.22);
            transform: scale(0);
            animation: st-ripple 0.7s linear;
            pointer-events: none;
        }

        @keyframes st-ripple {
            to {
                transform: scale(4);
                opacity: 0;
            }
        }

        /* ══════════════════════════════════════════════
           BG PARTICLES
        ══════════════════════════════════════════════ */
        /* position:absolute (bukan fixed) — supaya browser tidak membentuk
           compositing layer setinggi viewport yang harus terus di-track
           sepanjang halaman terbuka. Tampilan visual tetap sama karena
           parent-nya (.struktur-page) sudah membungkus seluruh halaman. */
        .bg-particles {
            position: absolute;
            inset: 0;
            pointer-events: none;
            z-index: 0;
            overflow: hidden;
        }

        .particle {
            position: absolute;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(26, 58, 143, 0.07), transparent);
            animation: st-drift linear infinite;
            will-change: transform;
        }

        @keyframes st-drift {
            0% {
                transform: translateY(100vh) rotate(0deg);
                opacity: 0;
            }

            10% {
                opacity: 1;
            }

            90% {
                opacity: 1;
            }

            100% {
                transform: translateY(-100px) rotate(360deg);
                opacity: 0;
            }
        }

        /* ══════════════════════════════════════════════
           BACK TO TOP
        ══════════════════════════════════════════════ */
        .back-to-top {
            position: fixed;
            bottom: 32px;
            right: 32px;
            width: 48px;
            height: 48px;
            background: linear-gradient(135deg, var(--blue-primary), var(--blue-mid));
            color: var(--white);
            border: none;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 20px rgba(26, 58, 143, 0.35);
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.4s var(--ease-out-expo),
                transform 0.4s var(--ease-out-expo),
                box-shadow 0.3s ease;
            z-index: 999;
        }

        .back-to-top.show {
            opacity: 1;
            transform: translateY(0);
        }

        @media (hover: hover) {
            .back-to-top:hover {
                transform: translateY(-4px);
                box-shadow: 0 10px 32px rgba(26, 58, 143, 0.42);
            }
        }

        /* ══════════════════════════════════════════════
           PREFERS REDUCED MOTION — selaras home
        ══════════════════════════════════════════════ */
        @media (prefers-reduced-motion: reduce) {

            *,
            *::before,
            *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }

            .person-card,
            .divisi-label,
            .st-reveal {
                opacity: 1;
                transform: none;
            }

            .struktur-section {
                opacity: 1;
                transform: none;
            }
        }

        /* ══════════════════════════════════════════════
           RESPONSIVE
        ══════════════════════════════════════════════ */
        @media (max-width: 1024px) {
            .grid-5 {
                grid-template-columns: repeat(4, 1fr);
            }

            .grid-4 {
                grid-template-columns: repeat(4, 1fr);
            }

            .grid-3 {
                grid-template-columns: repeat(3, 1fr);
            }

            .grid-center-1 .person-card,
            .card-ketua {
                width: 100%;
                max-width: 240px;
            }
        }

        @media (max-width: 768px) {
            .grid-3 {
                grid-template-columns: repeat(2, 1fr);
                gap: 14px;
            }

            .grid-5 {
                grid-template-columns: repeat(3, 1fr);
                gap: 12px;
            }

            .grid-4 {
                grid-template-columns: repeat(2, 1fr);
                gap: 14px;
            }

            .pengurus-inti {
                padding: 30px 16px 40px;
            }

            .grid-center-1 .person-card,
            .card-ketua {
                width: 100%;
                max-width: 200px;
            }
        }

        @media (max-width: 480px) {

            .grid-3,
            .grid-4,
            .grid-5 {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
            }

            .grid-center-1 .person-card,
            .card-ketua {
                width: 100%;
                max-width: 160px;
            }

            .container-struktur {
                padding: 0 12px;
            }
        }
