﻿
/* ── Card grid ── */
.branch-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.5rem;
}

/* ── Card ── */
.branch-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 1.75rem 1.25rem 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 20, 50, 0.15);
    border: 1px solid var(--border-light);
    transition: transform 0.25s ease, box-shadow 0.3s ease, border-color 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .branch-card::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: var(--accent);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .branch-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 16px 48px rgba(0, 45, 88, 0.35);
        border-color: rgba(255, 255, 255, 0.15);
    }

        .branch-card:hover::after {
            opacity: 1;
        }

.flag-wrapper {
    width: 100%;
    max-width: 100px;
    aspect-ratio: 3 / 2;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    margin-bottom: 1rem;
    flex-shrink: 0;
    background: #001f3d;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.branch-card:hover .flag-wrapper {
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.flag-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.location-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 1px;
}

.country-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #000;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.branch-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.15rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge {
    margin-top: 0.9rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.15);
    padding: 0.2rem 0.9rem;
    border-radius: 100px;
    transition: 0.2s;
    border: 1px solid rgba(var(--accent-rgb), 0.1);
    pointer-events: none;
}

.branch-card:hover .badge {
    background: rgba(var(--accent-rgb), 0.25);
    color: #ffd966;
    border-color: rgba(var(--accent-rgb), 0.2);
}

/* ── Modal ── WHITE THEME ────────────────────────────── */
.custom-compact-modal .modal-content {
    background: #ffffff;
    color: #1e293b;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.custom-compact-modal .modal-header {
    border-bottom: 1px solid #e9edf4;
    padding: 1rem 1.25rem;
}

    .custom-compact-modal .modal-header .btn-close {
        filter: none;
        opacity: 0.7;
    }

        .custom-compact-modal .modal-header .btn-close:hover {
            opacity: 1;
        }

.custom-compact-modal .modal-title {
    color: #0b1e33 !important;
    font-size: 1.05rem;
    font-weight: 600;
}

    .custom-compact-modal .modal-title i {
        color: var(--accent);
    }

.custom-compact-modal .modal-body {
    padding: 1.25rem;
}

.custom-compact-modal .modal-footer {
    border-top: 1px solid #e9edf4;
    padding: 0.75rem 1.25rem;
}

    .custom-compact-modal .modal-footer .btn-outline-secondary {
        color: #64748b;
        border-color: #d1d9e6;
    }

        .custom-compact-modal .modal-footer .btn-outline-secondary:hover {
            background: #f1f5f9;
            color: #0b1e33;
            border-color: #b0c4de;
        }

/* ── Modal content rows (white theme) ── */
.flag-thumb {
    border-radius: 8px;
    border: 2px solid #e9edf4;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.info-compact-line {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f4f9;
}

    .info-compact-line:last-of-type {
        border-bottom: none;
    }

.info-icon-fixed {
    width: 24px;
    flex-shrink: 0;
    color: var(--accent);
    font-size: 1rem;
    text-align: center;
    margin-top: 1px;
}

.info-text {
    color: #1e293b;
    font-size: 0.9rem;
    word-break: break-word;
    line-height: 1.5;
}

    .info-text a {
        color: #0b1e33;
        text-decoration: none;
        font-weight: 500;
        border-bottom: 1px solid transparent;
        transition: border-color 0.2s;
    }

        .info-text a:hover {
            color: var(--accent);
            border-bottom-color: var(--accent);
        }

    .info-text.text-addr {
        font-size: 0.85rem;
        line-height: 1.6;
        color: #334155;
    }

.divider-light-custom {
    height: 1px;
    background: #e9edf4;
    margin: 12px 0 10px;
}

.stats-mini {
    font-size: 0.85rem;
    color: #64748b;
}

    .stats-mini i {
        color: var(--accent);
    }

    .stats-mini strong {
        color: #0b1e33;
    }

/* ── Responsive ── */
@media (max-width: 600px) {
    .header-left h1 {
        font-size: 1.6rem;
    }

    .branch-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .branch-card {
        padding: 1.25rem 0.75rem 1.25rem;
    }

    .flag-wrapper {
        max-width: 120px;
        border-radius: 8px;
    }

    .country-name {
        font-size: 0.95rem;
    }

    .location-icon {
        font-size: 0.85rem;
    }

    .info-text {
        font-size: 0.82rem;
    }

        .info-text.text-addr {
            font-size: 0.78rem;
        }
}

@media (max-width: 400px) {
    .branch-card-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .branch-card {
        padding: 1rem 0.5rem 1rem;
    }

    .flag-wrapper {
        max-width: 90px;
        border-radius: 6px;
    }

    .country-name {
        font-size: 0.8rem;
    }

    .branch-name {
        font-size: 0.65rem;
    }

    .badge {
        font-size: 0.55rem;
        padding: 0.1rem 0.6rem;
        margin-top: 0.6rem;
    }

    .location-icon {
        font-size: 0.7rem;
    }
}

