/* 
 * Mani.ma Unified Brand Styles - 2026 Premium White & Indigo
 * Based on logo3.jpg branding
 */

:root {
    /* Core Colors - Beige Palette */
    --primary-bg: #fdfbf7; /* Primary Beige */
    --secondary-bg: #f0ebe1; /* Darker Beige */
    --text-main: #334155; /* Midnight Slate */
    --text-muted: #64748b;
    
    /* Brand Colors */
    --brand-primary: #06b6d4; /* Cool Turquoise */
    --brand-primary-dark: #0891b2;
    --brand-primary-light: rgba(6, 182, 212, 0.1);
    --brand-dark: #1e293b; /* Matches logo3.jpg dark gray */
    
    /* UI Tokens */
    --glass-white: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(23, 23, 23, 0.1);
    --shadow-premium: 0 10px 40px rgba(0, 0, 0, 0.04);
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 20px 60px rgba(23, 23, 23, 0.08);
}

html, body {
    background-color: var(--primary-bg);
    color: var(--text-main);
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
}

.font-outfit { font-family: 'Outfit', sans-serif; }

/* Force LTR for numbers and foreign text */
.ltr-field {
    direction: ltr !important;
    text-align: left !important;
}

/* Premium Glass Cards */
.glass-card {
    background: var(--glass-white);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
}

/* Primary Accent Buttons */
.btn-brand {
    background: var(--brand-primary);
    color: white !important;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition-smooth);
}
.btn-brand:hover {
    background: var(--brand-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(23, 23, 23, 0.2);
}

.btn-outline-brand {
    background: transparent;
    color: var(--brand-primary) !important;
    border: 2px solid var(--brand-primary);
    padding: 10px 26px;
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition-smooth);
}
.btn-outline-brand:hover {
    background: var(--brand-primary);
    color: white !important;
}

.hover-brand:hover {
    color: var(--brand-primary) !important;
    transition: var(--transition-smooth);
}

/* Service Cards */
.card-service {
    background: var(--primary-bg);
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 35px;
    transition: var(--transition-smooth);
    height: 100%;
}
.card-service:hover {
    transform: translateY(-10px);
    border-color: var(--brand-primary);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}
.card-service i {
    color: var(--brand-primary);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

/* Global Navbar Styling */
.brand-logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--brand-dark) !important;
    font-size: 1.8rem;
    letter-spacing: -1px;
}

/* Custom Alert for terminology */
.alert-brand {
    background: var(--brand-primary-light);
    border: 1px solid rgba(23, 23, 23, 0.3);
    color: var(--brand-primary-dark);
    padding: 15px 20px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.reveal { animation: fadeInUp 0.8s ease-out forwards; }

/* Scroll Reveal Effects */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for items in a row */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }

/* Global Header Aligment (Forced Logo Left, Buttons Right in RTL) */
.header-container {
    display: flex !important;
    flex-direction: row-reverse !important; 
    justify-content: space-between !important;
    align-items: center !important;
}

.header-logo-link { order: 1; }
.header-nav-wrapper { order: 2; }

/* Mobile Optimizations */
@media (max-width: 768px) {
    .display-2 { font-size: 2.5rem !important; }
    .header-logo { height: 32px !important; }
    .btn-header { 
        padding: 5px 12px !important; 
        font-size: 0.8rem !important;
        height: 32px !important;
    }
}

.btn-header {
    padding: 8px 18px;
    font-size: 0.85rem;
    border-radius: 12px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Premium Navigation Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1050;
}

.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--brand-dark);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 12px;
    transition: background 0.2s;
}

.nav-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--brand-primary);
}

.nav-dropdown-item i {
    width: 24px;
    font-size: 1rem;
    margin-left: 12px;
    opacity: 0.7;
}

.dark-mode-dropdown {
    background: rgba(17, 24, 39, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
}
.dark-mode-dropdown .nav-dropdown-item { color: rgba(255,255,255,0.9); }
.dark-mode-dropdown .nav-dropdown-item:hover { background: rgba(255,255,255,0.05); }

/* Dashboard Modern Hub Styles */
.dashboard-body {
    background-color: var(--secondary-bg);
}

.hub-card {
    border: none !important;
    border-radius: var(--radius-lg) !important;
    padding: 30px 20px !important;
    transition: var(--transition-smooth) !important;
    background: var(--primary-bg) !important;
    box-shadow: var(--shadow-soft) !important;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.hub-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(79, 70, 229, 0.03), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.hub-card:hover::after {
    transform: translateX(100%);
}

.hub-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: var(--shadow-hover) !important;
}

/* Premium Toast System */
.toast-container-app {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.app-toast {
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: toastSlideUp 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes toastSlideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.app-toast.success { border-left: 4px solid #10b981; }
.app-toast.error { border-left: 4px solid #ef4444; }

.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.hub-icon-wrapper {
    width: 65px;
    height: 65px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    transition: var(--transition-smooth);
}

.hub-card:hover .hub-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.progress-thin {
    height: 6px !important;
    border-radius: 10px !important;
    background: rgba(0,0,0,0.04) !important;
}

.card-mini {
    border-radius: 24px !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
    transition: var(--transition-smooth);
    background: var(--primary-bg) !important;
}

.card-mini:hover {
    border-color: var(--brand-primary);
    transform: scale(1.02);
    box-shadow: var(--shadow-hover) !important;
}

.card-mini img {
    transition: transform 0.4s;
}

.card-mini:hover img {
    transform: scale(1.1);
}

.extra-small { font-size: 0.7rem; }

.btn-xs {
    font-size: 0.75rem;
    padding: 4px 12px;
}

.font-tajawal { font-family: 'Tajawal', sans-serif; }
.font-outfit { font-family: 'Outfit', sans-serif; }

.text-brand-primary { color: var(--brand-primary) !important; }
.bg-brand-primary { background-color: var(--brand-primary) !important; }

/* Video Showcase Styles */
.video-showcase-wrapper {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 30px 100px rgba(0,0,0,0.1);
    background: #000;
    line-height: 0;
    transform: perspective(1000px) rotateX(2deg);
    transition: var(--transition-smooth);
}

@media (max-width: 768px) {
    .video-showcase-wrapper {
        max-width: 92%;
        border-radius: 20px;
        transform: perspective(1000px) rotateX(0deg) !important;
        box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    }
}

.video-showcase-wrapper:hover {
    transform: perspective(1000px) rotateX(0deg) scale(1.02);
}

.video-showcase-wrapper video {
    width: 100%;
    height: auto;
    display: block;
}

.video-overlay-glass {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.2) 100%);
    pointer-events: none;
}
/* Sticky Save System */
.sticky-save-top {
    position: sticky;
    top: 1rem;
    z-index: 1010;
    transition: all 0.3s ease;
}
.sticky-footer-save {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1050;
    display: flex;
    justify-content: center;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
    animation: slideUp 0.4s ease-out;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.color-swatch-btn {
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-width: 2px !important;
}
.color-swatch-btn:hover {
    transform: scale(1.15);
}
.color-swatch-btn.active {
    border-color: var(--brand-primary) !important;
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.save-btn-main {
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}
.save-btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

/* Toast Notification System */
.toast-container-app {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    pointer-events: none;
}
.app-toast {
    background: #ffffff;
    padding: 0.75rem 1.25rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    min-width: 280px;
    direction: rtl;
}
.app-toast.active {
    transform: translateY(0);
    opacity: 1;
}
.app-toast i { font-size: 1.25rem; }
.app-toast.success { border-left: 4px solid #10b981; }
.app-toast.success i { color: #10b981; }
.app-toast.error { border-left: 4px solid #ef4444; }
.app-toast.error i { color: #ef4444; }
.app-toast.info { border-left: 4px solid #06b6d4; }
.app-toast.info i { color: #06b6d4; }

/* Effect Options */
.effect-option {
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
}
.effect-option:hover { transform: translateY(-4px); border-color: rgba(6, 182, 212, 0.3); }
.effect-option.active { border-color: var(--brand-primary); background: rgba(6, 182, 212, 0.05); }
.effect-preview {
    height: 40px;
    background: #f1f5f9;
    position: relative;
}
.effect-preview::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 20px; height: 10px;
    background: var(--brand-primary);
    transform: translate(-50%, -50%);
    border-radius: 4px;
}
.effect-float-demo::after { animation: anim_float 2s ease-in-out infinite; }
.effect-pulse-demo::after { animation: anim_pulse 1.5s ease-in-out infinite; }
.effect-glow-demo::after { box-shadow: 0 0 15px var(--brand-primary); }

@keyframes anim_float { 0%, 100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, -70%); } }
@keyframes anim_pulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.2); } }

/* Premium Template Cards */
.template-card {
    position: relative;
    border: 2px solid rgba(0,0,0,0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: #fff;
    cursor: pointer;
}
.template-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: rgba(6, 182, 212, 0.2);
}
.template-card.active {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15), 0 10px 25px rgba(6, 182, 212, 0.1);
}
.template-preview-box {
    height: 120px;
    width: 100%;
    position: relative;
    background: #f8fafc;
}
.mani-sel-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: #10b981; /* Green for success */
    color: #fff;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 20;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.template-card.active .mani-sel-check {
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) !important;
}

.mini-mockup {
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    width: 60%;
    height: 80% !important;
}
.mini-mockup div {
    transition: all 0.3s ease;
}
.template-card:hover .mini-mockup {
    transform: scale(1.05);
    border-color: rgba(255,255,255,0.8);
}
.template-card.active .mini-mockup {
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
    border: 2px solid #fff;
}
