/*
Theme Name: PACIVO Astra Child
Theme URI: https://pacivo.vn
Description: Child theme for Astra, customized for PACIVO medical imaging product website.
Author: Tran Thịnh
Author URI: https://pacivo.vn
Template: astra
Version: 1.0.0
Text Domain: astra-child
*/

/* ═══════════════════════════════════════════════════
   CUSTOM ANIMATIONS & UTILITY STYLES FROM DESIGN
   ════════════════════════════════════════════════════════ */

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

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

@keyframes scanSweep { 
    0% { top: 7%; opacity: 0; } 
    12% { opacity: 1; } 
    86% { opacity: 1; } 
    100% { top: 90%; opacity: 0; } 
}

@keyframes glowPulse { 
    0%, 100% { opacity: 0.45; transform: scale(1); } 
    50% { opacity: 0.85; transform: scale(1.07); } 
}

@keyframes marquee { 
    from { transform: translateX(0); } 
    to { transform: translateX(-50%); } 
}

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

@keyframes ringSpin { 
    from { transform: rotate(0); } 
    to { transform: rotate(360deg); } 
}

/* CSS Utilities */
.pacivo-float { animation: floatY 6s ease-in-out infinite; }
.pacivo-floatb { animation: floatYb 7s ease-in-out infinite; }
.pacivo-scanline { animation: scanSweep 3.8s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.pacivo-glow-pulse { animation: glowPulse 4.5s ease-in-out infinite; }
.pacivo-ring-spin { animation: ringSpin 26s linear infinite; transform-origin: center; }
.pacivo-marq { animation: marquee 28s linear infinite; }
.pacivo-blink { animation: blink 1.6s ease-in-out infinite; }

.pacivo-grain { 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); 
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #2563EB40; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* Typography */
body {
    font-family: 'Inter', system-ui, sans-serif;
    color: #0C2030;
    -webkit-font-smoothing: antialiased;
}

/* Grid Layouts */
.pacivo-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 991px) {
    .pacivo-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
    .pacivo-grid-3 { grid-template-columns: 1fr; }
}

.pacivo-hero-grid {
    display: grid;
    grid-template-columns: 1.02fr 1fr;
    gap: 56px;
    align-items: center;
}
@media (max-width: 991px) {
    .pacivo-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Hover effect */
.pacivo-btn-hover-effect {
    transition: all 0.15s ease-in-out;
}
.pacivo-btn-hover-effect:hover {
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════
   NAVIGATION MENU STYLES
   ════════════════════════════════════════════════════════ */

/* Desktop nav container */
.pacivo-nav-container {
    display: flex;
    align-items: center;
    flex: 1;
}
.pacivo-nav-container .pacivo-menu,
.pacivo-nav-container ul {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.pacivo-nav-container ul li { margin: 0; padding: 0; }
.pacivo-nav-container ul li a {
    display: block;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    color: #4A4A6A;
    transition: all .15s ease-in-out;
}
.pacivo-nav-container ul li a:hover {
    background: #F8F9FC;
    color: #1A1A2E;
}
.pacivo-nav-container ul li.current-menu-item a,
.pacivo-nav-container ul li.current_page_item a {
    color: #2563EB !important;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════
   HAMBURGER TOGGLE - MOBILE RESPONSIVE
   ════════════════════════════════════════════════════════ */

/* DESKTOP: Hide hamburger toggle */
button#pacivo-menu-toggle,
.pacivo-menu-toggle {
    display: none !important;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background .15s;
    flex-shrink: 0;
}

/* DESKTOP: Show desktop CTA button */
a.pacivo-desktop-cta,
.pacivo-desktop-cta {
    display: inline-block !important;
}

/* Mobile CTA inside nav dropdown: always hidden until mobile + active */
.pacivo-mobile-cta {
    display: none !important;
}

/* MOBILE BREAKPOINT */
@media (max-width: 767px) {
    /* Show hamburger button on mobile */
    button#pacivo-menu-toggle,
    .pacivo-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .pacivo-menu-toggle:hover {
        background: #F0F4FF;
    }
    
    /* Hide desktop CTA on mobile */
    a.pacivo-desktop-cta,
    .pacivo-desktop-cta {
        display: none !important;
    }
    
    /* Nav container: collapsed by default on mobile */
    .pacivo-nav-container {
        display: none !important;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid #E2E4EE;
        padding: 16px;
        z-index: 199;
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Nav container: open state controlled by JS */
    .pacivo-nav-container.active {
        display: flex !important;
    }
    
    /* Nav list on mobile */
    .pacivo-nav-container .pacivo-menu,
    .pacivo-nav-container ul {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        display: flex !important;
    }
    
    .pacivo-nav-container ul li a {
        padding: 10px 14px;
        font-size: 15px;
    }
    
    /* Mobile CTA: visible when nav is open */
    .pacivo-nav-container.active .pacivo-mobile-cta {
        display: block !important;
        margin-top: 12px;
    }
    
    /* Hamburger -> X animation */
    .pacivo-menu-toggle svg line {
        transition: transform 0.2s ease, opacity 0.2s ease;
        transform-origin: center;
    }
    .pacivo-menu-toggle.open svg #line2 {
        opacity: 0;
    }
    .pacivo-menu-toggle.open svg #line1 {
        transform: translateY(6px) rotate(45deg);
    }
    .pacivo-menu-toggle.open svg #line3 {
        transform: translateY(-6px) rotate(-45deg);
    }
}
