/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Enable hardware acceleration */
html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-color: #e3ae05;
    --secondary-color: #c99a04;
    --accent-color: #e3ae05;
    --gradient-1: linear-gradient(135deg, #202126 0%, #202126 40%, #e3ae05 100%);
    --gradient-2: linear-gradient(135deg, #e3ae05 0%, #c99a04 100%);
    --gradient-3: linear-gradient(135deg, #e3ae05 0%, #f5c518 100%);
    --white: #ffffff;
    --light-bg: #1a1a1a;
    --dark-text: #2d3748;
    --light-text: #718096;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--gradient-1);
    min-height: 100vh;
    color: var(--dark-text);
    overflow-x: hidden;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Profile Section */
.profile-section {
    text-align: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.profile-image {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background-color: #ffffff;
    border-radius: 50%;
    width: 150px;
    height: 150px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.profile-image img {
    width: 100px;
    height: auto;
    object-fit: contain;
    display: block;
}

.profile-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.profile-tagline {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* Links Section */
.links-section {
    padding: 0 10px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.section-title .icon {
    font-size: 24px;
}

.section-title h2 {
    color: var(--white);
    font-size: 20px;
    font-weight: 600;
}

.branches-intro {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
    font-size: 14px;
}

/* City Groups */
.city-group {
    background: var(--white);
    border-radius: 16px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    width: 100%;
}

.city-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.city-header:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.city-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #e3ae05 0%, #c99a04 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.city-name {
    flex: 1;
    text-align: right;
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-text);
}

.branch-count {
    font-size: 12px;
    color: var(--light-text);
    background: var(--light-bg);
    padding: 5px 12px;
    border-radius: 20px;
}

.city-arrow {
    color: var(--primary-color);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.city-arrow.rotated {
    transform: rotate(180deg);
}

/* City Branches */
.city-branches,
.branches-list {
    max-height: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: max-height;
}

.city-branches.open,
.branches-list.open {
    max-height: 5000px;
    overflow-y: auto;
}

/* City Card */
.city-card {
    background: var(--white);
    border-radius: 16px 16px 0 0;
    margin-bottom: 0;
    margin-top: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    width: 100%;
}

.city-card + .branches-list {
    background: var(--white);
    border-radius: 0 0 16px 16px;
    margin-bottom: 0;
    box-shadow: var(--shadow);
    width: 100%;
}

.branch-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: var(--dark-text);
    transition: all 0.2s ease;
}

.branch-item:hover {
    background: var(--light-bg);
}

.branch-item:last-child {
    border-bottom: none;
}

a.branch-item {
    cursor: pointer;
}

a.branch-item:active {
    transform: scale(0.98);
}

a.branch-item .fa-phone {
    color: var(--primary-color);
    font-size: 16px;
    margin-right: 8px;
}

.branch-item i:first-child {
    width: 35px;
    height: 35px;
    background: rgba(227, 174, 5, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 14px;
}

.branch-info {
    flex: 1;
    text-align: right;
}

.branch-name {
    flex: 1;
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-text);
    margin-bottom: 3px;
    text-align: right;
}

.branch-phone {
    display: block;
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 500;
    direction: ltr;
    text-align: left;
}

.branch-item i:last-child {
    color: var(--primary-color);
    font-size: 16px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .profile-name {
        font-size: 24px;
    }
    
    .city-name {
        font-size: 16px;
    }
    
    .branch-item {
        padding: 12px 16px;
    }
    
    .branch-name {
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 10px;
    }
    
    .profile-name {
        font-size: 22px;
    }
    
    .city-name {
        font-size: 15px;
    }
    
    .city-header {
        padding: 14px 16px;
    }
    
    .branch-item {
        padding: 10px 14px;
    }
    
    .branch-name {
        font-size: 12px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .city-card {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .city-header:hover {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    }
    
    .city-card:active {
        transform: scale(0.98);
    }
}
