/* Toast Notifications */
.flashes {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    color: var(--text-main);
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 4px 4px 0px var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.5s ease-out, fadeOut 0.5s ease-in 4.5s forwards;
    border: var(--border-bold);
    min-width: 300px;
}

.alert-danger {
    background: #FF9E9E;
}

.alert-warning {
    background: var(--primary);
}

.alert-success {
    background: var(--accent);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

/* Service Page Enhancements */
.service-detail {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}


/* Dashboard Padding Fix */
.dashboard-grid {
    padding: 1rem 0 !important;
}

/* Desktop Hidden Utility */
@media (min-width: 993px) {
    .desktop-hidden {
        display: none !important;
    }
}

/* Carousel Styles */
.carousel-container {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 2rem 50%;
    /* Center the first item */
    scroll-behavior: smooth;
    align-items: stretch; /* Change from start to stretch for even height */
    /* Prevent stretching */
    /* Hide scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.carousel-track::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.carousel-track .card {
    flex: 0 0 280px; /* Base width */
    scroll-snap-align: center;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1); /* Smoother boutique transition */
    transform-origin: center center;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    opacity: 0.7; /* Dim non-active cards */
    transform: scale(0.9); /* Slightly smaller non-active */
}

/* Active State (Centered & Wide) */
.carousel-track .card.active {
    flex: 0 0 550px; /* Expand horizontally */
    opacity: 1;
    transform: scale(1);
    border-color: var(--primary);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.card.active .service-detail {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 1;
    max-height: 500px;
    /* Allow enough space */
}

/* Responsive Hero Text */
@media (max-width: 768px) {
    .hero-text-overlay {
        padding: 0 1.5rem;
        text-align: left;
        max-width: 100%;
        top: 45%;
        /* Slightly higher on mobile */
    }
}


/* Liquid/Gooey Effect Styles */
.liquid-container {
    position: relative;
    width: 100%;
    height: 100%;
    filter: url("#gooey");
}

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

.blob {
    position: absolute;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(20px);
}

[data-theme="light"] .blob {
    background: var(--primary);
    opacity: 0.1;
}

.blob:nth-child(1) {
    width: 250px;
    height: 250px;
    top: 20%;
    left: 10%;
    animation: liquid-move-1 10s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
}

.blob:nth-child(2) {
    width: 350px;
    height: 350px;
    bottom: 15%;
    right: 5%;
    animation: liquid-move-2 12s infinite alternate-reverse cubic-bezier(0.45, 0, 0.55, 1);
}

.blob:nth-child(3) {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    animation: liquid-move-3 15s infinite linear;
}

.blob:nth-child(4) {
    width: 300px;
    height: 300px;
    bottom: 30%;
    left: 20%;
    animation: liquid-move-1 14s infinite reverse cubic-bezier(0.45, 0, 0.55, 1);
}

@keyframes liquid-move-1 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, 50px) scale(1.2);
    }
}

@keyframes liquid-move-2 {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(-150px, -80px) rotate(180deg);
    }
}

@keyframes liquid-move-3 {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
    }

    50% {
        transform: translate(-30%, -60%) rotate(180deg) scale(1.1);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg) scale(1);
    }
}


/* --- ADDED FEATURES START HERE --- */

/* Accessibility: Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 1rem;
    z-index: 10001;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Accessibility: Keyboard Navigation */
:focus-visible {
    outline: 3px solid var(--accent) !important;
    outline-offset: 2px !important;
}

/* Accessibility: High Contrast Mode */
body.high-contrast {
    --bg-dark: #000000 !important;
    --bg-card: #000000 !important;
    --text-main: #FFFFFF !important;
    --text-muted: #FFFF00 !important;
    --primary: #FFFF00 !important;
    --accent: #00FF00 !important;
    --border-light: #FFFFFF !important;
}

body.high-contrast * {
    border-color: #FFFFFF !important;
    box-shadow: none !important;
    text-shadow: none !important;
    background-image: none !important;
}

body.high-contrast .btn-primary,
body.high-contrast .btn-secondary {
    background: #000000 !important;
    color: #FFFF00 !important;
    border: 2px solid #FFFF00 !important;
}

body.high-contrast .card {
    border: 2px solid #FFFFFF !important;
    background: #000000 !important;
}

/* Notifications UI */
.nav-notifications {
    position: relative;
    display: flex;
    align-items: center;
}

.notif-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--bg-dark);
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    z-index: 1001;
}

.notif-dropdown.show {
    display: flex;
    animation: slideInDownCustom 0.3s ease-out;
}

.notif-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.btn-text:hover {
    background: rgba(16, 185, 129, 0.1);
}

.notif-list {
    max-height: 400px;
    overflow-y: auto;
}

.notif-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    display: block;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.notif-item.unread {
    background: rgba(124, 58, 237, 0.05);
}

.notif-item p {
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.notif-item .notif-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notif-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@keyframes slideInDownCustom {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar Layout Refinements */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.5rem;
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border-light);
    opacity: 0.3;
    margin: 0 0.5rem;
}

@media (max-width: 992px) {
    .nav-divider {
        display: none;
    }
    .nav-actions {
        margin: 1rem 0;
        justify-content: center;
        width: 100%;
        border-top: 1px solid var(--border-light);
        padding-top: 1rem;
    }
}

/* Services Dropdown Navbar Refactor */
.nav-services-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-drop-btn {
    background: transparent;
    border: none;
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 1px;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.nav-drop-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

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

.nav-services-dropdown:hover .chevron-icon {
    transform: translateY(2px);
}

.services-dropdown-content {
    position: absolute;
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    background: #FFFFFF; /* Pure White as requested */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 1rem;
    display: none; /* Controlled by JS Motion */
    grid-template-columns: 1fr;
    gap: 0.5rem;
    z-index: 1001;
}

[data-theme="dark"] .services-dropdown-content {
    background: #FFFFFF; /* Force white even in dark theme for this box */
    border-color: rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: all 0.3s var(--ease-expo);
    text-decoration: none;
    background: transparent;
}

.dropdown-item:hover {
    background: rgba(0, 0, 0, 0.03) !important;
    transform: scale(1.02) translateY(-2px);
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.item-icon {
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

[data-theme="dark"] .item-icon {
    background: rgba(255, 255, 255, 0.05);
}

.item-text {
    display: flex;
    flex-direction: column;
}

.item-title {
    font-weight: 700;
    color: #1A1A1A; /* Force dark text */
    font-size: 0.95rem;
}

.item-desc {
    font-size: 0.75rem;
    color: #6B7280; /* Force dark-ish muted text */
    font-weight: 500;
}

@media (max-width: 992px) {
    .services-dropdown-content {
        position: static;
        transform: none;
        width: 100%;
        grid-template-columns: 1fr;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0.5rem 0;
    }
}

/* Desktop Nav Wrappers */
@media (min-width: 993px) {
    .nav-links {
        display: contents; /* Makes children flex items of .navbar */
    }
    .nav-left { order: 1; }
    .logo-center { order: 2; }
    .nav-right { order: 3; }
}

/* --- GLOBAL RESPONSIVE OVERRIDES --- */

/* Tablet & Mobile shared overrides */
@media (max-width: 992px) {
    .mobile-hidden {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }

    .desktop-hidden {
        display: flex !important;
    }

    .navbar {
        padding: 1rem 1.5rem;
        justify-content: center;
        align-items: center;
        min-height: 80px;
        position: relative;
    }
    
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        cursor: pointer;
        z-index: 1100;
        width: 35px;
        height: 30px;
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .hamburger span {
        width: 100%;
        height: 3px;
        background-color: #000000 !important; /* Force black lines on white navbar */
        transition: 0.3s ease;
    }
    
    .nav-left {
        flex: 0;
        padding-right: 0;
    }
    
    .nav-right {
        flex: none;
        justify-content: flex-start;
        padding-left: 0;
        gap: 0.5rem !important;
    }

    .nav-right a {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .nav-links {
        position: fixed;
        display: flex;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        background: #FFFFFF !important;
        border-left: 1px solid #E5E5E5;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding-top: 5rem;
        gap: 0;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
        z-index: 1000;
        overflow-y: auto;
        box-shadow: -5px 0 30px rgba(0,0,0,0.1);
        opacity: 0;
        transform: scale(0.95);
        pointer-events: none;
    }
    
    [data-theme="dark"] .nav-links {
        background: #FFFFFF !important; /* Force white background */
    }
    
    .nav-links.active {
        right: 0 !important;
        opacity: 1;
        transform: scale(1);
        pointer-events: auto;
        animation: navPopIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes navPopIn {
        0% {
            opacity: 0;
            transform: scale(0.95) translateX(20px);
        }
        100% {
            opacity: 1;
            transform: scale(1) translateX(0);
        }
    }
    
    .nav-links a, .nav-drop-btn {
        font-family: 'Space Grotesk', sans-serif;
        font-size: 1.1rem !important;
        font-weight: 700;
        color: #000000 !important;
        margin: 0 !important;
        padding: 1.2rem 1.5rem !important;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #E5E5E5;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-transform: capitalize;
        border-radius: 0;
        background: transparent;
    }
    
    /* Custom hamburger animations */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    .nav-links a:hover, .nav-drop-btn:hover {
        background: #F9F9F9 !important;
    }
    
    .nav-left, .nav-right {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0 !important;
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .services-dropdown-content {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        display: flex !important; /* Always flex to allow transition */
        flex-direction: column;
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    [data-theme="dark"] .services-dropdown-content {
        background: transparent !important;
    }
    
    .services-dropdown-content.show {
        max-height: 500px; /* Increased to accommodate items */
        border-bottom: 1px solid #E5E5E5;
    }
    
    .dropdown-item {
        padding: 1rem 1.5rem 1rem 3rem !important; /* Heavily indented */
        border-bottom: 0.5px solid #F0F0F0 !important;
        border-radius: 0 !important;
        gap: 0.8rem;
        background: transparent !important;
        width: 100%;
        display: flex;
        align-items: center;
        transition: 0.2s ease;
    }

    [data-theme="dark"] .dropdown-item {
        border-bottom-color: #333333 !important;
    }

    .dropdown-item:last-child {
        border-bottom: none !important;
    }

    .dropdown-item .item-icon {
        font-size: 1.1rem;
        min-width: 24px;
        opacity: 0.8;
    }

    .dropdown-item .item-title {
        font-size: 1rem !important;
        color: #000000 !important; /* Force Solid Black for both themes */
        font-weight: 600 !important;
    }
    
    [data-theme="dark"] .dropdown-item .item-title {
        color: #000000 !important; /* Solid Black even in dark mode on mobile */
    }

    .dropdown-item .item-desc {
        display: none !important; /* Hide descriptions on mobile accordion */
    }
    
    .nav-services-dropdown {
        width: 100%;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .item-icon {
        width: 24px;
        height: 24px;
        font-size: 1rem;
    }
    
    .chevron-icon {
        transition: transform 0.3s ease;
    }
    
    /* Plus-Minus Icon Animation */
    .plus-minus-icon {
        position: relative;
        width: 14px;
        height: 14px;
    }

    .plus-minus-icon span {
        position: absolute;
        background: currentColor;
        transition: transform 0.3s ease;
    }

    .pm-h {
        top: 6px;
        left: 0;
        width: 14px;
        height: 2px;
    }

    .pm-v {
        top: 0;
        left: 6px;
        width: 2px;
        height: 14px;
    }

    .nav-drop-btn.active .pm-v {
        transform: rotate(90deg);
        opacity: 0;
    }

    .nav-drop-btn.active .pm-h {
        transform: rotate(180deg);
    }

    .hero-home {
        grid-template-columns: 1fr;
        padding: 4rem 2rem 2rem 2rem;
        text-align: center;
        min-height: auto;
    }
    
    .hero-left {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 2rem;
    }

    .hero-heading {
        font-size: clamp(3rem, 8vw, 4.5rem);
        margin-top: 0;
    }

    .studio-btn-group {
        justify-content: center;
        flex-wrap: wrap;
    }

    .vertical-panel {
        display: none !important;
    }

    .portrait-wrapper {
        margin: 0 auto;
        padding-top: 0 !important;
        max-width: 80%;
    }
    
    .eye-overlay {
        top: 50%;
    }
}

/* Specific Mobile Overrides */
@media (max-width: 768px) {
    .achievement-section {
        padding: 4rem 1.5rem;
    }
    
    .achievement-heading {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .overlapping-cards-row {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .card-green, .card-yellow, .card-orange, .card-blue {
        transform: none !important;
        width: 100%;
        max-width: 320px;
        height: auto;
        min-height: 200px;
    }
    
    .neo-card-studio:hover {
        transform: translateY(-5px) !important;
        z-index: 10 !important;
    }

    .marquee-item-studio {
        font-size: 1.5rem;
    }
    
    .marquee-track-studio {
        gap: 2rem;
    }
    
    .services-flow-section {
        padding: 4rem 1.5rem;
    }
    
    .flow-step {
        gap: 2rem;
        margin: 0 auto 5rem;
    }
    
    .flow-info h2 {
        font-size: clamp(2rem, 6vw, 2.5rem);
    }

    .liquid-btn span {
        font-size: 1rem;
    }
    
    .studio-btn {
        padding: 1rem 1.5rem;
    }
    
    /* Reveal Animation fix for mobile */
    .reveal-on-scroll {
        transform: translateY(15px) scale(1);
    }
    
    /* Footer centering fix */
    .studio-footer {padding: 4rem 1.5rem 2rem;}
}

/* =========================================
   FORCED FIXES: STILL NAVBAR & FOOTER BUTTON
   ========================================= */

/* Still Navbar Fix (Global) */
.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
    background: #FFFFFF !important;
    height: 80px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 3px solid #000 !important;
    padding: 0 4rem !important;
}

/* Prevent content from hiding under fixed navbar */
body {
    padding-top: 80px !important;
}

/* Mobile Navbar Layout: Logo Center, Hamburger Right */
@media (max-width: 992px) {
    .navbar {
        padding: 0 1.5rem !important;
        height: 70px !important;
    }
    
    body {
        padding-top: 70px !important;
    }
    
    .logo-center {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        z-index: 10001 !important;
    }

    .hamburger {
        display: flex !important;
        position: absolute !important;
        right: 1.5rem !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
        z-index: 10002 !important;
    }
    
    .nav-links {
        padding-top: 80px !important; /* Offset for internal menu content */
    }
}

/* Footer Button & Pill Repair (Login/Signup Focus) */

/* Centering Brand Column Contents (Logo, Socials, etc) */
.brand-col {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
}

.footer-mission {
    margin: 0 auto 2rem !important;
    max-width: 450px !important;
}

.social-links-studio {
    justify-content: center !important;
}