/**
 * Custom CSS for Flatsome Child Theme
 * Includes FullPage.js and SweetAlert2 custom styles
 */

/* =============================================
   FullPage Logo Switching (Dark/Light) - Push Effect
   ============================================= */

/* Logo container setup */
#logo {
    position: relative;
    overflow: hidden;
}

#logo a {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Both logos stacked - sync with fullpage scroll speed (700ms) */
#logo .header-logo,
#logo .header-logo-dark {
    transition: transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1);
    flex-shrink: 0;
}

/* No transition on first load */
body.fp-no-transition #logo .header-logo,
body.fp-no-transition #logo .header-logo-dark {
    transition: none !important;
}

/* Override Flatsome default */
body.fp-logo-light .header-logo,
body.fp-logo-light .header-logo-dark,
body.fp-logo-dark .header-logo,
body.fp-logo-dark .header-logo-dark {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Light mode: Logo light ở vị trí hiển thị, logo dark bị đẩy lên trên */
body.fp-logo-light .header-logo {
    transform: translateY(0);
}

body.fp-logo-light .header-logo-dark {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transform: translateY(-100%);
}

/* Dark mode: Logo dark đẩy logo light xuống */
body.fp-logo-dark .header-logo {
    transform: translateY(100%);
}

body.fp-logo-dark .header-logo-dark {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transform: translateY(0);
}

/* =============================================
   FullPage.js Base Styles
   ============================================= */

/* Ẩn watermark FullPage.js */
.fp-watermark {
    display: none !important;
}

/* Main wrapper */
.fullpage-wrapper-container {
    position: relative;
}

/* FullPage Section Item - Flatsome Section với FullPage bật */
.fp-section-item {
    position: relative;
    box-sizing: border-box;
}

/* Đảm bảo section chiếm full viewport */
.fp-section-item.section {
    min-height: 100vh !important;
}

/* =============================================
   FIX: Section styling for fullpage.js
   ============================================= */

/* Để fullpage.js tự quản lý position và z-index của sections */
/* Chỉ đảm bảo section content có background đúng */
.fullpage-wrapper-container .section > .section-inner,
.fullpage-wrapper-container .section > .fp-overflow > .section-inner {
    position: relative;
    background: inherit;
}

/* Fix cho Flatsome section padding */
.fullpage-wrapper-container .fp-section-item .section-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

/* Section content */
.fp-section-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Background overlay */
.fp-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

/* =============================================
   FullPage Navigation Styles
   ============================================= */

#fp-nav ul li a span,
.fp-slidesNav ul li a span {
    background: #ffffff;
    width: 8px;
    height: 8px;
}

#fp-nav ul li a.active span,
.fp-slidesNav ul li a.active span {
    background: #ffffff;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
}

#fp-nav ul li .fp-tooltip {
    font-family: inherit;
    font-size: 14px;
    background: #446084;
    color: #fff;
    padding: 5px 15px;
    border-radius: 4px;
}

/* =============================================
   Numbered Navigation Style (like image)
   ============================================= */

.fp-nav-numbered #fp-nav {
    top: 50%;
    transform: translateY(-50%);
}

.fp-nav-numbered #fp-nav ul li {
    display: flex;
    align-items: center;
    margin: 12px 0;
    width: auto;
    height: auto;
}

.fp-nav-numbered #fp-nav ul li a {
    display: none !important;
}

/* Tooltip always visible as number */
.fp-nav-numbered #fp-nav ul li .fp-tooltip {
    position: static !important;
    display: flex !important;
    align-items: center;
    visibility: visible !important;
    opacity: 1 !important;
    background: transparent !important;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 500;
    padding: 0 !important;
    margin: 0 !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    white-space: nowrap;
    transition: all 0.3s ease;
    transform: none !important;
}

/* Line before number */
.fp-nav-numbered #fp-nav ul li .fp-tooltip::before {
    content: '';
    display: inline-block;
    width: 15px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
    margin-right: 15px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Active state - when parent li has active a */
.fp-nav-numbered #fp-nav ul li:has(a.active) .fp-tooltip,
.fp-nav-numbered #fp-nav ul li .fp-tooltip.has-name {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.fp-nav-numbered #fp-nav ul li:has(a.active) .fp-tooltip::before {
    width: 35px;
    height: 2px;
    background: #f0a030;
}

/* Hover state */
.fp-nav-numbered #fp-nav ul li:hover .fp-tooltip {
    color: rgba(255, 255, 255, 0.8);
}

.fp-nav-numbered #fp-nav ul li:hover .fp-tooltip::before {
    width: 25px;
    background: rgba(255, 255, 255, 0.6);
}

/* Right position adjustments */
.fp-nav-numbered #fp-nav.fp-right {
    right: 30px;
}

/* Left position adjustments */
.fp-nav-numbered #fp-nav.fp-left {
    left: 30px;
}

.fp-nav-numbered #fp-nav.fp-left ul li .fp-tooltip::before {
    margin-right: 0;
    margin-left: 12px;
}

/* =============================================
   Animation Classes
   ============================================= */

/* Base animation class */
.fp-animate {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fp-animate.fp-animated {
    opacity: 1;
}

/* Fade In */
.fp-anim-fade-in {
    opacity: 0;
}

.fp-anim-fade-in.fp-animated {
    opacity: 1;
}

/* Fade In Up */
.fp-anim-fade-in-up {
    opacity: 0;
    transform: translateY(50px);
}

.fp-anim-fade-in-up.fp-animated {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In Down */
.fp-anim-fade-in-down {
    opacity: 0;
    transform: translateY(-50px);
}

.fp-anim-fade-in-down.fp-animated {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In Left */
.fp-anim-fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
}

.fp-anim-fade-in-left.fp-animated {
    opacity: 1;
    transform: translateX(0);
}

/* Fade In Right */
.fp-anim-fade-in-right {
    opacity: 0;
    transform: translateX(50px);
}

.fp-anim-fade-in-right.fp-animated {
    opacity: 1;
    transform: translateX(0);
}

/* Zoom In */
.fp-anim-zoom-in {
    opacity: 0;
    transform: scale(0.8);
}

.fp-anim-zoom-in.fp-animated {
    opacity: 1;
    transform: scale(1);
}

/* Zoom Out */
.fp-anim-zoom-out {
    opacity: 0;
    transform: scale(1.2);
}

.fp-anim-zoom-out.fp-animated {
    opacity: 1;
    transform: scale(1);
}

/* Slide Up */
.fp-anim-slide-up {
    opacity: 0;
    transform: translateY(100%);
}

.fp-anim-slide-up.fp-animated {
    opacity: 1;
    transform: translateY(0);
}

/* Slide Down */
.fp-anim-slide-down {
    opacity: 0;
    transform: translateY(-100%);
}

.fp-anim-slide-down.fp-animated {
    opacity: 1;
    transform: translateY(0);
}

/* Slide Left */
.fp-anim-slide-left {
    opacity: 0;
    transform: translateX(100%);
}

.fp-anim-slide-left.fp-animated {
    opacity: 1;
    transform: translateX(0);
}

/* Slide Right */
.fp-anim-slide-right {
    opacity: 0;
    transform: translateX(-100%);
}

.fp-anim-slide-right.fp-animated {
    opacity: 1;
    transform: translateX(0);
}

/* =============================================
   FullPage.js Navigation Styles
   ============================================= */

/* Navigation bullets */
#fp-nav ul li a span,
.fp-slidesNav ul li a span {
    background: #ffffff;
    width: 0.78125rem;
    height: 3px;
    margin: -6px 0 0 -6px;
    border-radius: 0;
    opacity: 0.5;
}

#fp-nav ul li:hover a span,
.fp-slidesNav ul li:hover a span {
    background: #ffffff;
    width: 2.34375rem;
    height: 3px;
    margin: -6px 0 0 -6px;
    border-radius: 0;
}

#fp-nav ul li a.active span,
.fp-slidesNav ul li a.active span {
    background: #ffffff;
    width: 2.34375rem;
    height: 3px;
    margin: -6px 0 0 -6px;
    border-radius: 0;
    opacity: 1;
}

/* Navigation tooltips */
#fp-nav ul li .fp-tooltip {
    font-family: inherit;
    font-size: 14px;
    background: transparent;
    color: #fff;
    padding: 5px 15px;
    border-radius: 4px;
}

/* Control arrows */
.fp-controlArrow {
    border-color: transparent;
}

.fp-controlArrow.fp-prev {
    border-right-color: #446084;
}

.fp-controlArrow.fp-next {
    border-left-color: #446084;
}

/* Slide navigation */
.fp-slidesNav ul li a span {
    background: rgba(255, 255, 255, 0.5);
}

.fp-slidesNav ul li a.active span {
    background: #fff;
}

/* =============================================
   SweetAlert2 Custom Styles for Flatsome
   ============================================= */

/* Popup styling */
.swal2-popup {
    font-family: inherit;
    border-radius: 8px;
}

/* Title */
.swal2-title {
    color: #333;
    font-weight: 600;
}

/* Content */
.swal2-html-container {
    color: #666;
}

/* Confirm button */
.swal2-confirm {
    background-color: #446084 !important;
    border-radius: 4px !important;
    padding: 10px 30px !important;
    font-weight: 600 !important;
}

.swal2-confirm:hover {
    background-color: #364d6a !important;
}

.swal2-confirm:focus {
    box-shadow: 0 0 0 3px rgba(68, 96, 132, 0.3) !important;
}

/* Cancel button */
.swal2-cancel {
    border-radius: 4px !important;
    padding: 10px 30px !important;
    font-weight: 600 !important;
}

/* Icon colors */
.swal2-icon.swal2-success {
    border-color: #446084;
    color: #446084;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(68, 96, 132, 0.3);
}

.swal2-icon.swal2-success [class^=swal2-success-line] {
    background-color: #446084;
}

/* Toast styling */
.swal2-toast {
    background: #fff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

.swal2-toast .swal2-title {
    font-size: 14px;
    font-weight: 500;
}

/* Timer progress bar */
.swal2-timer-progress-bar {
    background: #446084;
}

/* =============================================
   FullPage Sections Example Styles
   ============================================= */

/* Hero section */
.fp-section-hero {
    background: linear-gradient(135deg, #446084 0%, #2c3e50 100%);
    color: #fff;
}

.fp-section-hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.fp-section-hero p {
    font-size: 20px;
    opacity: 0.9;
}

/* About section */
.fp-section-about {
    background: #f8f9fa;
}

/* Services section */
.fp-section-services {
    background: #fff;
}

/* Contact section */
.fp-section-contact {
    background: linear-gradient(135deg, #2c3e50 0%, #446084 100%);
    color: #fff;
}

/* =============================================
   Responsive Styles
   ============================================= */

@media screen and (max-width: 768px) {
    /* Disable FullPage effects on mobile */
    .fullpage-wrapper-container {
        height: auto !important;
    }
    
    .fullpage-wrapper-container .section {
        height: auto !important;
        min-height: auto !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
    }
    
    .fullpage-wrapper-container .fp-tableCell {
        height: auto !important;
        display: block !important;
    }
    
    /* Hide FullPage navigation on mobile */
    #fp-nav {
        display: none !important;
    }
    
    .fp-section-hero h1 {
        font-size: 32px;
    }

    .fp-section-hero p {
        font-size: 16px;
    }

    .swal2-popup {
        width: 90% !important;
        padding: 20px !important;
    }
    
    /* Reset logo switching on mobile - show default logo */
    #logo .header-logo {
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
    }
    
    #logo .header-logo-dark {
        display: none !important;
    }
}

/* =============================================
   Utility Classes
   ============================================= */

/* Scroll down indicator */
.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down i {
    font-size: 30px;
    color: #fff;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-15px);
    }
    60% {
        transform: translateX(-50%) translateY(-7px);
    }
}

/* Fade in animation */
.fp-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fp-fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* Slide in from left */
.fp-slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.fp-slide-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* Slide in from right */
.fp-slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.fp-slide-right.active {
    opacity: 1;
    transform: translateX(0);
}
#fp-nav ul, .fp-slidesNav ul {
   display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 3px;
}

#fp-nav ul li .fp-tooltip {
    top: -16px;
}

#fp-nav ul li:hover a span, .fp-slidesNav ul li:hover a span {
    background: #ffffff;
    width: 2.34375rem !important;
    height: 3px !important;
    margin: -6px 0 0 -6px !important;
    border-radius: 0 !important;
    /* display: none; */
}

#fp-nav ul li .fp-tooltip.fp-left {
    left: 14px;
    opacity: 1 !important;
    padding-right: 20px;
}

.fp-tooltip.fp-left.has-name {
    left: 30px ! IMPORTANT;
}

#fp-nav ul li:hover >.fp-tooltip.fp-left {
    left: 30px;
}

#fp-nav ul li a::before {
    content: "";
    width: 50px;
    height: 19px;
    z-index: 99999;
    position: absolute;
    top: -8px;
}