/*
Theme Name: Floral Art Gallery
Theme URI: https://khangdraw.maxvn.net/floral-art-gallery
Author: KhangDraw
Author URI: https://khangdraw.maxvn.net
Description: Dedicated WordPress theme for fine art botanical galleries, featuring interactive 3D parallax hero sections, iPhone notch navigation, and CSS 3D animated falling petals.
Version: 1.2.1
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: floral-art-gallery
Tags: portfolio, gallery, parallax, dark, photography, visual-art

Floral Art Gallery WordPress Theme, Copyright 2026 KhangDraw
Floral Art Gallery is distributed under the terms of the GNU GPL
*/

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

:root {
    --gold: #d4af37;
    --gold-light: #f3e5ab;
    --bg-dark: #0a0809;
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
    /* Spring Bounce Easing cho hiệu ứng nảy kiểu iOS Dynamic Island */
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    background-color: var(--bg-dark);
    color: #f5f5f7;
    font-family: var(--font-sans);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body::-webkit-scrollbar {
    display: none;
}

a {
    color: inherit;
    text-decoration: none;
}

.section-title,
.section-title a,
.page-title,
.page-title a,
.archive-title,
.archive-title a,
.entry-title,
.entry-title a,
h1, h1 a,
h2, h2 a,
h3, h3 a {
    color: #ffffff;
    text-decoration: none;
}

#header,
#header hr,
#page > hr {
    display: none !important;
}

/* ==================== DYNAMIC SPRING IPHONE NOTCH NAV ==================== */
.notch-nav-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 0;
    width: auto;
    max-width: 95vw;
}

.notch-nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(15, 12, 15, 0.88);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 10px 22px 12px 22px;
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-top: none;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.75),
                0 0 20px rgba(212, 175, 55, 0.08);
    will-change: transform, width, padding, border-radius;
    transition: transform 0.5s var(--ease-spring), 
                box-shadow 0.4s var(--transition-smooth), 
                border-color 0.4s var(--transition-smooth),
                background 0.4s ease;
}

.notch-nav:hover {
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85),
                0 0 25px rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.45);
}

/* Nút Quay Lại (Dành cho trang Single Post) tích hợp liền khối Tai Thỏ */
.notch-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold-light);
    transition: all 0.4s var(--ease-spring);
    flex-shrink: 0;
}

.notch-back-btn:hover {
    background: var(--gold);
    color: #000;
    transform: scale(1.15) rotate(-5deg);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

/* Logo Tai thỏ */
.notch-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    flex-shrink: 0;
    white-space: nowrap;
}

.notch-logo-icon {
    width: 8px;
    height: 8px;
    background-color: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--gold);
    flex-shrink: 0;
    transition: transform 0.4s var(--ease-spring);
}

.notch-logo:hover .notch-logo-icon {
    transform: scale(1.6);
}

/* Menu Wrapper & Item Styles */
.notch-menu-wrapper {
    display: flex;
    align-items: center;
}

.notch-menu-wrapper ul {
    display: flex;
    list-style: none;
    gap: 6px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.notch-menu-wrapper ul li {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: -12px;
}

.notch-menu-wrapper ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.notch-menu-wrapper ul li:hover > a,
.notch-menu-wrapper ul li.current-menu-item > a {
    color: var(--gold-light);
    background: rgba(212, 175, 55, 0.12);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* Mũi tên Dropdown indicator cho item có menu con */
.notch-menu-wrapper ul li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.6);
    transition: transform 0.3s var(--ease-spring), border-color 0.3s ease;
}

.notch-menu-wrapper ul li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
    border-top-color: var(--gold-light);
}

/* ==================== XỔ XUỐNG DYNAMIC SPRING DROP-DOWN (GIỮ KHUNG KHI DI CHUỘT) ==================== */
.notch-menu-wrapper ul .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) scale(0.92) translateY(-8px);
    transform-origin: top center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
    background: rgba(18, 14, 18, 0.96);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.85),
                0 0 20px rgba(212, 175, 55, 0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, 
                transform 0.4s var(--ease-spring), 
                visibility 0.3s ease;
    transition-delay: 0.15s; /* Tạo độ trễ giữ khung khi rê chuột ra ngoài */
    z-index: 1100;
}

/* Cầu nối trong suốt giúp giữ hover mượt mà liên tục giữa nút bấm và submenu */
.notch-menu-wrapper ul .sub-menu::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
    background: transparent;
}

/* Hover mở Sub-menu kiểu Elastic Nảy */
.notch-menu-wrapper ul li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) scale(1) translateY(0);
    transition-delay: 0s; /* Mở ngay lập tức khi di chuột vào */
}

.notch-menu-wrapper ul .sub-menu li {
    padding-bottom: 0;
    margin-bottom: 0;
}

.notch-menu-wrapper ul .sub-menu li a {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    justify-content: space-between;
    transition: all 0.25s ease;
}

.notch-menu-wrapper ul .sub-menu li a:hover {
    background: rgba(212, 175, 55, 0.18);
    color: #ffffff;
    transform: translateX(4px);
}

/* Multi-level (Menu con cấp 2+) */
.notch-menu-wrapper ul .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    transform: translateX(-10px) scale(0.92);
    transform-origin: left top;
}

.notch-menu-wrapper ul .sub-menu .sub-menu::before {
    top: 0;
    left: -14px;
    width: 14px;
    height: 100%;
}

.notch-menu-wrapper ul .sub-menu li:hover > .sub-menu {
    transform: translateX(0) scale(1);
    transition-delay: 0s;
}

/* ==================== ACTION BUTTONS & SEARCH POPUP ==================== */
.notch-action {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.notch-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: all 0.4s var(--ease-spring);
    padding: 0;
    flex-shrink: 0;
}

.notch-search-toggle:hover,
.notch-search-toggle.is-active {
    color: #000;
    background: var(--gold);
    border-color: var(--gold);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
}

/* Nút Toggle Mobile Menu */
.notch-mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.notch-search-form {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: auto;
    width: 300px;
    max-width: 88vw;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(18, 14, 18, 0.96);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 20px;
    padding: 8px 10px 8px 18px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-15px) scale(0.9);
    transform-origin: top right;
    transition: opacity 0.3s ease, transform 0.4s var(--ease-spring), visibility 0.3s;
    z-index: 1200;
}

.notch-search-form.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.notch-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    padding: 6px 0;
}

.notch-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.notch-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--gold-light);
    cursor: pointer;
    transition: all 0.3s var(--ease-spring);
    flex-shrink: 0;
}

.notch-search-submit:hover {
    background: var(--gold);
    color: #000;
    transform: scale(1.1);
}

/* Mobile Responsive Adjustments */
@media (max-width: 868px) {
    .notch-mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .notch-menu-wrapper {
        position: absolute;
        top: calc(100% + 12px);
        left: 0;
        right: 0;
        background: rgba(18, 14, 18, 0.96);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border: 1px solid rgba(212, 175, 55, 0.3);
        border-radius: 20px;
        padding: 16px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.9);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-15px) scale(0.95);
        transition: opacity 0.3s ease, transform 0.4s var(--ease-spring), visibility 0.3s;
    }

    .notch-nav.is-mobile-open .notch-menu-wrapper {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .notch-menu-wrapper ul {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .notch-menu-wrapper ul li {
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .notch-menu-wrapper ul .sub-menu {
        position: static;
        transform: none !important;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        box-shadow: none;
        border: none;
        background: rgba(255,255,255,0.03);
        margin-top: 6px;
        display: none;
        transition: none;
        transition-delay: 0s;
    }

    .notch-menu-wrapper ul .sub-menu::before {
        display: none;
    }

    .notch-menu-wrapper ul li.is-mobile-expanded > .sub-menu {
        display: flex;
    }
}

/* ==================== HERO PARALLAX & OTHER SECTIONS ==================== */
.hero-viewport {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    perspective: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.parallax-container {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.layer {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    pointer-events: none;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.layer-bg {
    background: radial-gradient(circle at center, rgba(30, 10, 20, 0.4) 0%, rgba(10, 8, 9, 0.98) 75%),
                url('https://images.unsplash.com/photo-1518895949257-7621c3c786d7?q=80&w=1200&auto=format&fm=webp&fit=crop') center/cover no-repeat;
    filter: brightness(0.45) contrast(1.1);
}

.layer-dust {
    background-image: url('https://raw.githubusercontent.com/KuraoHikari/assets/main/dust-particles.png');
    background-size: cover;
    opacity: 0.35;
}

.art-card {
    position: absolute;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8),
                0 0 20px rgba(212, 175, 55, 0.15);
    background-size: cover;
    background-position: center;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.art-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(10, 8, 9, 0.6) 100%);
}

.card-1 { width: 18vw; height: 24vw; top: 12%; left: 8%; }
.card-2 { width: 16vw; height: 22vw; top: 10%; right: 10%; }
.card-3 { width: 15vw; height: 20vw; bottom: 18%; left: 12%; }
.card-4 { width: 19vw; height: 25vw; bottom: 15%; right: 7%; }
.card-5 { width: 12vw; height: 16vw; top: 42%; left: 3%; }
.card-6 { width: 13vw; height: 17vw; top: 38%; right: 4%; }

.hero-title-box {
    position: absolute;
    z-index: 10;
    text-align: center;
    pointer-events: none;
    padding: 40px 60px;
    border-radius: 24px;
    background: radial-gradient(ellipse at center, rgba(10, 8, 9, 0.65) 0%, rgba(10, 8, 9, 0) 75%);
    will-change: transform, opacity;
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.6em;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 1.2rem;
    opacity: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(212, 175, 55, 0.4);
    animation: fadeInDown 1.5s var(--transition-smooth) 0.5s forwards;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 8.5vw, 8.5rem);
    font-weight: 300;
    line-height: 0.95;
    color: #ffffff;
    letter-spacing: 0.02em;
    opacity: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.95), 0 10px 40px rgba(0, 0, 0, 0.9), 0 0 30px rgba(255, 255, 255, 0.15);
    animation: zoomIn 1.8s var(--transition-smooth) 0.2s forwards;
}

.hero-title i {
    font-style: italic;
    font-weight: 300;
    color: var(--gold-light);
}

.hero-divider {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 20px auto 0;
    opacity: 0.7;
}

.explore-btn-wrapper {
    position: absolute;
    bottom: 40px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
    opacity: 0;
    animation: fadeInUp 1.5s var(--transition-smooth) 1s forwards;
}

.explore-btn {
    position: relative;
    padding: 16px 36px;
    border-radius: 40px;
    background: rgba(10, 8, 9, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    transition: all 0.5s var(--transition-smooth);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(212, 175, 55, 0.1);
}

.explore-btn-wrapper:hover .explore-btn {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.3);
}

.scroll-indicator {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, var(--gold) 0%, transparent 100%);
    animation: pulseScroll 2s infinite ease-in-out;
}

/* ==================== MAIN HOMEPAGE CONTENT ==================== */
#main-homepage {
    position: relative;
    z-index: 30;
    background-color: var(--bg-dark);
    padding: 120px 8vw;
    min-height: 100vh;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 80px;
    padding-bottom: 30px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 300;
    color: #ffffff;
}

.section-desc {
    max-width: 350px;
    font-size: 0.85rem;
    color: #888;
    line-height: 1.8;
    font-weight: 300;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 30px;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background-color: #121012;
    cursor: pointer;
    transition: transform 0.6s var(--transition-smooth);
    will-change: transform;
}

.gallery-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--transition-smooth), filter 0.8s ease;
    filter: brightness(0.85);
}

.gallery-item:hover { transform: translateY(-8px); }
.gallery-item:hover .gallery-item-img { transform: scale(1.03); filter: brightness(1); }

.item-large { grid-column: span 8; height: 550px; }
.item-small { grid-column: span 4; height: 550px; }
.item-medium { grid-column: span 4; height: 420px; }
.item-wide { grid-column: span 8; height: 420px; }

.item-info {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 30px;
    background: linear-gradient(0deg, rgba(10,8,9,0.9) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateY(15px);
    opacity: 0.8;
    transition: all 0.5s var(--transition-smooth);
}

.gallery-item:hover .item-info { transform: translateY(0); opacity: 1; }
.item-tag { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.item-title { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 300; }

/* Keyframes */
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes pulseScroll { 0%, 100% { opacity: 0.3; transform: scaleY(0.8); } 50% { opacity: 1; transform: scaleY(1.2); } }

/* Pure CSS Petals Animation */
#petals-container {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: 25; overflow: hidden;
}

.css-petal {
    position: absolute;
    top: -30px;
    left: var(--l, 10%);
    width: var(--s, 12px);
    height: calc(var(--s, 12px) * 1.4);
    background-color: var(--bg, rgba(255, 215, 225, 0.75));
    border-radius: 0% 70% 30% 70% / 0% 70% 30% 70%;
    box-shadow: inset -2px -2px 6px rgba(255, 255, 255, 0.3), 0 4px 10px rgba(0, 0, 0, 0.3);
    will-change: transform;
    animation: floatPetalPure var(--dur, 9s) linear infinite;
    animation-delay: var(--d, 0s);
}

@keyframes floatPetalPure {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translate3d(var(--x, 40px), 105vh, 0) rotate(360deg); opacity: 0; }
}