﻿/* --- General & Background --- */
body {
    font-family: Tahoma, sans-serif;
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    margin: 0;
    padding: 0;
}

/* Dark mode base styles */
body.dark-mode {
    background: #121212;
    color: #e0e0e0;
}

    body.dark-mode a {
        color: #ffffff;
    }

    body.dark-mode .navbar {
        background-color: #333 !important;
    }

    body.dark-mode h1,
    body.dark-mode h2,
    body.dark-mode h3,
    body.dark-mode h4,
    body.dark-mode h5,
    body.dark-mode h6,
    body.dark-mode p {
        color: #e0e0e0;
    }

    body.dark-mode .text-muted {
        color: #aaa !important;
    }

/* --- Glassmorphism Style --- */
.glass {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

body.dark-mode .input-group.glass {
    background: rgba(50, 50, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

    body.dark-mode .input-group.glass .form-control {
        color: #e0e0e0;
        background: transparent;
        border: none;
        box-shadow: none;
    }

/* --- Header --- */
.navbar {
    background: rgba(255, 255, 255, 0.3);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1rem;
    color: #fff;
}

.navbar-nav .nav-link {
    color: #fff;
    font-weight: 500;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

/* Custom Navbar Style */
.custom-navbar {
    background-color: rgba(0, 0, 0, 0.7);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

    .custom-navbar .navbar-brand,
    .custom-navbar .nav-link {
        color: #fff !important;
    }

        .custom-navbar .nav-link:hover {
            color: #ffc107 !important;
        }

.navbar-toggler-icon {
    filter: invert(1);
}

/* --- Parallax Effect --- */
.parallax {
    background-attachment: fixed;
}

/* --- Branch Cards --- */
.branch-card {
    margin: 0 auto;
    max-width: 450px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(31, 38, 135, 0.15);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(0, 0, 0, 0.1);
    height: 100%;
}

    .branch-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    }

/* For dark mode */
body.dark-mode .branch-card {
    background: #1e1e1e;
    border: 1px solid #333;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* تصویر پس‌زمینه (عکس شعبه) */
.bg-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    transition: transform 0.5s;
}

.branch-card:hover .bg-img {
    transform: scale(1.05);
}

/* لوگو در پایین مرکز تصویر */
.branch-logo {
    width: 80px;
    height: 80px;
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20%;
    background: white;
    padding: 6px;
    border: 4px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}


.branch-card:hover .branch-logo {
    transform: translateX(-50%) scale(1.05);
}

/* جزئیات کارت */
.branch-details {
    text-align: center;
    padding-top: 50px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}


.branch-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #212529;
    letter-spacing: -0.5px;
}

.branch-subtitle {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.branch-working-hours {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: #555;
    gap: 8px;
}

.working-hours-text {
    font-size: 0.85rem;
    color: #757575;
    display: inline-block;
    line-height: 1.5;
}

.status-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.branch-address,
.branch-phone {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

    .branch-phone a {
        color: #555;
        text-decoration: none;
        font-weight: 500;
        transition: color 0.2s;
    }

        .branch-phone a:hover {
            color: #0d6efd;
        }

/* Branch Actions */
.branch-actions {
    margin-top: 1rem;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
}

    .branch-actions .btn {
        transition: all 0.2s ease;
        border-width: 2px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

        .branch-actions .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

    .branch-actions .btn-primary {
        background: linear-gradient(135deg, #4e73df, #224abe);
        border: none;
        padding: 12px;
        font-weight: 500;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }


/* --- Floating Buttons --- */
.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
}

    .floating-buttons a {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 15px;
        border-radius: 50px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        text-decoration: none;
        transition: all 0.3s ease;
        font-weight: 500;
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: white;
        font-size: 1.2rem;
    }

        .floating-buttons a:hover {
            transform: scale(1.05);
        }

/* Dark Mode Adjustments for floating buttons */
body.dark-mode .floating-buttons a {
    background: linear-gradient(135deg, #444444, #222222);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

    body.dark-mode .floating-buttons a:hover {
        opacity: 0.9;
    }

/* --- Interactive Map --- */
#map {
    width: 100%;
    height: 400px;
    border-radius: 16px;
    margin: 2rem 0;
}

/* --- Footer --- */
footer {
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem 0;
}

    footer p,
    footer a {
        color: #fff;
    }

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add staggered animation for branch cards */
@media (prefers-reduced-motion: no-preference) {
    .branch-item:nth-child(1) {
        animation-delay: 0.1s;
    }

    .branch-item:nth-child(2) {
        animation-delay: 0.2s;
    }

    .branch-item:nth-child(3) {
        animation-delay: 0.3s;
    }

    .branch-item:nth-child(4) {
        animation-delay: 0.4s;
    }

    .branch-item:nth-child(5) {
        animation-delay: 0.5s;
    }

    .branch-item:nth-child(6) {
        animation-delay: 0.6s;
    }
}

/* Dark mode text adjustments */
body.dark-mode .branch-title {
    color: #e0e0e0;
}

body.dark-mode .branch-subtitle {
    color: #bbb;
}

body.dark-mode .branch-address,
body.dark-mode .branch-phone,
body.dark-mode .working-hours-text {
    color: #aaa;
}

    body.dark-mode .branch-phone a {
        color: #aaa;
    }

        body.dark-mode .branch-phone a:hover {
            color: #fff;
        }

body.dark-mode .branch-actions .btn-primary {
    background: linear-gradient(135deg, #3a5cba, #1a3a98);
}

body.dark-mode .branch-actions .btn-outline-primary {
    border-color: #4e73df;
    padding: 10px;
    font-weight: 500;
}

    body.dark-mode .branch-actions .btn-outline-primary:hover {
        background-color: rgba(58, 92, 186, 0.2);
    }

/* Hero Slider Styles (Simplified) */
.hero-slider {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    margin: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
}

.swiper-slide {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 8s ease-out;
    transform: scale(1.1);
}

.swiper-slide-active .slide-bg {
    transform: scale(1);
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .branch-card {
        margin-bottom: 0;
    }

    .row {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .branch-card {
        width: 92%;
        margin: 0 auto;
    }

    .branch-details {
        padding-top: 45px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .branch-actions {
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 15px;
    }

    .bg-img {
        height: 180px;
    }

    .branch-logo {
        width: 70px;
        height: 70px;
        bottom: -35px;
    }

    .branch-title {
        font-size: 1.2rem;
    }

    .branch-subtitle {
        font-size: 0.9rem;
    }

    .branch-details {
        padding-top: 45px;
    }

    .floating-buttons {
        bottom: 15px;
        right: 15px;
    }

    .hero-slider {
        border-radius: 15px;
        margin: 0.5rem;
    }

    .swiper-slide {
        min-height: 50vh;
    }
}


/* Navigation enhancements */
.navbar-nav .dropdown-menu {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-nav .dropdown-item {
    color: #fff;
    padding: 8px 16px;
    transition: all 0.2s ease;
}

    .navbar-nav .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #ffc107;
    }

.navbar-nav .dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Login button styling */
.btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

    .btn-outline-light:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }

/* Dark mode specific styles for navigation */
body.dark-mode .navbar-nav .dropdown-menu {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .navbar-nav .dropdown-item {
    color: #e0e0e0;
}

    body.dark-mode .navbar-nav .dropdown-item:hover {
        background: rgba(70, 70, 70, 0.8);
        color: #fff;
    }

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .navbar-nav .dropdown-menu {
        background: transparent;
        border: none;
        box-shadow: none;
        padding-left: 1rem;
    }

    .navbar-nav .dropdown-item {
        color: rgba(255, 255, 255, 0.8);
        padding: 8px 0;
    }

    .navbar-nav .dropdown-divider {
        display: none;
    }

    .btn-outline-light {
        display: inline-block;
        margin-top: 0.5rem;
    }
}

.btn-order {
    background: linear-gradient(135deg, #ff6b6b, #d63031);
    color: white;
    border: none;
    padding: 14px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 6px 12px rgba(214, 48, 49, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
    letter-spacing: 0.5px;
}

.btn-order:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(214, 48, 49, 0.4);
    color: white;
}

.btn-order::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff7b7b, #e74c3c);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn-order:hover::before {
    opacity: 1;
}

/* برای حالت دارک مود */
body.dark-mode .btn-order {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.25);
}

.order-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: #ffc107;
    color: #000;
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transform: rotate(0deg);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.branch-cta-container {
    margin-top: 15px;
    padding: 0 15px 15px;
}

.btn-order-main {
    display: block;
    text-align: center;
    background: linear-gradient(to right, #ff6b6b, #e74c3c);
    color: white;
    text-decoration: none;
    padding: 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
    position: relative;
    overflow: hidden;
}

    .btn-order-main:hover {
        color: white;
        box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
        transform: translateY(-3px);
    }

    .btn-order-main small {
        font-weight: normal;
        opacity: 0.9;
        font-size: 0.75rem;
    }

.secondary-actions {
    display: flex;
    margin-top: 12px;
    gap: 10px;
}

.action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
}

    .action-btn:hover {
        background: rgba(0,0,0,0.1);
        color: #333;
    }

    .action-btn i {
        font-size: 1.2rem;
        margin-bottom: 4px;
    }

    .action-btn span {
        font-size: 0.85rem;
    }

/* حالت دارک مود */
body.dark-mode .action-btn {
    background: rgba(255,255,255,0.1);
    color: #ddd;
}

    body.dark-mode .action-btn:hover {
        background: rgba(255,255,255,0.15);
        color: #fff;
    }

