/* =================================================================
   ASONYX - 3D Digital Solutions Agency
   CSS Stylesheet - Dark Theme with Glassmorphism
   Cleaned and Optimized Version
   ================================================================= */

/* --- 1. Root Variables and Global Resets --- */
:root {
    /* Color Palette */
    --primary-color: #00d9ff;      /* Cyan */
    --secondary-color: #a855f7;    /* Purple */
    --accent-color: #ec4899;       /* Pink */
    --background: #0f172a;         /* Dark blue */
    --surface: #1e293b;            /* Slightly lighter surface for cards/containers */
    --surface-light: #334155;      /* Lighter surface for subtle contrast */
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;     /* Light gray for secondary text */
    --border-color: #00d9ff33;     /* Transparent cyan for borders */

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --smooth-transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Global Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    /* Dark background to prevent white flash before canvas loads */
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
    position: relative;
    z-index: 1;
}

/* --- 2. Layout and Typography --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    font-size: 48px;
    text-align: center;
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 18px;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 50px;
}

.page-title {
    font-size: 64px;
    text-align: center;
    margin-top: 50px;
    margin-bottom: 20px;
}

.page-subtitle {
    font-size: 20px;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 80px;
}

/* Color Utility Classes */
.text-cyan { color: var(--primary-color); }
.text-purple { color: var(--secondary-color); }
.text-white { color: var(--text-primary); }

/* --- 3. Buttons and Links --- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--smooth-transition);
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-size: 16px;
    will-change: transform, box-shadow;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-primary);
    border: none;
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.4);
}

.btn-primary:hover {
    /* Darker gradient on hover (assuming darker variables are defined or using a slight filter) */
    filter: brightness(1.1);
    box-shadow: 0 8px 30px rgba(0, 217, 255, 0.8);
    transform: translateY(-3px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.1);
}

.btn-outline:hover {
    background-color: rgba(0, 217, 255, 0.15);
    box-shadow: 0 0 25px rgba(0, 217, 255, 0.4);
    transform: translateY(-3px);
}

/* Ripple/Magnetize Effect (Simplified for cleanup) */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    z-index: -1;
}

.btn:hover::before {
    transform: translate(-50%, -50%) scale(5);
    opacity: 0.5;
}

.cta-center {
    text-align: center;
    margin-top: 50px;
}

/* --- 4. Navigation (Navbar and Mobile Menu) --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* Glassmorphism effect for the navbar */
    background: rgba(15, 23, 42, 0.95); /* Semi-transparent background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.8), 0 0 20px rgba(0, 217, 255, 0.5), 0 0 30px rgba(168, 85, 247, 0.3);
    animation: logo-vibrate 0.1s infinite, logo-glow-pulse 2s ease-in-out infinite;
}

@keyframes logo-vibrate {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-0.2px, -0.2px); }
    50% { transform: translate(0.2px, 0.2px); }
    75% { transform: translate(-0.2px, 0.2px); }
}

@keyframes logo-glow-pulse {
    0%, 100% { text-shadow: 0 0 10px rgba(0, 217, 255, 0.8), 0 0 20px rgba(0, 217, 255, 0.5), 0 0 30px rgba(168, 85, 247, 0.3); }
    50% { text-shadow: 0 0 15px rgba(0, 217, 255, 1), 0 0 30px rgba(0, 217, 255, 0.7), 0 0 40px rgba(168, 85, 247, 0.5); }
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(1);
    transition: transform 0.3s ease;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--primary-color);
    transition: all 0.3s ease-in-out;
}

/* Mobile Menu Open State (Hamburger to X) */
.menu-toggle.open .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile Side Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px; /* Hidden off-screen */
    width: 300px;
    height: 100%;
    background: var(--surface);
    padding-top: 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: right 0.3s ease-in-out;
    z-index: 999;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu .nav-link {
    padding: 10px 20px;
    font-size: 18px;
    color: var(--text-primary);
}

/* --- 5. Hero Section (index.html) --- */
.hero {
    padding-top: 150px;
    padding-bottom: 100px;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

/* Animated Background Blobs (Parallax) */
.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gradient-blob {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(100px);
    z-index: -1;
}

.blob-1 {
    top: 10%;
    left: 5%;
    background: var(--primary-color);
    animation: float 8s ease-in-out infinite;
}

.blob-2 {
    bottom: 10%;
    right: 5%;
    background: var(--secondary-color);
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

/* Hero Content and Scroll Animation Setup */
.hero-scroll-wrapper {
    /* This wrapper helps contain the scroll animation effects */
    position: relative;
    perspective: 1000px; /* For 3D transforms */
}

.scroll-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.scroll-header {
    transition: transform 0.1s linear; /* Controlled by JS for scroll effect */
    will-change: transform;
}

.hero-title {
    font-size: 80px;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-description {
    font-size: 22px;
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 40px;
}

.scroll-card-wrapper {
    margin-top: 50px;
    width: 100%;
    display: flex;
    justify-content: center;
    height: 500px; /* Fixed height for visual consistency */
}

.scroll-card {
    width: 90%;
    max-width: 600px;
    height: 100%;
    background: rgba(30, 41, 59, 0.6); /* Glassmorphism surface */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.1s linear; /* Controlled by JS for scroll effect */
    will-change: transform;
    transform-style: preserve-3d;
    box-shadow: 0 0 50px rgba(0, 217, 255, 0.2);
    overflow: hidden;
}

.hero-3d {
    position: relative;
    width: 100%;
    height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.floating-element {
    position: absolute;
    width: 280px;
    height: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    animation: vibrate 0.1s infinite;
    will-change: transform;
}

.floating-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(0, 217, 255, 0.8)) drop-shadow(0 0 25px rgba(168, 85, 247, 0.5));
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 40px rgba(0, 217, 255, 0.2), inset 0 0 20px rgba(0, 217, 255, 0.05); }
    50% { box-shadow: 0 0 60px rgba(0, 217, 255, 0.4), inset 0 0 30px rgba(0, 217, 255, 0.1); }
}

@keyframes rotate {
    0% { transform: rotateY(0deg) rotateX(0deg); }
    100% { transform: rotateY(360deg) rotateX(360deg); }
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(50px) rotateX(0deg) rotateY(0deg) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg) rotateY(0deg) scale(1);
    }
}

@keyframes rotate-3d-subtle {
    0% { transform: perspective(1000px) rotateX(0deg) rotateY(0deg); }
    25% { transform: perspective(1000px) rotateX(2deg) rotateY(5deg); }
    50% { transform: perspective(1000px) rotateX(0deg) rotateY(0deg); }
    75% { transform: perspective(1000px) rotateX(-2deg) rotateY(-5deg); }
    100% { transform: perspective(1000px) rotateX(0deg) rotateY(0deg); }
}

@keyframes vibrate {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-0.5px, -0.5px); }
    50% { transform: translate(0.5px, 0.5px); }
    75% { transform: translate(-0.5px, 0.5px); }
}

@keyframes glow-pulse {
    0%, 100% { filter: drop-shadow(0 0 15px rgba(0, 217, 255, 0.8)) drop-shadow(0 0 25px rgba(168, 85, 247, 0.5)); }
    50% { filter: drop-shadow(0 0 20px rgba(0, 217, 255, 1)) drop-shadow(0 0 35px rgba(168, 85, 247, 0.7)); }
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

/* --- 6. Services Section --- */

.service-card.animate-on-scroll {
    opacity: 0; /* Initially hidden */
}

.service-card.animate-on-scroll.visible {
    animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    /* Glassmorphism card base */
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    /* 3D Tilt Effect Setup */
    transform-style: preserve-3d;
    perspective: 1000px;
}

.service-card:hover {
    /* 3D Tilt Effect on Hover */
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg) scale(1.02);
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.3);
}

.service-icon {
    font-size: 40px;
    margin-bottom: 20px;
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    background: rgba(0, 217, 255, 0.1);
    color: var(--primary-color);
    margin: 0 auto 20px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: rotateY(180deg);
    background: var(--primary-color);
    color: var(--background);
}

.service-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.service-card p {
    color: var(--text-secondary);
}

/* --- 7. Portfolio Preview (index.html) --- */
.portfolio-preview {
    background: var(--surface);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.portfolio-item {
    background: var(--surface-light);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.portfolio-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.3);
}

.portfolio-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.portfolio-image iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.model-container {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-viewer-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(20, 30, 50, 0.5);
    border-radius: 8px;
}

.model-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.model-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 217, 255, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    pointer-events: none;
    z-index: 10;
}

/* Three.js Model Viewer Styling */
#model-viewer-1,
#model-viewer-2 {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: grab;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
}

#model-viewer-1:active,
#model-viewer-2:active {
    cursor: grabbing;
}

#model-viewer-1 canvas,
#model-viewer-2 canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.model-hint {
    font-size: 12px;
    color: rgba(0, 217, 255, 0.7);
    text-align: center;
    margin-top: 10px;
    font-weight: 500;
}

.portfolio-item h3 {
    padding: 20px;
    font-size: 20px;
}

/* --- 8. Scroll Animation Classes --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
    /* Optional: Add a subtle animation on visible */
    animation: fadeInUp-dramatic 0.8s ease-out forwards;
}

@keyframes fadeInUp-dramatic {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- 9. Booking Section (index.html) - FLIP Animation Styles --- */
.booking-section {
    background: var(--background);
}

#app {
    --easing: cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth easing function */
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    min-height: 300px; /* Ensure enough space for the cards */
}

#app .cards {
    display: flex;
    justify-content: center;
}

#app [data-view="overview"] {
    display: block;
}

#app [data-view="details"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#app [data-view="details"] [data-active] {
    pointer-events: auto;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

#restaurant { /* The initial card */
    width: 100%;
    max-width: 400px;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity var(--duration) var(--easing);
    will-change: opacity, transform;
}

#restaurant:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 217, 255, 0.4);
}

#detail-card { /* The final card */
    width: 100%;
    height: auto;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--duration) var(--easing);
}

#app[data-state="details"] #detail-card {
    opacity: 1;
    pointer-events: auto;
}

/* FLIP Animation Styles */
#app [data-move="pending"] {
    /* Invert state: Apply the calculated transform */
    transform:
        translate(calc(var(--dx,0) * -1px), calc(var(--dy,0) * -1px))
        scale(var(--dw,1), var(--dh,1));
    transition: none;
}

/* Hide content during the invert state */
#app [data-move="pending"] > * {
    opacity: 0;
    transition: none;
}

#app [data-move="moving"] {
    /* Play state: Animate back to the identity transform (0,0,1,1) */
    transform: none;
    transition: transform var(--duration) var(--easing);
}

#app[data-state="overview"] #detail-card {
    /* Hide detail card when in overview state */
    opacity: 0;
    pointer-events: none;
}

/* Detail Card Content */
.view-content {
    padding: 20px 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.whatsapp-btn {
    margin-top: 20px;
    font-size: 18px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

/* --- 10. Contact Section --- */
.contact-cards-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.contact-card-grid-space {
    position: relative;
}

.contact-num {
    position: absolute;
    top: -30px;
    left: 20px;
    font-size: 64px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.05);
    z-index: 0;
    transition: var(--transition);
}

.contact-card {
    display: block;
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 40px 30px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.4);
}

.contact-card-icon {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: var(--transition);
}

.contact-card h3 {
    font-size: 22px;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.contact-card p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.contact-card-cta {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 600;
    transition: var(--transition);
}

.contact-card:hover .contact-card-cta {
    color: var(--primary-color);
}

/* --- 11. Portfolio Page Specific Styles --- */

/* Stellar 3D Slide Navigator Styles */
.testimonials-section {
    perspective: 1000px;
    padding: 80px 0;
}

.carousel-container {
    width: 100%;
    height: 500px; /* Increased height for more vertical space */
    position: relative;
    margin: 0 auto;
    transform-style: preserve-3d;
}

.carousel-track {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
    position: absolute;
    width: 350px; /* Reduced width for more vertical appearance */
    height: 100%;
    top: 0;
    left: 50%;
    margin-left: -175px; /* Center the slide based on new width */
    transform-style: preserve-3d;
    backface-visibility: hidden;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.15);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(0, 217, 255, 0.25);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2), inset 0 0 30px rgba(0, 217, 255, 0.15);
    padding: 40px 30px;
    text-align: center;
    transition: opacity 0.3s, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Slide Content Styling */
.slide-quote {
    font-size: 20px;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 20px.testimonial-author-name {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5); /* Ensuring name is also clear */
}gin-top: 10px;
}

.slide-role {
    font-size: 14px;
    color: var(--text-secondary);
}

.slide-rating {
    color: gold;
    font-size: 20px;
    margin-top: 5px;
}

/* Control Styling (Reusing existing button styles but renaming for clarity) */
.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 30px;
}

.carousel-btn {
    /* Inherits from existing .flip-btn styles */
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: var(--primary-color);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.carousel-dots {
    display: flex;
    gap: 10px;
}

.carousel-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--surface-light);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}
.filter-section {
    padding: 30px 0 50px;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover {
    background: var(--surface-light);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--primary-color);
    color: var(--background);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.projects-section {
    padding-top: 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.project-card {
    /* Inherits general card styling */
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    will-change: transform, box-shadow;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.3);
}

.project-image {
    font-size: 60px;
    text-align: center;
    padding: 30px 0;
    background: var(--surface-light);
}

.project-content {
    padding: 20px 30px 30px;
}

.project-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.project-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.project-tags {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tag {
    font-size: 12px;
    background: rgba(168, 85, 247, 0.2); /* Purple tint */
    color: var(--secondary-color);
    padding: 4px 8px;
    border-radius: 5px;
}

.project-metrics {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.project-metric {
    text-align: center;
}

.metric-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.metric-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.project-cta {
    width: 100%;
}



/* Testimonials Carousel (Portfolio Page) */

    position: relative;
    overflow: hidden;
    padding: 50px 0;
}


    display: flex;
    transition: transform 0.5s ease-in-out;
    will-chang.carousel-slide {
    flex: 0 0 100%;
    max-width: 100%;
    /* Enhanced Glassmorphism for Clarity */
    background: rgba(30, 41, 59, 0.8); /* Increased opacity for better text contrast */
    backdrop-filter: blur(15px); /* Slightly more blur for a stronger effect */
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 50px;
    margin: 0 15px; /* Spacing between cards in the track */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}


    font-size: 48px;
    marg.testimonial-quote {
    font-size: 20px;
    font-style: italic;
    color: var(--text-primary);
    max-width: 800px;
    margin-bottom: 20px;
    position: relative;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5); /* Subtle text shadow for better readability */
}


    font-size: 30px;
    color: var(--secondary-color);
    position: absolute;
}


    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
}


    bottom: 0;
    right: 0;
    transform: translate(50%, 50%);
}


    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
}


    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}


    color: gold;
    font-size: 20px;
}

/* Carousel Controls */

    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
    pointer-events: none; /* Allow clicks to pass through to buttons */
}


    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: var(--primary-color);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    pointer-events: auto; /* Re-enable pointer events for the buttons */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}


    background: var(--primary-color);
    color: var(--background);
    transform: scale(1.1);
}


    text-align: center;
    margin-top: 20px;
}


    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--surface-light);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: var(--transition);
}


    background: var(--primary-color);
    transform: scale(1.2);
}

/* --- 12. Footer --- */

/* CodePen 3D Contact Card Styles */
.contact-card-3d {
    /* Full 3D Cube Effect Styling */
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    width: 100%;
    height: 100%;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible; /* Allow 3D sides to be visible */
    background: transparent; /* Main card is transparent */
    border: none;
    box-shadow: none;
    transition: transform 0.5s;
    /* Apply the 3D tilt directly to the card */
    transform: rotateY(10deg) rotateX(5deg);
    cursor: default;
}

.contact-card-3d .contact-info {
    /* The front face of the 3D cube */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--surface);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateZ(10px); /* Move forward to create depth */
    padding: 30px 25px;
    transition: background 0.3s;
    /* Reintroduce subtle background image */
    background-image: url('https://images.unsplash.com/photo-1517486808906-6ca8b3f04846?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=687&q=80');
    background-size: cover;
    background-position: center;
    /* Use a gradient overlay to fade the image and maintain text clarity */
    background-blend-mode: overlay;
    background-color: rgba(30, 41, 59, 0.9); /* Dark overlay for fade effect */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-card-3d::before,
.contact-card-3d::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 41, 59, 0.8); /* Dark side color */
    border-radius: 15px;
    transform-origin: left;
    transition: transform 0.5s;
}

.contact-card-3d::before {
    /* Left side of the cube */
    transform: rotateY(90deg) translateX(-10px) translateZ(10px);
    width: 20px; /* Thickness of the cube */
}

.contact-card-3d::after {
    /* Top side of the cube */
    transform: rotateX(90deg) translateY(-10px) translateZ(10px);
    height: 20px; /* Thickness of the cube */
}

.contact-card-3d:hover {
    /* Subtle hover effect on the entire cube */
    transform: rotateY(10deg) rotateX(5deg) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 217, 255, 0.5);
}

.contact-image {
    display: none; /* Remove background image for the solid color look */
}

.contact-card-3d:hover .contact-image {
    opacity: 0.3;
}

.contact-card-3d:hover .contact-info {
    transform: none;
}

.contact-form-list {
    list-style: none;
    padding: 0;
    margin: 0;
    transform: none;
    scale: 1;
}

.contact-form-list li {
    position: relative;
    background: transparent;
    border-bottom: none;
    padding: 6px 0;
    margin-bottom: 10px;
    border-radius: 4px;
    transition: background 0.3s, transform 0.3s;
    transform: translateX(calc(var(--i) * 2px)) skewY(-0.5deg);
}

.contact-form-list li:hover {
    background: rgba(0, 217, 255, 0.1); /* Use accent color for hover */
    transform: translateX(0) skewY(0deg);
}

.contact-form-list input,
.contact-form-list textarea {
    width: 100%;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: var(--font-family);
    padding: 10px 12px;
    margin: 0;
    font-size: 15px;
    border-radius: 6px;
    font-weight: 500;
}

.contact-form-list input::placeholder,
.contact-form-list textarea::placeholder {
    color: rgba(203, 213, 225, 0.8);
    font-weight: 400;
    opacity: 1;
}

.contact-form-list input:focus,
.contact-form-list textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(0, 217, 255, 0.3);
}

.contact-form-list textarea {
    min-height: 70px;
    resize: none;
    line-height: 1.5;
}

.contact-form-list .contact-card-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    margin-top: 15px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--text-primary);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
}

.contact-form-list .contact-card-cta:hover {
    filter: brightness(1.15);
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(0, 217, 255, 0.5);
}
.footer {
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 10px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* --- 13. Media Queries (Responsiveness) --- */

/* Desktop optimization for contact form */
@media (min-width: 1025px) {
    .contact-card-3d {
        min-height: 420px;
    }
    
    .contact-card-3d .contact-info {
        padding: 35px 30px;
    }
    
    .contact-form-list input,
    .contact-form-list textarea {
        font-size: 16px;
        padding: 12px 14px;
    }
    
    .contact-form-list textarea {
        min-height: 80px;
    }
    
    .contact-form-list .contact-card-cta {
        padding: 14px;
        font-size: 16px;
    }
}

@media (max-width: 1024px) {
    .nav-links {
        display: none; /* Hide desktop links */
    }

    .menu-toggle {
        display: block; /* Show hamburger menu */
    }

    .hero-title {
        font-size: 60px;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-cards-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .scroll-card-wrapper {
        height: 450px;
    }
}

@media (max-width: 768px) {
    section {
        padding: 80px 0;
    }

    .section-title {
        font-size: 36px;
    }

    .hero-title {
        font-size: 48px;
    }

    .hero-description {
        font-size: 18px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 20px;
    }

    .contact-card {
        padding: 30px 20px;
    }
    
    .contact-card-3d {
        min-height: 320px;
    }

    .filter-buttons {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .filter-btn {
        flex-shrink: 0;
    }
    
    .page-title {
        font-size: 48px;
    }
    
    .page-subtitle {
        font-size: 16px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-cards-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .contact-num {
        font-size: 48px;
        top: -20px;
    }
    
    .testimonial-carousel-preview {
        padding: 0 10px;
    }
    
    .carousel-slide {
        padding: 30px 20px;
    }
    
    .testimonial-text {
        font-size: 16px;
    }
    
    .carousel-container {
        height: 450px;
    }
    
    .carousel-slide {
        width: 300px;
        margin-left: -150px;
        padding: 30px 20px;
    }
    
    .scroll-header {
        padding: 20px;
    }
    
    .scroll-card {
        padding: 20px;
    }
    
    #app {
        padding: 0 10px;
    }
    
    #restaurant {
        max-width: 100%;
        height: 180px;
    }
    
    #detail-card {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 40px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        padding: 12px 25px;
    }

    .scroll-card-wrapper {
        height: 400px;
    }

    .floating-element {
        width: 180px;
        height: 180px;
    }
    
    .floating-image {
        filter: drop-shadow(0 0 10px rgba(0, 217, 255, 0.6)) drop-shadow(0 0 20px rgba(168, 85, 247, 0.4));
    }
    
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 14px;
    }
    
    .page-title {
        font-size: 36px;
        margin-top: 30px;
    }
    
    .page-subtitle {
        font-size: 14px;
        margin-bottom: 40px;
    }
    
    .service-card h3 {
        font-size: 18px;
    }
    
    .service-card p {
        font-size: 14px;
    }
    
    .contact-card-content h3 {
        font-size: 18px;
    }
    
    .contact-card-content p {
        font-size: 14px;
    }
    
    .contact-num {
        font-size: 36px;
        top: -15px;
    }
    
    .navbar {
        padding: 15px 0;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .carousel-slide {
        padding: 20px 15px;
    }
    
    .testimonial-text {
        font-size: 14px;
    }
    
    .author-name {
        font-size: 14px;
    }
    
    .author-role {
        font-size: 12px;
    }
    
    .carousel-container {
        height: 400px;
    }
    
    .carousel-slide {
        width: 280px;
        margin-left: -140px;
        padding: 25px 15px;
    }
    
    .slide-quote {
        font-size: 16px;
    }
    
    .slide-name {
        font-size: 16px;
    }
    
    .slide-role {
        font-size: 12px;
    }
    
    .btn {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .filter-btn {
        font-size: 12px;
        padding: 8px 15px;
    }
    
    .scroll-card-wrapper {
        height: 350px;
    }
    
    .floating-element {
        width: 130px;
        height: 130px;
    }
    
    .floating-image {
        filter: drop-shadow(0 0 8px rgba(0, 217, 255, 0.5)) drop-shadow(0 0 15px rgba(168, 85, 247, 0.3));
    }
    
    #restaurant {
        height: 150px;
        padding: 15px;
    }
    
    #restaurant h3 {
        font-size: 18px;
    }
    
    #restaurant p {
        font-size: 14px;
    }
    
    .view-content-container h3 {
        font-size: 20px;
    }
    
    .view-content-container p {
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .section-title {
        font-size: 24px;
    }
    
    .page-title {
        font-size: 30px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
    }
    
    .contact-card {
        min-height: 200px;
    }
    
    .contact-card-3d {
        min-height: 380px;
    }
    
    .contact-card-3d .contact-info {
        padding: 15px;
    }
    
    .floating-element {
        width: 100px;
        height: 100px;
    }
    
    .floating-image {
        filter: drop-shadow(0 0 6px rgba(0, 217, 255, 0.4)) drop-shadow(0 0 12px rgba(168, 85, 247, 0.3));
    }
}

/* New styles for the service card images */
.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
