/**
 * LIQUID GLASSMORPHISM DESIGN SYSTEM
 * Bhavyam Infotech - Premium Glass & Liquid Effects
 * Created: 2026-01-06
 *
 * This file implements a complete liquid/glassmorphism design system with:
 * - Advanced glassmorphism cards and elements
 * - Liquid blob animations
 * - Morphing gradients
 * - Frosted glass effects
 * - Glass reflections and refractions
 * - Liquid button interactions
 * - Floating glass particles
 */

/* ===================================
   CSS CUSTOM PROPERTIES
   =================================== */

:root {
    /* Brand Colors */
    --color-brown: #C47300;
    --color-gold: #B9B35A;
    --color-dark-brown: #371C15;

    /* Glass Colors */
    --glass-white: rgba(255, 255, 255, 0.1);
    --glass-white-strong: rgba(255, 255, 255, 0.25);
    --glass-white-subtle: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: rgba(31, 38, 135, 0.37);

    /* Liquid Colors */
    --liquid-primary: rgba(196, 115, 0, 0.6);
    --liquid-secondary: rgba(185, 179, 90, 0.6);
    --liquid-accent: rgba(55, 28, 21, 0.6);

    /* Effects */
    --blur-amount: 20px;
    --blur-strong: 40px;
    --blur-subtle: 10px;

    /* Spacing */
    --glass-padding: 30px;
    --glass-radius: 20px;
    --glass-radius-large: 30px;
    --glass-radius-small: 15px;
}

/* ===================================
   GLASSMORPHISM BASE CLASSES
   =================================== */

.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--glass-radius);
    box-shadow: 0 8px 32px var(--glass-shadow),
                inset 0 1px 1px rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.7s ease;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 48px var(--glass-shadow),
                inset 0 1px 1px rgba(255, 255, 255, 0.5);
    transform: translateY(-8px) scale(1.02);
}

/* Glass Card Variants */
.glass-card-strong {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(var(--blur-strong)) saturate(200%);
    -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(200%);
}

.glass-card-subtle {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(var(--blur-subtle)) saturate(160%);
    -webkit-backdrop-filter: blur(var(--blur-subtle)) saturate(160%);
}

.glass-card-dark {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card-brand {
    background: linear-gradient(
        135deg,
        rgba(196, 115, 0, 0.15) 0%,
        rgba(185, 179, 90, 0.15) 100%
    );
    backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    border: 1px solid rgba(196, 115, 0, 0.3);
}

/* ===================================
   LIQUID BLOB BACKGROUNDS
   =================================== */

.liquid-background {
    position: relative;
    overflow: hidden;
}

.liquid-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    mix-blend-mode: multiply;
    animation: float 20s infinite ease-in-out;
    will-change: transform;
}

.liquid-blob-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--color-brown) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.liquid-blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--color-gold) 0%, transparent 70%);
    bottom: -250px;
    right: -250px;
    animation-delay: -7s;
    animation-duration: 25s;
}

.liquid-blob-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--color-dark-brown) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
    animation-duration: 30s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-30px, 40px) scale(0.9);
    }
    75% {
        transform: translate(40px, 30px) scale(1.05);
    }
}

/* Morphing Blobs */
.liquid-blob-morph {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: float 20s infinite ease-in-out, morph 15s infinite ease-in-out;
}

@keyframes morph {
    0%, 100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
    25% {
        border-radius: 60% 40% 50% 70% / 60% 40% 50% 60%;
    }
    50% {
        border-radius: 50% 70% 40% 60% / 50% 70% 30% 60%;
    }
    75% {
        border-radius: 70% 50% 60% 40% / 40% 60% 70% 50%;
    }
}

/* ===================================
   FROSTED GLASS NAVIGATION
   =================================== */

.glass-header {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.glass-header.sticky {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(var(--blur-strong)) saturate(200%);
    -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(200%);
}

.glass-menu-item {
    position: relative;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.glass-menu-item:hover {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.glass-menu-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-brown), var(--color-gold));
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.glass-menu-item:hover::after,
.glass-menu-item.active::after {
    width: 80%;
}

/* ===================================
   LIQUID BUTTONS (Disabled - using standard button styles instead)
   =================================== */

/* Liquid button effects disabled to prevent visual glitches
   Buttons now use standard CSS from custom-brand-design.css */

/* ===================================
   GLASS REFLECTION EFFECTS
   =================================== */

.glass-reflection {
    position: relative;
}

.glass-reflection::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.4) 0%,
        transparent 100%
    );
    border-radius: var(--glass-radius) var(--glass-radius) 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glass-reflection:hover::before {
    opacity: 1;
}

/* Glass Shine Effect */
.glass-shine {
    position: relative;
    overflow: hidden;
}

.glass-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* ===================================
   FLOATING GLASS PARTICLES
   =================================== */

.glass-particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.glass-particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: floatParticle 15s infinite ease-in-out;
    will-change: transform, opacity;
}

.glass-particle:nth-child(1) {
    width: 60px;
    height: 60px;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.glass-particle:nth-child(2) {
    width: 80px;
    height: 80px;
    left: 30%;
    animation-delay: -3s;
    animation-duration: 15s;
}

.glass-particle:nth-child(3) {
    width: 40px;
    height: 40px;
    left: 50%;
    animation-delay: -6s;
    animation-duration: 18s;
}

.glass-particle:nth-child(4) {
    width: 70px;
    height: 70px;
    left: 70%;
    animation-delay: -9s;
    animation-duration: 20s;
}

.glass-particle:nth-child(5) {
    width: 50px;
    height: 50px;
    left: 90%;
    animation-delay: -12s;
    animation-duration: 16s;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* ===================================
   MORPHING GRADIENT BACKGROUNDS
   =================================== */

.morphing-gradient {
    background: linear-gradient(
        -45deg,
        var(--color-dark-brown),
        var(--color-brown),
        var(--color-gold),
        #d4a574
    );
    background-size: 400% 400%;
    animation: morphGradient 15s ease infinite;
}

@keyframes morphGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.morphing-gradient-glass {
    position: relative;
}

.morphing-gradient-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 1;
}

.morphing-gradient-glass > * {
    position: relative;
    z-index: 2;
}

/* ===================================
   GLASS CARDS - SERVICE ITEMS
   =================================== */

.service-item.glass-effect {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15),
                inset 0 1px 1px rgba(255, 255, 255, 0.3);
    opacity: 1;
    visibility: visible;
}

.service-item.glass-effect:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(196, 115, 0, 0.3);
    box-shadow: 0 12px 48px rgba(196, 115, 0, 0.2),
                inset 0 1px 1px rgba(255, 255, 255, 0.4);
    opacity: 1;
    visibility: visible;
}

.service-item.glass-effect .service-icon {
    background: rgba(196, 115, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(196, 115, 0, 0.3);
    opacity: 1;
    visibility: visible;
}

/* ===================================
   GLASS CARDS - CHOOSE ITEMS
   =================================== */

.choose-item.glass-effect,
.value-item.glass-effect {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    opacity: 1;
    visibility: visible;
}

.choose-item.glass-effect:hover,
.value-item.glass-effect:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(185, 179, 90, 0.3);
    transform: translateY(-8px) scale(1.02);
    opacity: 1;
    visibility: visible;
}

/* ===================================
   GLASS COUNTER CARDS
   =================================== */

.counter-card.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    opacity: 1;
    visibility: visible;
}

.counter-card.glass-effect:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 48px rgba(196, 115, 0, 0.25);
    opacity: 1;
    visibility: visible;
}

/* ===================================
   LIQUID WAVE DIVIDERS (disabled)
   =================================== */

.liquid-wave {
    display: none !important;
}

/* ===================================
   GLASS MODAL/OVERLAY
   =================================== */

.glass-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(55, 28, 21, 0.4);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.glass-overlay.active {
    opacity: 1;
    visibility: visible;
}

.glass-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--glass-radius-large);
    padding: 40px;
    max-width: 600px;
    width: 90%;
    z-index: 9999;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* ===================================
   GLASS BREADCRUMB
   =================================== */

.breadcrumb-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 30px;
    border-radius: 50px;
    display: inline-block;
}

/* ===================================
   LIQUID LOADING ANIMATION
   =================================== */

.liquid-loader {
    width: 100px;
    height: 100px;
    position: relative;
}

.liquid-blob-loader {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    animation: blobLoader 2s infinite ease-in-out;
}

.liquid-blob-loader:nth-child(1) {
    background: var(--color-brown);
    animation-delay: 0s;
}

.liquid-blob-loader:nth-child(2) {
    background: var(--color-gold);
    animation-delay: -0.4s;
}

.liquid-blob-loader:nth-child(3) {
    background: var(--color-dark-brown);
    animation-delay: -0.8s;
}

@keyframes blobLoader {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    33% {
        transform: translate(60px, 0) scale(1.2);
        opacity: 0.7;
    }
    66% {
        transform: translate(30px, 52px) scale(0.8);
        opacity: 0.5;
    }
}

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

@media (max-width: 991px) {
    .liquid-blob-1,
    .liquid-blob-2,
    .liquid-blob-3 {
        width: 300px;
        height: 300px;
    }

    .glass-particles-container {
        display: none;
    }
}

@media (max-width: 767px) {
    :root {
        --glass-radius: 15px;
        --glass-radius-large: 20px;
        --blur-amount: 15px;
    }

    .liquid-blob {
        filter: blur(40px);
    }

    .liquid-button {
        padding: 14px 30px;
    }

    .glass-modal {
        padding: 30px 20px;
    }
}

/* ===================================
   PERFORMANCE OPTIMIZATIONS
   =================================== */

/* GPU Acceleration */
.glass-card,
.glass-particle,
.liquid-blob {
    transform: translateZ(0);
    will-change: transform;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .liquid-blob,
    .glass-particle {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .liquid-blob,
    .glass-particle,
    .glass-particles-container,
    .liquid-wave {
        display: none !important;
    }

    .glass-card,
    .glass-modal {
        background: #fff !important;
        backdrop-filter: none !important;
        border: 1px solid #ddd !important;
    }
}
