/* ============================================
   Custom CSS — CMS
   ============================================ */

/* Font Prompt */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');
body {
    font-family: 'Prompt', sans-serif;
    background: var(--bg-primary) !important;
    color: var(--text-primary);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* ---- Preloader ---- */
#preloader {
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.preloader-spinner {
    animation: spin 1s linear infinite;
}

/* ---- Navbar ---- */
.navbar-scrolled {
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-bottom-color: var(--border-color) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}
.navbar-scrolled .nav-logo {
    height: 3.5rem;
    transition: height 0.3s ease;
}

/* ---- Mobile Menu ---- */
.mobile-dropdown.open .fa-chevron-down {
    transform: rotate(180deg);
}
.mobile-dropdown.open .mobile-dropdown-content {
    display: block;
}

/* ---- Swiper Customization ---- */
.swiper-hero .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: white;
    opacity: 0.5;
    transition: all 0.3s ease;
}
.swiper-hero .swiper-pagination-bullet-active {
    opacity: 1;
    width: 24px;
    border-radius: 4px;
}
.swiper-hero .swiper-button-next,
.swiper-hero .swiper-button-prev {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: #1e3a5f;
}
.swiper-hero .swiper-button-next::after,
.swiper-hero .swiper-button-prev::after {
    font-size: 16px;
    font-weight: 700;
}

/* ---- Cards & Images ---- */
.card-hover {
    transition: all 0.3s ease-out;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08);
}
.img-hover-zoom {
    overflow: hidden;
}
.img-hover-zoom img {
    transition: transform 0.5s ease;
}
.img-hover-zoom:hover img {
    transform: scale(1.05);
}

/* ---- FAQ Accordion ---- */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}
.faq-item.active .faq-answer {
    max-height: 500px;
}
.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* ---- Back to Top ---- */
#backToTop {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

/* ---- Admin Panel ---- */
.admin-table th {
    background: #F9FAFB;
    font-weight: 600;
    font-size: 0.75rem;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.admin-table td {
    vertical-align: middle;
}
.admin-table tbody tr:hover {
    background: #F9FAFB;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #E5E7EB;
    border-radius: 24px;
    transition: 0.3s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider {
    background-color: #1e3a5f;
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* Toggle switch small */
.toggle-switch-sm {
    position: relative;
    width: 36px;
    height: 20px;
}
.toggle-switch-sm input { opacity: 0; width: 0; height: 0; }
.toggle-switch-sm .toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #E5E7EB;
    border-radius: 20px;
    transition: 0.3s;
}
.toggle-switch-sm .toggle-slider::before {
    content: '';
    position: absolute;
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}
.toggle-switch-sm input:checked + .toggle-slider {
    background-color: #1e3a5f;
}
.toggle-switch-sm input:checked + .toggle-slider::before {
    transform: translateX(16px);
}

/* Image preview */
.image-preview {
    position: relative;
    display: inline-block;
}
.image-preview .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}
.image-preview:hover .remove-btn {
    opacity: 1;
}

/* ---- Focal Point Picker ---- */
.focal-image-container {
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

/* ---- Sortable Drag ---- */
.sortable-ghost {
    opacity: 0.4;
    background: #EFF6FF !important;
}
.sortable-drag {
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

/* Flatpickr overrides */
.flatpickr-input {
    background-color: white !important;
}

/* Range slider */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: #e5e7eb;
    border-radius: 9999px;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #1e3a5f;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #1e3a5f;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ---- Animations ---- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes popupIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.animate-fade-up { animation: fadeUp 0.6s ease-out both; }
.animate-popup-in { animation: popupIn 0.4s ease-out; }

.animate-fade-up,
.animate-stagger-item,
.animate-slide-left,
.animate-slide-right {
    will-change: transform, opacity;
}

/* ============================================
   DARK MODE — CSS Custom Properties
   ============================================ */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #9ca3af;
    --border-color: #e5e7eb;
    --card-bg: rgba(255,255,255,0.6);
    --card-border: rgba(255,255,255,0.3);
    --card-shadow: rgba(0,0,0,0.06);
    --accent: #7c3aed;
    --accent-light: #ede9fe;
    --accent-glow: rgba(124,58,237,0.15);
    --navbar-bg: #ffffff;
    --input-bg: #ffffff;
    --input-border: #e5e7eb;
}
html.dark {
    --bg-primary: #0f0f14;
    --bg-secondary: #16161d;
    --bg-tertiary: #1e1e28;
    --text-primary: #f1f1f4;
    --text-secondary: #a1a1b5;
    --text-tertiary: #6b6b80;
    --border-color: #2a2a3a;
    --card-bg: rgba(30,30,42,0.7);
    --card-border: rgba(255,255,255,0.06);
    --card-shadow: rgba(0,0,0,0.3);
    --accent: #a78bfa;
    --accent-light: rgba(167,139,250,0.1);
    --accent-glow: rgba(167,139,250,0.25);
    --navbar-bg: #0f0f14;
    --input-bg: #1e1e28;
    --input-border: #2a2a3a;
}
html.dark body { color: var(--text-primary); }
html.dark body:not([data-bg-type]) { background: var(--bg-primary); }
html.dark .bg-white { background: var(--bg-primary) !important; }
html.dark .bg-gray-50 { background: var(--bg-secondary) !important; }
/* When custom bg is set, make sections transparent so body bg shows through */
body[data-bg-type] main > section { background: transparent !important; }
body[data-bg-type] main > section.bg-gradient-to-br { background: initial !important; }
body[data-bg-type] .blob-bg::before, body[data-bg-type] .blob-bg::after { display: none; }
body[data-bg-type] .floating-shape { display: none; }
html.dark .text-gray-900 { color: var(--text-primary) !important; }
html.dark .text-gray-700 { color: var(--text-secondary) !important; }
html.dark .text-gray-600 { color: var(--text-secondary) !important; }
html.dark .text-gray-500 { color: var(--text-tertiary) !important; }
html.dark .text-gray-400 { color: var(--text-tertiary) !important; }
html.dark .border-gray-100, html.dark .border-gray-200 { border-color: var(--border-color) !important; }
html.dark #navbar { background: var(--navbar-bg) !important; }
#navbar { border-bottom-color: transparent !important; box-shadow: 0 1px 0 0 var(--navbar-bg); }
#navbar.navbar-scrolled { border-bottom-color: var(--border-color) !important; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
html.dark .navbar-scrolled { box-shadow: 0 1px 10px rgba(0,0,0,0.3); }
html.dark #mobileMenu { background: var(--bg-primary) !important; }
html.dark footer { background: var(--bg-secondary) !important; border-color: var(--border-color) !important; }
html.dark .bg-gray-50.border-b { background: var(--bg-secondary) !important; border-color: var(--border-color) !important; }
html.dark input, html.dark textarea, html.dark select { background: var(--input-bg) !important; border-color: var(--input-border) !important; color: var(--text-primary) !important; }
html.dark input::placeholder, html.dark textarea::placeholder { color: var(--text-tertiary) !important; }
html.dark ::-webkit-scrollbar-track { background: #1a1a24; }
html.dark ::-webkit-scrollbar-thumb { background: #3a3a4a; }

/* Dark Mode Toggle Button */
#darkModeToggle {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: #e5e7eb;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    padding: 0 3px;
}
html.dark #darkModeToggle { background: #7c3aed; }
#darkModeToggle .toggle-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
html.dark #darkModeToggle .toggle-thumb { transform: translateX(20px); }

/* ============================================
   GEN Z / ALPHA EFFECTS
   ============================================ */

/* ---- Custom Cursor (dot only, no ring) ---- */
.custom-cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.1s, width 0.2s, height 0.2s, background 0.2s;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 6px var(--accent);
}
.custom-cursor-dot.hover { width: 12px; height: 12px; background: #ec4899; box-shadow: 0 0 10px #ec4899; }
@media (max-width: 768px) { .custom-cursor-dot { display: none; } }
@media (pointer: coarse) { .custom-cursor-dot { display: none; } }

/* ---- Neon Trail ---- */
.neon-trail-dot {
    position: fixed;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9990;
    background: #a855f7;
    box-shadow: 0 0 10px #a855f7, 0 0 25px rgba(168,85,247,0.5), 0 0 40px rgba(168,85,247,0.2);
    opacity: 1;
}
@media (max-width: 768px) { .neon-trail-dot { display: none !important; } }
@media (pointer: coarse) { .neon-trail-dot { display: none !important; } }

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.reveal-up { transform: translateY(60px); }
.reveal.reveal-down { transform: translateY(-60px); }
.reveal.reveal-left { transform: translateX(-60px); }
.reveal.reveal-right { transform: translateX(60px); }
.reveal.reveal-scale { transform: scale(0.85); }
.reveal.revealed {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* ---- Bento Grid ---- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 1rem;
}
.bento-grid .bento-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
}
@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-grid .bento-item:first-child {
        grid-column: span 1;
        grid-row: span 1;
    }
}
.bento-item {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.bento-item:hover {
    border-color: rgba(168,85,247,0.5);
    box-shadow: 0 0 20px rgba(168,85,247,0.15), 0 0 40px rgba(168,85,247,0.05);
}
.bento-item img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.bento-item:hover img {
    transform: scale(1.08);
}
.bento-item .bento-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
}

/* ---- Infinite Gallery ---- */
.infinite-gallery-row {
    display: flex;
    gap: 1rem;
    overflow: hidden;
}
.infinite-gallery-track {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}
.infinite-gallery-track.scroll-left {
    animation: galleryScrollLeft 40s linear infinite;
}
.infinite-gallery-track.scroll-right {
    animation: galleryScrollRight 40s linear infinite;
}
.infinite-gallery-track:hover { animation-play-state: paused; }
.gallery-card {
    flex-shrink: 0;
    width: 280px;
    height: 200px;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
}
.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.gallery-card:hover img { transform: scale(1.1); }
@keyframes galleryScrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes galleryScrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}
@media (max-width: 768px) {
    .gallery-card { width: 200px; height: 150px; }
}

/* ---- Ripple Effect ---- */
.ripple-effect {
    position: relative;
    overflow: hidden;
}
.ripple-effect .ripple-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transform: scale(0);
    animation: rippleAnim 0.6s ease-out forwards;
    pointer-events: none;
}
@keyframes rippleAnim {
    to { transform: scale(4); opacity: 0; }
}

/* ---- Glassmorphism ---- */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 32px var(--card-shadow);
}
.glass-card-dark {
    background: rgba(30,58,95,0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* ---- 3D Tilt Card ---- */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, box-shadow 0.3s;
    will-change: transform;
}
.tilt-card:hover {
    box-shadow: 0 20px 40px var(--card-shadow);
}
.tilt-card .tilt-inner {
    transform: translateZ(20px);
}

/* ---- Magnetic Button ---- */
.magnetic-btn {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---- Text Split Animation ---- */
.text-split .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px) rotate(5deg);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.text-split.revealed .char {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

/* ---- Floating Parallax Shapes ---- */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.15;
    filter: blur(40px);
}
html.dark .floating-shape { opacity: 0.08; }
.shape-1 { width: 300px; height: 300px; background: #7c3aed; top: -100px; right: -100px; }
.shape-2 { width: 200px; height: 200px; background: #ec4899; bottom: -50px; left: -50px; }
.shape-3 { width: 250px; height: 250px; background: #06b6d4; top: 50%; right: 10%; }

/* ---- Gradient Border Card (Wizdom style) ---- */
.gradient-border-card {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
}
.gradient-border-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.25rem;
    padding: 2px;
    background: linear-gradient(135deg, #7c3aed, #ec4899, #f59e0b, #06b6d4);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
}
.gradient-border-card:hover::before { opacity: 1; }

/* ---- Animated Blob Background ---- */
.blob-bg {
    position: relative;
    overflow: hidden;
}
.blob-bg::before, .blob-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.1;
    pointer-events: none;
}
.blob-bg::before { width: 400px; height: 400px; background: #7c3aed; top: -200px; left: -100px; animation: blobFloat 15s ease-in-out infinite; }
.blob-bg::after { width: 350px; height: 350px; background: #ec4899; bottom: -150px; right: -100px; animation: blobFloat 18s ease-in-out infinite reverse; }
html.dark .blob-bg::before, html.dark .blob-bg::after { opacity: 0.06; }
@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

/* ---- Horizontal Scroll ---- */
.horizontal-scroll-section {
    overflow: hidden;
}
.horizontal-scroll-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.1s linear;
    will-change: transform;
}
.horizontal-scroll-track .h-scroll-card {
    flex-shrink: 0;
    width: 320px;
    border-radius: 1.25rem;
    overflow: hidden;
}
@media (max-width: 768px) {
    .horizontal-scroll-track { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
    .horizontal-scroll-track .h-scroll-card { scroll-snap-align: start; width: 280px; }
}

/* ---- Stagger Children Animation ---- */
.stagger-container .stagger-child {
    opacity: 0;
    transform: translateY(30px);
}
.stagger-container.revealed .stagger-child {
    animation: staggerIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes staggerIn {
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Smooth Underline Link ---- */
.smooth-underline {
    position: relative;
    display: inline-block;
}
.smooth-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.smooth-underline:hover::after { width: 100%; }

/* ---- Auto-hide Navbar ---- */
#navbar {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
}
#navbar.navbar-hidden {
    transform: translateY(-100%);
}

/* ---- Gradient Text Animation ---- */
.gradient-text-animated {
    background: linear-gradient(270deg, #7c3aed, #ec4899, #f59e0b, #06b6d4, #7c3aed);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---- Neon Glow Utilities ---- */
.neon-border-hover:hover {
    box-shadow: 0 0 15px rgba(168,85,247,0.3), 0 0 30px rgba(168,85,247,0.1);
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .custom-cursor-dot, .neon-trail-dot { display: none; }
    .reveal { opacity: 1; transform: none; }
    .text-split .char { opacity: 1; transform: none; }
}

/* ---- Print ---- */
@media print {
    nav, footer, #backToTop, .custom-cursor-dot, .neon-trail-dot, .no-print, #darkModeToggle { display: none !important; }
    body { font-size: 12pt; }
}
