﻿/* ===== CSS Variables ===== */
:root {
    /* Default Colors (Blue Theme) */
    --primary-color: #007bff;
    --primary-light: #3395ff;
    --primary-dark: #0056b3;
    --secondary-color: #6c757d;
    --accent-color: #ffc107;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-dark: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.16);
    --shadow-xl: 0 12px 48px rgba(0,0,0,0.2);
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

/* ===== Color Schemes ===== */
/* Indigo Theme */
body.theme-indigo {
    --primary-color: #6610f2;
    --primary-light: #7c3aed;
    --primary-dark: #4c1d95;
    --gradient-primary: linear-gradient(135deg, #6610f2 0%, #7c3aed 100%);
}

/* Purple Theme */
body.theme-purple {
    --primary-color: #6f42c1;
    --primary-light: #8b5cf6;
    --primary-dark: #5b21b6;
    --gradient-primary: linear-gradient(135deg, #6f42c1 0%, #8b5cf6 100%);
}

/* Pink Theme */
body.theme-pink {
    --primary-color: #d63384;
    --primary-light: #ec4899;
    --primary-dark: #be185d;
    --gradient-primary: linear-gradient(135deg, #d63384 0%, #ec4899 100%);
}

/* Red Theme */
body.theme-red {
    --primary-color: #dc143c;
    --primary-light: #ef4444;
    --primary-dark: #b91c1c;
    --gradient-primary: linear-gradient(135deg, #dc143c 0%, #ef4444 100%);
}

/* Dark Red Theme */
body.theme-dark-red {
    --primary-color: #ff0000;
    --primary-light: #dc2626;
    --primary-dark: #991b1b;
    --gradient-primary: linear-gradient(135deg, #991b1b 0%, #ff0000 100%);
}

/* Orange Theme */
body.theme-orange {
    --primary-color: #fd7e14;
    --primary-light: #fb923c;
    --primary-dark: #ea580c;
    --gradient-primary: linear-gradient(135deg, #fd7e14 0%, #fb923c 100%);
}

/* Yellow Theme */
body.theme-yellow {
    --primary-color: #ffc107;
    --primary-light: #fbbf24;
    --primary-dark: #f59e0b;
    --gradient-primary: linear-gradient(135deg, #f59e0b 0%, #ffc107 100%);
}

/* Green Theme */
body.theme-green {
    --primary-color: #28a745;
    --primary-light: #22c55e;
    --primary-dark: #16a34a;
    --gradient-primary: linear-gradient(135deg, #28a745 0%, #22c55e 100%);
}

/* Teal Theme */
body.theme-teal {
    --primary-color: #20c997;
    --primary-light: #14b8a6;
    --primary-dark: #0d9488;
    --gradient-primary: linear-gradient(135deg, #20c997 0%, #14b8a6 100%);
}

/* Cyan Theme */
body.theme-cyan {
    --primary-color: #17a2b8;
    --primary-light: #06b6d4;
    --primary-dark: #0891b2;
    --gradient-primary: linear-gradient(135deg, #17a2b8 0%, #06b6d4 100%);
}

/* Light Green Theme */
body.theme-light-green {
    --primary-color: #acb655;
    --primary-light: #bef264;
    --primary-dark: #84cc16;
    --gradient-primary: linear-gradient(135deg, #acb655 0%, #bef264 100%);
}

/* Teal Dark Theme */
body.theme-teal-dark {
    --primary-color: #008080;
    --primary-light: #14b8a6;
    --primary-dark: #065f5b;
    --gradient-primary: linear-gradient(135deg, #065f5b 0%, #008080 100%);
}

/* Gray Theme */
body.theme-gray {
    --primary-color: #6c757d;
    --primary-light: #9ca3af;
    --primary-dark: #4b5563;
    --gradient-primary: linear-gradient(135deg, #6c757d 0%, #9ca3af 100%);
}

/* Tan Theme */
body.theme-tan {
    --primary-color: #d4b590;
    --primary-light: #daa520;
    --primary-dark: #b8860b;
    --gradient-primary: linear-gradient(135deg, #d4b590 0%, #daa520 100%);
}

/* Dark Mode Variables */
body.dark-mode {
    --dark-color: #1a1a1a;
    --light-color: #2c2c2c;
    --text-color: #e0e0e0;
    --text-light: #b0b0b0;
    --border-color: #3a3a3a;
    --gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    background-color: #121212;
}

    /* Dark mode color adjustments for each theme */
    body.dark-mode.theme-indigo {
        --primary-light: #818cf8;
        --gradient-primary: linear-gradient(135deg, #4c1d95 0%, #6610f2 100%);
    }

    body.dark-mode.theme-purple {
        --primary-light: #a78bfa;
        --gradient-primary: linear-gradient(135deg, #5b21b6 0%, #6f42c1 100%);
    }

    body.dark-mode.theme-pink {
        --primary-light: #f472b6;
        --gradient-primary: linear-gradient(135deg, #be185d 0%, #d63384 100%);
    }

    body.dark-mode.theme-red {
        --primary-light: #f87171;
        --gradient-primary: linear-gradient(135deg, #b91c1c 0%, #dc143c 100%);
    }

    body.dark-mode.theme-orange {
        --primary-light: #fdba74;
        --gradient-primary: linear-gradient(135deg, #ea580c 0%, #fd7e14 100%);
    }

    body.dark-mode.theme-yellow {
        --primary-light: #fde047;
        --gradient-primary: linear-gradient(135deg, #ca8a04 0%, #ffc107 100%);
    }

    body.dark-mode.theme-green {
        --primary-light: #4ade80;
        --gradient-primary: linear-gradient(135deg, #15803d 0%, #28a745 100%);
    }

    body.dark-mode.theme-teal {
        --primary-light: #2dd4bf;
        --gradient-primary: linear-gradient(135deg, #0f766e 0%, #20c997 100%);
    }

    body.dark-mode.theme-cyan {
        --primary-light: #22d3ee;
        --gradient-primary: linear-gradient(135deg, #0e7490 0%, #17a2b8 100%);
    }

    body.dark-mode.theme-gray {
        --primary-light: #d1d5db;
        --gradient-primary: linear-gradient(135deg, #374151 0%, #6c757d 100%);
    }

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', Tahoma, sans-serif;
    background-color: #ffffff;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

    /* Dark mode body styles */
    body.dark-mode {
        background-color: #121212 !important;
        color: #e0e0e0 !important;
    }

/* Theme Toggle in Navbar */
.theme-toggle-nav {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-left: 1rem;
}

    .theme-toggle-nav:hover {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
        transform: rotate(180deg);
    }

body.dark-mode .theme-toggle-nav {
    border-color: var(--border-color);
    color: var(--text-color);
}

    body.dark-mode .theme-toggle-nav:hover {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }

/* Mobile responsive */
@media (max-width: 991px) {
    .theme-toggle-nav {
        margin: 1rem auto;
        display: block;
    }
}

/* ===== Loading Screen ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s, visibility 0.5s;
}

    .loading-screen.hidden {
        opacity: 0;
        visibility: hidden;
    }

.loader {
    width: 80px;
    height: 80px;
    position: relative;
}

.loader-inner {
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

    .loader-inner::before,
    .loader-inner::after {
        content: '';
        position: absolute;
        border: 4px solid transparent;
        border-radius: 50%;
    }

    .loader-inner::before {
        top: 8px;
        left: 8px;
        right: 8px;
        bottom: 8px;
        border-top-color: var(--secondary-color);
        animation: spin 1.5s linear infinite reverse;
    }

    .loader-inner::after {
        top: 16px;
        left: 16px;
        right: 16px;
        bottom: 16px;
        border-top-color: var(--accent-color);
        animation: spin 2s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Modern Navigation ===== */
.modern-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-normal);
}

    .modern-navbar.scrolled {
        padding: 0.5rem 0;
        box-shadow: var(--shadow-md);
    }

body.dark-mode .modern-navbar {
    background: rgba(26, 26, 26, 0.95);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: transform var(--transition-fast);
}

    .navbar-brand:hover {
        transform: scale(1.05);
        color: var(--primary-color);
    }

.brand-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hamburger Menu */
.navbar-toggler {
    border: none;
    background: none;
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
}

.hamburger {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--dark-color);
        margin: 3px 0;
        transition: all var(--transition-normal);
        border-radius: 2px;
    }

.navbar-toggler[aria-expanded="true"] .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggler[aria-expanded="true"] .hamburger span:nth-child(2) {
    opacity: 0;
}

.navbar-toggler[aria-expanded="true"] .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Nav Links */
.navbar-nav {
    align-items: center;
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

    .nav-link::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: var(--primary-color);
        transform: translateX(-50%);
        transition: width var(--transition-normal);
    }

    .nav-link:hover {
        color: var(--primary-color);
        transform: translateY(-2px);
    }

        .nav-link:hover::before {
            width: 80%;
        }

.nav-icon {
    font-size: 1.1rem;
    opacity: 0.8;
}

.btn-login {
    background: var(--gradient-primary);
    color: white !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: var(--radius-lg);
    font-weight: 600;
}

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

        .btn-login:hover::before {
            width: 0;
        }

/* Dropdown Menu */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    margin-top: 0.5rem;
    animation: fadeInDown 0.3s ease;
}

body.dark-mode .dropdown-menu {
    background: rgba(44, 44, 44, 0.98);
    border-color: var(--border-color);
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
    color: var(--text-color);
}

    .dropdown-item:hover {
        background: var(--primary-color);
        color: white;
        transform: translateX(5px);
    }

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Hero Section ===== */
.hero-section {
    height: 100vh;
    position: relative;
    overflow: hidden;
    margin-top: -80px;
}

.hero-swiper {
    height: 100%;
}

.hero-slide {
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 110%;
    height: 110%;
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    transition: transform 10s ease;
}

.swiper-slide-active .hero-bg {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient( 135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.5) 100% );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -2px;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 300;
}

.animate-text {
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease forwards;
}

.animate-text-delay {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-xl);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all var(--transition-normal);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
    overflow: hidden;
    position: relative;
}

    .hero-cta::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .hero-cta:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 40px rgba(255, 107, 107, 0.4);
        color: white;
    }

        .hero-cta:hover::before {
            width: 300px;
            height: 300px;
        }

    .hero-cta i {
        font-size: 1.2rem;
        transition: transform var(--transition-normal);
    }

    .hero-cta:hover i {
        transform: translateY(3px);
    }

/* Swiper Navigation */
.swiper-button-next,
.swiper-button-prev {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    transition: all var(--transition-normal);
}

    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 1.2rem;
        color: white;
    }

    .swiper-button-next:hover,
    .swiper-button-prev:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.1);
    }

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: all var(--transition-normal);
}

.swiper-pagination-bullet-active {
    width: 30px;
    border-radius: 6px;
    background: var(--primary-color);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 25px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0%, 20% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

    80%, 100% {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
}

/* ===== Search Section ===== */
.search-section {
    padding: 4rem 0;
    background: var(--light-color);
    position: relative;
    overflow: hidden;
}

    .search-section::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
        opacity: 0.05;
        animation: rotate 30s linear infinite;
    }

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

.search-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    margin-bottom: 2rem;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--text-light);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 1.5rem 1.5rem 1.5rem 4rem;
    font-size: 1.1rem;
    border: 2px solid transparent;
    border-radius: var(--radius-xl);
    background: white;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

body.dark-mode .search-input {
    background: var(--dark-color);
    color: var(--text-color);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.search-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 150%;
    background: var(--gradient-primary);
    opacity: 0;
    filter: blur(40px);
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.search-input:focus ~ .search-bg {
    opacity: 0.1;
}

/* Filter Tags */
.filter-tags {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: var(--radius-lg);
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

body.dark-mode .filter-tag {
    background: var(--dark-color);
    border-color: var(--border-color);
}

.filter-tag::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--gradient-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
    z-index: 0;
}

.filter-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-tag.active {
    color: white;
    border-color: transparent;
}

    .filter-tag.active::before {
        width: 200%;
        height: 200%;
    }

.filter-tag span {
    position: relative;
    z-index: 1;
}

/* ===== Branches Section ===== */
.branches-section {
    padding: 5rem 0;
    background: var(--light-color);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.title-decorator {
    position: relative;
    z-index: 1;
}

    .title-decorator::before {
        content: '';
        position: absolute;
        bottom: -5px;
        left: -10px;
        right: -10px;
        height: 20px;
        background: var(--gradient-primary);
        opacity: 0.2;
        border-radius: 10px;
        z-index: -1;
    }

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 300;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.2rem;
}

    .no-results i {
        font-size: 3rem;
        display: block;
        margin-bottom: 1rem;
        opacity: 0.5;
    }

/* Branches Grid */
.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Branch Card Modern */
.branch-card-modern {
    height: 100%;
    position: relative;
    transition: transform var(--transition-normal);
}

    .branch-card-modern:hover {
        transform: translateY(-10px);
    }

.card-inner {
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card-front {
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition-normal);
}

body.dark-mode .card-front {
    background: var(--dark-color);
}

.branch-card-modern:hover .card-front {
    box-shadow: var(--shadow-xl);
}

/* Branch Image */
.branch-image-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.branch-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.branch-card-modern:hover .branch-image {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.branch-card-modern:hover .image-overlay {
    opacity: 1;
}

/* Branch Badge */
.branch-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

    .branch-badge.open {
        background: rgba(76, 236, 196, 0.9);
        color: #0a4f3f;
    }

    .branch-badge.closed {
        background: rgba(255, 107, 107, 0.9);
        color: #5c0f0f;
    }

/* Online Order Badge */
.online-order-badge {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    background: var(--gradient-primary);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    animation: pulse 2s infinite;
}

    .online-order-badge i {
        font-size: 1rem;
    }

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: var(--shadow-md);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(var(--primary-color), 0.4);
    }
}

/* Branch Content */
.branch-content {
    padding: 2rem;
}

.branch-header {
    display: flex;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.branch-logo-modern {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal);
}

.branch-card-modern:hover .branch-logo-modern {
    transform: rotate(-5deg) scale(1.1);
}

.branch-info {
    flex: 1;
}

.branch-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.branch-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Branch Meta */
.branch-meta {
    margin-bottom: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

    .meta-item i {
        font-size: 1.1rem;
        color: var(--primary-color);
        width: 20px;
        text-align: center;
    }

    .meta-item a {
        color: inherit;
        text-decoration: none;
        transition: color var(--transition-fast);
    }

        .meta-item a:hover {
            color: var(--primary-color);
        }

/* Branch Actions */
.branch-actions-modern {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.btn-action {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    text-align: left;
}

    .btn-action.primary {
        background: var(--gradient-primary);
        color: white;
        box-shadow: 0 4px 15px rgba(var(--primary-color), 0.3);
        padding: 1rem 1.5rem;
    }

        .btn-action.primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(var(--primary-color), 0.4);
        }

/* Style for view-only menu button (when online ordering is disabled) */
.branch-item:has(.btn-action .bi-book-half) .btn-action.primary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--text-light) 100%);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

    .branch-item:has(.btn-action .bi-book-half) .btn-action.primary:hover {
        box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
    }

.btn-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    flex: 1;
}

.btn-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    display: block;
    width: 100%;
}

.btn-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.2;
    display: block;
    width: 100%;
}

.btn-action.primary i {
    font-size: 1.3rem;
    transition: transform var(--transition-normal);
}

.btn-action.primary:hover i {
    transform: translateX(5px);
}

.btn-action.secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    flex: 0 0 auto;
    padding: 0.875rem;
}

    .btn-action.secondary:hover {
        background: var(--primary-color);
        color: white;
        transform: translateY(-2px);
    }

/* ===== Map Section ===== */
.map-section {
    padding: 5rem 0;
    background: white;
}

body.dark-mode .map-section {
    background: var(--light-color);
}

.map-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modern-map {
    width: 100%;
    height: 500px;
    background: #f0f0f0;
}

/* Map Controls */
.map-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.map-control {
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-color);
}

    .map-control:hover {
        transform: scale(1.1);
        box-shadow: var(--shadow-lg);
        background: var(--primary-color);
        color: white;
    }

/* ===== Modern Footer ===== */
.modern-footer {
    background: var(--gradient-dark);
    color: white;
    position: relative;
    padding-top: 100px;
    margin-top: 5rem;
}

.footer-wave {
    position: absolute;
    top: -99px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

    .footer-wave svg {
        position: relative;
        display: block;
        width: calc(100% + 1.3px);
        height: 100px;
    }

    .footer-wave path {
        fill: var(--light-color);
    }

body.dark-mode .footer-wave path {
    fill: #121212;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    opacity: 0.8;
    font-size: 1.1rem;
}

/* Footer Logo */
.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
    transition: transform var(--transition-normal);
}

    .footer-logo:hover {
        transform: scale(1.05);
    }

body.dark-mode .footer-logo {
    filter: brightness(1.2);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    transition: all var(--transition-normal);
    text-decoration: none;
}

    .social-link:hover {
        background: var(--primary-color);
        transform: translateY(-5px) rotate(360deg);
        color: white;
    }

.footer-bottom {
    padding: 2rem 0 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

    .footer-bottom p {
        margin: 0;
    }

.copyright-text {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 0.5rem !important;
}

.powered-by {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* ===== Floating Action Buttons ===== */
.fab-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 900;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.fab-main {
    background: var(--gradient-primary);
    position: relative;
    z-index: 2;
}

    .fab-main:hover {
        transform: scale(1.1) rotate(45deg);
    }

    .fab-main.active {
        transform: rotate(45deg);
    }

.fab-options {
    position: absolute;
    bottom: 0;
    right: 0;
    display: flex;
    flex-direction: column-reverse;
    gap: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.fab-main.active ~ .fab-options {
    opacity: 1;
    visibility: visible;
}

.fab-option {
    width: 48px;
    height: 48px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transform: scale(0);
    transition: all var(--transition-normal);
    position: relative;
}

.fab-main.active ~ .fab-options .fab-option {
    transform: scale(1);
}

    .fab-main.active ~ .fab-options .fab-option:nth-child(1) {
        transition-delay: 0.1s;
    }

    .fab-main.active ~ .fab-options .fab-option:nth-child(2) {
        transition-delay: 0.2s;
    }

    .fab-main.active ~ .fab-options .fab-option:nth-child(3) {
        transition-delay: 0.3s;
    }

.fab-option:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

/* Tooltip */
.fab-option::before {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    font-size: 0.875rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.fab-option:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ===== Responsive Design ===== */
@media (max-width: 1200px) {
    .branches-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        margin-top: 1rem;
        padding: 1rem;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-md);
    }

    body.dark-mode .navbar-collapse {
        background: rgba(26, 26, 26, 0.98);
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-description {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .branches-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .branch-image-wrapper {
        height: 200px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .footer-logo {
        height: 50px;
    }

    .footer-brand h3 {
        font-size: 1.5rem;
    }

    .footer-brand p {
        font-size: 1rem;
    }

    .copyright-text {
        font-size: 0.8rem;
    }

    .powered-by {
        font-size: 0.7rem;
    }

    .modern-map {
        height: 350px;
    }

    .fab-container {
        bottom: 1rem;
        right: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        height: 80vh;
    }

    .hero-title {
        font-size: 2rem;
    }

    .search-input {
        font-size: 1rem;
        padding: 1.25rem 1.25rem 1.25rem 3.5rem;
    }

    .branch-content {
        padding: 1.5rem;
    }

    .branch-name {
        font-size: 1.25rem;
    }
}

/* ===== RTL Support ===== */
[dir="rtl"] .nav-link {
    flex-direction: row-reverse;
}

[dir="rtl"] .meta-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .btn-action {
    flex-direction: row-reverse;
}

[dir="rtl"] .search-icon {
    left: auto;
    right: 1.5rem;
}

[dir="rtl"] .search-input {
    padding: 1.5rem 4rem 1.5rem 1.5rem;
}

[dir="rtl"] .fab-container {
    right: auto;
    left: 2rem;
}

[dir="rtl"] .fab-option::before {
    right: auto;
    left: calc(100% + 10px);
}

[dir="rtl"] .dropdown-menu {
    text-align: right;
}

[dir="rtl"] .branch-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .branch-actions-modern {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-cta i {
    margin-left: 0.75rem;
    margin-right: 0;
}

[dir="rtl"] .nav-icon {
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="rtl"] .theme-toggle-nav {
    margin-left: 0;
    margin-right: 1rem;
}

[dir="rtl"] .btn-content {
    text-align: right;
    align-items: flex-start;
    width: 100%;
}

[dir="rtl"] .btn-action.primary i {
    margin-right: 0.5rem;
    margin-left: 0;
}

[dir="rtl"] .btn-action.primary:hover i {
    transform: translateX(-5px);
}

/* RTL fixes for button layout */
[dir="rtl"] .btn-action {
    flex-direction: row-reverse;
    text-align: right;
}

    [dir="rtl"] .btn-action.primary {
        justify-content: space-between;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

[dir="rtl"] .btn-title {
    display: block;
    text-align: right;
    width: 100%;
}

[dir="rtl"] .btn-subtitle {
    display: block;
    text-align: right;
    width: 100%;
}

[dir="rtl"] .btn-action.primary i {
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="rtl"] .online-order-badge {
    right: auto;
    left: 1rem;
}

[dir="rtl"] .branch-badge {
    right: auto;
    left: 1rem;
}
