/* Modern UI Variables */
:root {
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --primary-gradient: linear-gradient(135deg, #2563eb, #7c3aed);
    --secondary-gradient: linear-gradient(135deg, #10b981, #3b82f6);
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --blob-color-1: rgba(37, 99, 235, 0.3);
    --blob-color-2: rgba(124, 58, 237, 0.3);
    --blob-color-3: rgba(236, 72, 153, 0.3);
}

/* Fluid Background */
.fluid-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
    background: #f8fafc;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.8;
    animation: drift 20s infinite alternate;
    border-radius: 50%;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--blob-color-1);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--blob-color-2);
    animation-delay: -5s;
    animation-direction: alternate-reverse;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: var(--blob-color-3);
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* Enhanced Glassmorphism */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.glass-panel:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Full Screen Hero with 3D Typography */
.hero-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px; /* Offset for navbar */
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-title-3d {
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.1;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    position: relative;
    perspective: 500px;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-dark);
    max-width: 600px;
    margin-bottom: 3rem;
    font-weight: 500;
}

/* 3D Circular Gallery */
.gallery-container {
    position: relative;
    width: 100%;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    margin: 5rem 0;
    overflow: hidden;
}

.gallery-wheel {
    position: relative;
    width: 300px;
    height: 400px;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-card {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backface-visibility: hidden; /* Or visible depending on desired effect */
    /* Transform is set via JS */
}

.gallery-card img {
    width: 100%;
    height: 60%;
    object-fit: cover;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.gallery-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gallery-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 100;
}

.gallery-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-dark);
}

.gallery-btn:hover {
    transform: scale(1.1);
    color: #2563eb;
}

/* --- Advanced Gooey Nav (Ported) --- */
/* --- Advanced Gooey Nav (Ported) --- */
.gooey-nav-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none; /* Allow clicks to pass through container area */
}

.gooey-nav-container nav {
    display: flex;
    position: relative;
    transform: translate3d(0, 0, 0.01px);
    pointer-events: auto; /* Re-enable clicks on nav */
}

.gooey-nav-container nav ul {
    display: flex;
    gap: 2em;
    list-style: none;
    padding: 0 1em;
    margin: 0;
    position: relative;
    z-index: 3;
    align-items: center;
    background: rgba(255, 255, 255, 0.8); /* Higher opacity for visibility */
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 10px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.gooey-nav-container nav ul li {
    border-radius: 100vw;
    position: relative;
    cursor: pointer;
    transition: color 0.3s ease;
    color: var(--text-muted);
    font-weight: 500;
}

.gooey-nav-container nav ul li a {
    display: inline-block;
    padding: 0.6em 1em;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 10;
}

.gooey-nav-container nav ul li.active {
    color: #2563eb;
}

/* The actual gooey effect layers */
.gooey-nav-container .effect {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    display: grid;
    place-items: center;
    z-index: 1;
}

.gooey-nav-container .effect.filter {
    /* SVG Filter for proper gooey effect without background issues */
    filter: url('#goo');
    display: block !important; /* Ensure it's visible now that we have the SVG */
    opacity: 1;
}

/*
   IMPORTANT: For the gooey effect to work on light background,
   we need contrast between the pill and the background.
   Since 'mix-blend-mode: lighten' hides dark colors on white,
   we adjust strategies or keep it but change colors.
*/

.gooey-nav-container .effect.filter::before {
    content: '';
    position: absolute;
    inset: -75px;
    z-index: -2;
    background: transparent; /* Changed from white to transparent for SVG method */
}

.gooey-nav-container .effect.filter::after {
    content: '';
    position: absolute;
    inset: 0;
    background: #e0f2fe; /* Light Blue Pill */
    transform: scale(0);
    opacity: 0;
    z-index: -1;
    border-radius: 100vw;
}

.gooey-nav-container .effect.active::after {
    animation: pill 0.3s ease both;
}

@keyframes pill {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Particle Styles */
.particle,
.point {
    display: block;
    opacity: 0;
    width: 20px;
    height: 20px;
    border-radius: 100%;
    transform-origin: center;
}

.particle {
    position: absolute;
    pointer-events: none;
    z-index: 5;
}

/* --- Magnifying Glass Tagline Effect --- */
.magnifying-wrapper {
    position: relative;
    display: inline-block;
    /* cursor: none;  Removed to allow click interactions if any */
}

.magnifying-glass {
    position: fixed; /* Changed to fixed to avoid overflow issues */
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 0 10px rgba(0,0,0,0.2),
        inset 0 0 20px rgba(255,255,255,0.8);
    backdrop-filter: scale(1.4); /* Magnification */
    -webkit-backdrop-filter: scale(1.4);
    pointer-events: none;
    z-index: 9999; /* Ensure it's on top */
    display: none;
    /* Create circular mask for the effect */
    mask-image: radial-gradient(circle, black 100%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle, black 100%, transparent 100%);
    background: rgba(255, 255, 255, 0.05); /* Subtle highlight */
    transform: translate(-50%, -50%); /* Center on cursor */
}

/* Enhance existing hero title for interaction */
.hero-title-3d {
    position: relative;
    z-index: 5;
}

/* Page Transitions */
.page-transition-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-transition-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.page-transition-exit {
    opacity: 1;
}

.page-transition-exit-active {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Utility Animations */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* Transparent Navbar */
.modern-transparent-nav {
    background: transparent !important;
    box-shadow: none !important;
    padding-top: 20px;
    transition: all 0.3s ease;
    position: absolute !important;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.modern-nav-item {
    color: var(--text-dark) !important;
    font-weight: 600;
    margin: 0 10px;
    padding: 8px 16px;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.modern-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(37, 99, 235, 0.1);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
    border-radius: 30px;
    z-index: -1;
}

.modern-nav-item:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.modern-nav-item:hover {
    color: #2563eb !important;
    transform: translateY(-2px);
}

/* Fluid Glass Text Effect */
.glass-hover-text {
    transition: all 0.5s ease;
    cursor: default;
    padding: 10px;
    border-radius: 10px;
    display: inline-block; /* Ensure transforms work */
}

.glass-hover-text:hover {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    transform: scale(1.02);
}

/* --- New Button Styles --- */
.btn-gradient {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    color: white;
}

.btn-outline-gradient {
    background: transparent;
    border: 2px solid #2563eb; /* Fallback */
    border-image: var(--primary-gradient) 1;
    border-radius: 50px; /* Note: border-image conflicts with border-radius usually. Using psueod-element or simpler border color */
    /* Simpler approach for rounded gradient border: */
    position: relative;
    z-index: 1;
    background: white;
    color: #2563eb;
    padding: 12px 30px;
    font-weight: 600;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: all 0.3s ease;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.btn-outline-gradient::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: -1;
    margin: -2px;
    border-radius: inherit;
    background: var(--primary-gradient);
}
/* Fix for button inner white background covering text if z-index is wrong */
.btn-outline-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.2);
}

/* Contact Button */
.btn-primary-glow {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px 30px; /* Consistent padding */
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}

.btn-primary-glow:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}


/* Updated Magnifying Glass for Glowing Text */
.magnifying-glass {
    position: fixed;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 0 20px rgba(37, 99, 235, 0.5), /* Stronger blue glow */
        inset 0 0 30px rgba(255, 255, 255, 0.6);
    /* Extreme values to force visibility */
    backdrop-filter: scale(1.5) saturate(400%) brightness(130%) contrast(120%);
    -webkit-backdrop-filter: scale(1.5) saturate(400%) brightness(130%) contrast(120%);
    pointer-events: none;
    z-index: 9999;
    display: none;
    background: rgba(255, 255, 255, 0.1); /* Slight white tint to catch light */
    transform: translate(-50%, -50%);
}

/* Updated Gallery Container for Visibility */
.gallery-container {
    perspective: 1000px;
    overflow: visible !important; /* Allow side cards to be seen */
    width: 100%;
    max-width: 800px; /* Constrain width to keep perspective nice */
    margin: 3rem auto; /* Center it */
}

.gallery-wheel {
    width: 260px;
    height: 340px;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin: 0 auto; /* Center key */
}
/* Ensure buttons override bootstrap */
.btn-gradient {
    background: var(--primary-gradient) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-outline-gradient {
    background: white !important;
    position: relative;
    z-index: 1;
}

/* Inactive cards blur logic will be handled by opacity/blur on non-front items via JS or CSS classes,
   but for now, we set the base style.
*/
