/* ===================================
   NUSA PENIDA TATTOO - CUSTOM STYLES
   Glassmorphism Design Theme
   =================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0f0f0f;
    --secondary: #1a1a1a;
    --accent: #d4af37;
    --light: #f5f5f5;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    color: var(--light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Glassmorphism Base */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.glass-lg {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.6);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-glow {
    animation: glow 3s ease-in-out infinite;
}

/* Stagger Animation */
.stagger-item {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.15;
    z-index: -1;
}

.hero-content {
    text-align: center;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

/* Hover Effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.2);
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 1;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* FAQ Accordion */
.faq-item {
    border-bottom: 1px solid var(--glass-border);
}

.faq-question {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-bottom: 0;
}

.faq-answer.active {
    max-height: 500px;
    padding-bottom: 20px;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-icon.active {
    transform: rotate(180deg);
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, #f5f5f5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
        padding-top: 60px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.875rem;
    }
}

/* Mobile Menu Toggle */
#mobile-menu {
    transition: max-height 0.3s ease-in-out;
}

/* WhatsApp Button Animation */
@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

a[href^="https://wa.me/"] {
    animation: whatsapp-pulse 2s infinite;
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s ease;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f5d780;
}

/* Loading state for images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .fixed, nav, footer {
        display: none;
    }
}

/* ================================================
   WordPress Navigation Menu Styles
   ================================================ */

/* Header Navigation Menu */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    display: inline-block;
    position: relative;
}

nav ul li a {
    color: var(--light);
    text-decoration: none;
    transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a:focus {
    color: var(--accent);
}

/* Current menu item */
nav ul li.current-menu-item > a,
nav ul li.current_page_item > a {
    color: var(--accent);
}

/* Desktop menu spacing */
nav .flex.gap-8 li {
    margin: 0;
}

/* Mobile menu */
#mobile-menu ul {
    list-style: none;
}

#mobile-menu li {
    display: block;
}

#mobile-menu li a {
    display: block;
    padding: 0.5rem 0;
    color: var(--light);
    transition: color 0.3s ease;
}

#mobile-menu li a:hover {
    color: var(--accent);
}

/* Footer menu */
footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

footer ul li {
    display: block;
}

footer ul li a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer ul li a:hover {
    color: var(--accent);
}

/* Logo container */
.site-logo {
    display: flex;
    align-items: center;
}

.site-logo img {
    display: block;
}

/* Custom Logo in footer */
footer .site-logo img {
    max-width: 200px;
}

/* Responsive menu adjustments */
@media (max-width: 768px) {
    #mobile-menu ul li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    #mobile-menu ul li:last-child {
        border-bottom: none;
    }
}

/* ================================================
   GALLERY & MODAL STYLES
   ================================================ */

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 1;
    cursor: pointer;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 1200px;
    top: 50%;
    transform: translateY(-50%);
}

.modal .close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--light);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10000;
}

.modal .close:hover,
.modal .close:focus {
    color: var(--accent);
}

.modal-image-container {
    background: var(--glass-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.modal-image-container img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 80vh;
    object-fit: contain;
}

.modal-info {
    padding: 24px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.modal-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
    pointer-events: none;
}

.modal-nav button {
    pointer-events: all;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--light);
    padding: 16px 20px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-nav button:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: var(--accent);
    transform: scale(1.1);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal {
    animation: modalFadeIn 0.3s ease-out;
}

/* ================================================
   PORTFOLIO MODAL STYLES
   ================================================ */

.modal {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content-wrapper {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
    padding: 0 60px; /* Space for navigation buttons */
}

.modal-img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    transition: opacity 0.2s ease-in-out;
    display: block;
    margin: 0 auto;
}

.modal-caption {
    color: #f5f5f5;
    padding: 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    margin-top: 20px;
}

.modal-close {
    position: fixed;
    top: 20px;
    right: 40px;
    color: #f5f5f5;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.3s;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    line-height: 1;
}

.modal-close:hover,
.modal-close:focus {
    color: #d4af37;
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

.modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #f5f5f5;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 20px 16px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 10002;
    opacity: 0.7;
}

.modal-nav:hover {
    background: rgba(212, 175, 55, 0.4);
    border-color: #d4af37;
    color: #d4af37;
    opacity: 1;
    transform: translateY(-50%) scale(1.15);
}

.modal-nav-prev {
    left: 40px;
}

.modal-nav-next {
    right: 40px;
}

.modal-nav svg {
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Mobile responsive modal */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }

    .modal-content-wrapper {
        padding: 0 50px;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        font-size: 35px;
        width: 40px;
        height: 40px;
    }

    .modal-nav {
        padding: 14px 10px;
        opacity: 0.8;
    }

    .modal-nav-prev {
        left: 10px;
    }

    .modal-nav-next {
        right: 10px;
    }

    .modal-nav svg {
        width: 20px;
        height: 20px;
    }

    .modal-img {
        max-height: 70vh;
    }

    .modal-caption {
        font-size: 14px;
        padding: 15px;
    }
}

/* Hide navigation buttons on very small screens */
@media (max-width: 480px) {
    .modal-content-wrapper {
        padding: 0 40px;
    }

    .modal-nav {
        padding: 12px 8px;
        opacity: 0.6;
    }

    .modal-nav-prev {
        left: 5px;
    }

    .modal-nav-next {
        right: 5px;
    }
}

/* ================================================
   ARTICLE CARD STYLES
   ================================================ */

.article-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-image:hover img {
    transform: scale(1.1);
}

/* Line clamp utility */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ================================================
   404 PAGE STYLES
   ================================================ */

.error-404-number {
    font-size: 9rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--accent) 0%, #f5f5f5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .error-404-number {
        font-size: 6rem;
    }
}

/* ================================================
   BACKGROUND GRADIENTS
   ================================================ */

.bg-gradient-dark {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
}

.bg-gradient-dark-reverse {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
}

/* Hero background overlay */
.hero-bg-overlay {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.15;
    z-index: 0;
    background-size: cover;
    background-position: center;
}

/* ================================================
   BUTTON STYLES
   ================================================ */

.btn-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-glass-accent {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--accent);
    color: var(--accent);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-glass-accent:hover {
    background: var(--accent);
    color: var(--primary);
}

/* ================================================
   UTILITY CLASSES
   ================================================ */

.transition-cubic {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.transition-smooth {
    transition: all 0.3s ease;
}

.transition-transform {
    transition: transform 0.4s ease;
}

/* Aspect ratios */
.aspect-1 {
    aspect-ratio: 1;
}

.aspect-16-9 {
    aspect-ratio: 16/9;
}

/* Z-index utilities */
.z-0 {
    z-index: 0;
}

.z-1 {
    z-index: 1;
}

.z-10 {
    z-index: 10;
}

.z-9999 {
    z-index: 9999;
}

/* Backdrop blur utilities */
.backdrop-blur-5 {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.backdrop-blur-10 {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.backdrop-blur-20 {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ==================== FEATURED IMAGE FIX ==================== */

/* Article Image Container */
.article-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #1f1f1f 0%, #0f0f0f 100%);
    border-radius: 1rem 1rem 0 0; /* Rounded top corners */
}

/* Force Image Display */
.article-image img,
.article-image .wp-post-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 2 !important;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover Effect */
.article-image:hover img {
    transform: scale(1.08);
}

/* Link Inside Image Container */
.article-image a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Overlay on Hover (Optional) */
.article-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
    pointer-events: none;
}

.article-image:hover::after {
    opacity: 1;
}

/* Placeholder SVG Container */
.article-image .w-full.h-full.flex {
    height: 250px !important;
    width: 100% !important;
}

/* Responsive Heights */
@media (max-width: 768px) {
    .article-image {
        height: 200px;
    }
}

@media (min-width: 1024px) {
    .article-image {
        height: 280px;
    }
}

/* Fix Glass Effect Conflict */
.glass-lg .article-image::before,
.glass-lg .article-image::after {
    z-index: 1 !important;
}

/* Ensure Article Card Structure */
article.glass-lg {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Loading State (Optional) */
.article-image.loading {
    background: linear-gradient(
        90deg,
        #1f1f1f 25%,
        #2a2a2a 50%,
        #1f1f1f 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Fix Image Lazy Loading */
.article-image img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-image img[loading="lazy"].loaded,
.article-image img[loading="lazy"]:not([loading]) {
    opacity: 1 !important;
}

/* ==================== END FEATURED IMAGE FIX ==================== */

/* ==================== GALLERY PAGE FIXES ==================== */

/* ========== Article Image Container (Blog Section) ========== */
.article-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #1f1f1f 0%, #0f0f0f 100%);
    border-radius: 1rem 1rem 0 0;
}

.article-image img,
.article-image .wp-post-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 2 !important;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-image:hover img {
    transform: scale(1.08);
}

.article-image a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Placeholder SVG Container */
.article-image .w-full.h-full.flex {
    height: 250px !important;
    width: 100% !important;
}

/* ========== Gallery Grid Items ========== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
    background: linear-gradient(135deg, #1f1f1f 0%, #0f0f0f 100%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.3);
}

.gallery-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.8) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 2rem;
    z-index: 3;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* ========== Modal Styles ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content-wrapper {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.modal-img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 1rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-caption {
    margin-top: 1.5rem;
    text-align: center;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 3rem;
    font-weight: 300;
    color: #f5f5f5;
    cursor: pointer;
    z-index: 10001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: #d4af37;
    color: #d4af37;
    transform: rotate(90deg) scale(1.1);
}

/* Modal Navigation Buttons */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f5f5f5;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-nav:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: #d4af37;
    transform: translateY(-50%) scale(1.1);
}

.modal-nav-prev {
    left: 2rem;
}

.modal-nav-next {
    right: 2rem;
}

/* ========== Responsive Adjustments ========== */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .article-image {
        height: 200px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .gallery-overlay {
        padding: 1rem;
    }
    
    .modal {
        padding: 1rem;
    }
    
    .modal-close,
    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .modal-nav-prev {
        left: 1rem;
    }
    
    .modal-nav-next {
        right: 1rem;
    }
    
    .modal-close {
        top: 1rem;
        right: 1rem;
    }
    
    .modal-img {
        max-height: 70vh;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== Loading States ========== */
.gallery-item.loading,
.article-image.loading {
    background: linear-gradient(
        90deg,
        #1f1f1f 25%,
        #2a2a2a 50%,
        #1f1f1f 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ========== Fix Glass Effect Conflict ========== */
.glass-lg .article-image::before,
.glass-lg .article-image::after {
    z-index: 1 !important;
}

article.glass-lg {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Pagination Styling */
.page-numbers {
    list-style: none;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-numbers li {
    display: inline-block;
}

.page-numbers a,
.page-numbers span {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f5f5f5;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-numbers a:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    color: #d4af37;
}

.page-numbers .current {
    background: #d4af37;
    border-color: #d4af37;
    color: #0f0f0f;
}

.page-numbers .dots {
    background: transparent;
    border: none;
    color: #9ca3af;
}

.page-numbers .prev,
.page-numbers .next {
    font-weight: 600;
}

/* ==================== BACK TO TOP - LEFT SIDE ==================== */

.floating-backtop-wrapper {
    position: fixed;
    bottom: 24px;
    left: 24px; /* LEFT SIDE */
    z-index: 9000;
}

.floating-back-top {
    width: 56px;
    height: 56px;
    background: rgba(31, 41, 55, 0.85);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.floating-back-top.is-visible {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-back-top:hover {
    background: rgba(55, 65, 81, 0.95);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.floating-back-top:active {
    transform: translateY(-1px);
}

/* ==================== CONTACT MENU - RIGHT SIDE ==================== */

.floating-contact-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px; /* RIGHT SIDE */
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Toggle Button */
.floating-contact-toggle {
    position: relative;
    width: 64px;
    height: 64px;
    background: #2563eb;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.5);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.floating-contact-toggle:hover {
    background: #1d4ed8;
    transform: scale(1.1);
}

.floating-contact-toggle:active {
    transform: scale(0.95);
}

/* Toggle Icons */
.floating-menu-icon {
    display: block;
    transition: all 0.3s ease;
}

.floating-close-icon {
    display: none;
    transition: all 0.3s ease;
}

.floating-contact-toggle.is-open .floating-menu-icon {
    display: none;
}

.floating-contact-toggle.is-open .floating-close-icon {
    display: block;
    transform: rotate(90deg);
}

/* Pulse Animation */
@keyframes floatingPulse {
    0%, 100% {
        box-shadow: 0 10px 25px rgba(37, 99, 235, 0.5), 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    50% {
        box-shadow: 0 10px 25px rgba(37, 99, 235, 0.5), 0 0 0 15px rgba(37, 99, 235, 0);
    }
}

.floating-contact-toggle:not(.is-open) {
    animation: floatingPulse 2s infinite;
}

/* Menu Items Container */
.floating-contact-items {
    position: absolute;
    bottom: 80px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.floating-contact-items.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Menu Item */
.floating-contact-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    opacity: 0;
    transform: translateX(50px) scale(0.8);
}

.floating-contact-items.is-visible .floating-contact-item {
    animation: floatingSlideIn 0.4s ease-out forwards;
}

/* Stagger animation delay */
.floating-contact-items.is-visible .floating-contact-item[data-delay="0.1"] {
    animation-delay: 0.1s;
}
.floating-contact-items.is-visible .floating-contact-item[data-delay="0.15"] {
    animation-delay: 0.15s;
}
.floating-contact-items.is-visible .floating-contact-item[data-delay="0.2"] {
    animation-delay: 0.2s;
}
.floating-contact-items.is-visible .floating-contact-item[data-delay="0.25"] {
    animation-delay: 0.25s;
}
.floating-contact-items.is-visible .floating-contact-item[data-delay="0.3"] {
    animation-delay: 0.3s;
}
.floating-contact-items.is-visible .floating-contact-item[data-delay="0.35"] {
    animation-delay: 0.35s;
}

@keyframes floatingSlideIn {
    from {
        opacity: 0;
        transform: translateX(50px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Label */
.floating-contact-label {
    background: white;
    color: #1f2937;
    padding: 10px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(10px);
}

.floating-contact-item:hover .floating-contact-label {
    transform: translateX(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    opacity: 1;
}

.floating-contact-items.is-visible .floating-contact-label {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.1s;
}

/* Contact Button */
.floating-contact-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
}

.floating-contact-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.floating-contact-btn:active {
    transform: scale(1.05);
}

/* Button Colors */
.floating-btn-facebook {
    background: #1877f2;
}
.floating-btn-facebook:hover {
    background: #0866d6;
}

.floating-btn-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.floating-btn-whatsapp {
    background: #25d366;
}
.floating-btn-whatsapp:hover {
    background: #128c7e;
}

.floating-btn-tiktok {
    background: #000000;
}
.floating-btn-tiktok:hover {
    background: #333333;
}

.floating-btn-email {
    background: #ea4c89;
}
.floating-btn-email:hover {
    background: #d63c78;
}

.floating-btn-maps {
    background: #14b8a6;
}
.floating-btn-maps:hover {
    background: #0d9488;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    /* Back to Top - LEFT */
    .floating-backtop-wrapper {
        bottom: 20px;
        left: 20px;
    }
    
    .floating-back-top {
        width: 50px;
        height: 50px;
    }
    
    .floating-back-top svg {
        width: 20px;
        height: 20px;
    }
    
    /* Contact Menu - RIGHT */
    .floating-contact-wrapper {
        bottom: 20px;
        right: 20px;
    }
    
    .floating-contact-toggle {
        width: 56px;
        height: 56px;
    }
    
    .floating-contact-btn {
        width: 50px;
        height: 50px;
    }
    
    .floating-contact-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .floating-contact-label {
        font-size: 12px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .floating-backtop-wrapper {
        bottom: 16px;
        left: 16px;
    }
    
    .floating-contact-wrapper {
        bottom: 16px;
        right: 16px;
    }
    
    .floating-contact-label {
        font-size: 11px;
        padding: 6px 10px;
    }
}

/* ==================== POST CONTENT GALLERIES (single.php) ==================== */
/*
 * WordPress gallery blocks default to 2 columns (figure.wp-block-image is
 * sized to 50% width), so blog-post galleries only showed 2 images per row.
 * We re-flow every gallery into a responsive grid so all images show.
 *
 * IMPORTANT: each image needs a real height (aspect-ratio), otherwise grid
 * cells collapse and the images become invisible.
 */

/* Gutenberg gallery block (new "has-nested-images" + older "blocks-gallery-grid") */
.prose .wp-block-gallery.has-nested-images,
.prose .wp-block-gallery .blocks-gallery-grid,
.prose ul.blocks-gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    align-items: start;
    list-style: none !important;
    margin: 2rem 0;
    padding: 0;
}

.prose .wp-block-gallery.has-nested-images figure.wp-block-image,
.prose .blocks-gallery-grid .blocks-gallery-item {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.prose .wp-block-gallery img,
.prose .blocks-gallery-grid img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin: 0 !important;
    border-radius: 0.5rem;
}

/* Classic [gallery] shortcode */
.prose .gallery {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 2rem 0;
}

.prose .gallery .gallery-item {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

.prose .gallery .gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0.5rem;
}

/* ==================== TABLE OF CONTENTS PLUGIN ==================== */
/*
 * The post content uses prose-invert (dark theme), which makes the TOC
 * plugin title render white/light. Force the title to black.
 * Covers the common TOC plugins: Easy TOC, Table of Contents Plus,
 * LuckyWP, Rank Math, Ultimate Blocks.
 */
.ez-toc-title,
.ez-toc-title-container .ez-toc-title,
#toc_container .toc_title,
.lwptoc_title,
.lwptoc_header .lwptoc_title,
.rank-math-toc-title,
.rank-math-toc > h2,
.ub_table-of-contents-title,
.wp-block-table-of-contents__title {
    color: #000 !important;
}

/* ==================== ACCESSIBILITY ==================== */

.floating-back-top:focus,
.floating-contact-toggle:focus,
.floating-contact-btn:focus {
    outline: 3px solid rgba(37, 99, 235, 0.5);
    outline-offset: 2px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .floating-back-top,
    .floating-contact-toggle,
    .floating-contact-item,
    .floating-contact-btn {
        animation: none !important;
        transition: none !important;
    }
}


