* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --primary-blue: #003366;
    --blue-dark: #002244;
    --blue-medium: #0056B3;
    --blue-light: #E6F2FF;
    --accent-gold: #D4AF37;
    --bg-page: #F6F8FB;
    --bg-card: #FAFBFC;
    --bg-section: #F1F5FA;
    --text-dark: #2D3748;
    --text-medium: #4A5568;
    --text-light: #718096;
    --border-color: #E2E8F0;
    --border-light: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-page);
    min-height: 100vh;
    padding: 20px;
    padding-bottom: 90px;
    direction: rtl;
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: visible;
    min-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .container {
        border-radius: 0;
        min-height: 100vh;
        box-shadow: none;
        border: none;
    }
}

header {
    background: var(--primary-blue);
    color: #FFFFFF;
    padding: 24px 30px;
    text-align: center;
    border-bottom: 3px solid var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: space-between;
}

@media (max-width: 768px) {
    header {
        padding: 16px 12px;
        gap: 12px;
        border-bottom-width: 2px;
    }
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 120px;
    height: 120px;
}

.header-content {
    flex: 1;
    text-align: center;
    min-width: 200px;
}

.traffic-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 120px;
    height: 120px;
}

.traffic-logo,
.ministry-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

/* Optical scaling for visual balance */
.traffic-logo {
    transform: scale(1.05); /* Circular logo - slightly increase for visual balance */
}

.ministry-logo {
    transform: scale(0.85); /* Star-shaped logo - slightly reduce for visual balance */
}

@media (max-width: 768px) {
    .traffic-logo,
    .ministry-logo {
        transform: scale(1); /* Reset scaling on mobile for better visibility */
    }
}

header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    font-weight: 700;
    margin-top: 0;
    color: #FFFFFF;
    letter-spacing: 0.5px;
}

.subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
    font-weight: 400;
}

main {
    flex: 1;
    padding: 30px;
    background: var(--bg-page);
}

@media (max-width: 768px) {
    main {
        padding: 16px 12px;
    }
}

.buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .buttons-grid {
        gap: 14px;
        margin-bottom: 20px;
    }
}

.action-btn {
    background: var(--bg-card);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 20px 16px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    min-height: 120px;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.action-btn:hover {
    background: var(--blue-light);
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
    background: var(--blue-light);
}

/* تمييز الزر النشط في Desktop */
.action-btn.active {
    background: var(--blue-light);
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(26, 79, 122, 0.1);
}

@media (max-width: 768px) {
    .action-btn {
        padding: 20px;
        min-height: 110px;
        gap: 10px;
        border-radius: 8px;
        box-shadow: var(--shadow-md);
    }
    
    .action-btn:active {
        transform: scale(0.98);
        background: var(--blue-light);
    }
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: block;
    fill: none;
    stroke: var(--primary-blue);
    stroke-width: 2;
}

.action-btn:hover .btn-icon {
    stroke: var(--blue-medium);
}

.btn-text {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .btn-icon {
        width: 36px;
        height: 36px;
        stroke-width: 2.5;
    }
    
    .btn-text {
        font-size: 1.05rem;
        font-weight: 700;
    }
}

.info-section {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 6px;
    margin-top: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.info-text {
    font-size: 1rem;
    color: var(--text-medium);
    line-height: 1.8;
    text-align: center;
}

.video-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.video-player {
    width: 100%;
    height: auto;
    max-height: 250px;
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    background: #000;
    border: 2px solid var(--border-color);
    transition: max-height 0.3s ease;
}

.video-container iframe {
    width: 100%;
    height: 450px;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

footer {
    background: var(--primary-blue);
    padding: 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    border-top: 3px solid var(--accent-gold);
    font-size: 0.875rem;
}

/* Requests Page Styles */
.requests-container {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    max-width: 900px;
    margin: 0 auto;
}

.requests-container h1 {
    text-align: center;
    color: var(--text-dark);
    font-size: 2rem;
    margin-bottom: 32px;
    font-weight: 700;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary-blue);
}

.requests-section {
    background: var(--bg-card);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.requests-section-header {
    background: var(--blue-light);
    color: var(--text-dark);
    padding: 16px 24px;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.requests-section-header svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--primary-blue);
    stroke-width: 2;
}

.requests-section-content {
    padding: 20px 24px;
    background: var(--bg-section);
}

.requests-section ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.requests-section li {
    margin-bottom: 16px;
    padding-right: 28px;
    position: relative;
    font-size: 1rem;
    color: var(--text-medium);
    line-height: 1.7;
}

.requests-section li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 6px;
    width: 6px;
    height: 6px;
    background: var(--primary-blue);
    border-radius: 50%;
}

.requests-note-section {
    border-top: 3px solid var(--accent-gold);
}

.requests-note-section .requests-section-header {
    background: #FEF5E7;
    border-bottom-color: var(--accent-gold);
}

.requests-note-section .requests-section-header svg {
    stroke: var(--accent-gold);
}

.requests-highlight {
    font-weight: 700;
    color: var(--primary-blue);
}

/* Download Page Styles */
.download-container {
    color: var(--text-dark);
    max-width: 1000px;
    margin: 0 auto;
}

.download-container h2 {
    color: var(--text-dark);
    margin-bottom: 24px;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.download-card {
    background: var(--bg-card);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.download-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-blue);
}

.download-card-header {
    background: var(--blue-light);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.download-icon {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: var(--primary-blue);
    stroke-width: 2;
    flex-shrink: 0;
}

.download-card-header h3 {
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.download-card-body {
    padding: 16px;
    flex: 1;
    background: var(--bg-section);
}

.download-card-body p {
    color: var(--text-medium);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

.download-card-footer {
    padding: 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.download-card-footer.dual-buttons {
    display: flex;
    gap: 10px;
}

.download-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary-blue);
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
}

.download-btn:hover {
    background: var(--blue-medium);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.download-btn:active {
    transform: translateY(0);
}

.download-btn.secondary-btn {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.download-btn.secondary-btn:hover {
    background: var(--blue-light);
    border-color: var(--blue-medium);
    color: var(--blue-medium);
}

.download-btn.secondary-btn svg {
    stroke: var(--primary-blue);
}

.download-btn.secondary-btn:hover svg {
    stroke: var(--blue-medium);
}

.download-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 2;
}

.download-note {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-gold);
    border-radius: 6px;
    padding: 16px;
    text-align: right;
    color: var(--text-medium);
    font-size: 0.9rem;
    line-height: 1.7;
}

.download-note strong {
    color: var(--primary-blue);
    font-weight: 600;
}

.download-note p {
    margin: 0;
}

.download-note ul {
    margin: 8px 0 0 20px;
    padding: 0;
    list-style: disc;
}

/* رسالة خاصة للديسكتوب */
.download-note-desktop {
    display: none;
}

@media (min-width: 769px) {
    .download-note-mobile {
        display: none;
    }
    
    .download-note-desktop {
        display: block;
    }
}

/* FAQ Page Styles */
.faq-container {
    color: var(--text-dark);
    max-width: 900px;
    margin: 0 auto;
}

.faq-container h2 {
    color: var(--text-dark);
    margin-bottom: 24px;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
}

.faq-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-card);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-question {
    background: var(--blue-light);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: #D6E8FF;
}

.faq-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--primary-blue);
    stroke-width: 2;
    flex-shrink: 0;
}

.faq-question h3 {
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.faq-answer {
    padding: 16px 20px;
    background: var(--bg-section);
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.7;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-answer p {
    margin: 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.modal-header {
    background: var(--primary-blue);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #FFFFFF;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.close-modal {
    color: rgba(255, 255, 255, 0.8);
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.close-modal:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    background: var(--bg-section);
}

.authorities-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-dark);
}

.authorities-table thead {
    background: var(--blue-light);
}

.authorities-table th {
    padding: 14px 16px;
    text-align: right;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
    border-bottom: 2px solid var(--primary-blue);
}

.authorities-table td {
    padding: 14px 16px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-medium);
    font-size: 0.95rem;
}

.authorities-table tbody tr:hover td {
    background: var(--blue-light);
}

.authorities-table tbody tr:last-child td {
    border-bottom: none;
}

.authorities-link-inline {
    cursor: pointer;
    color: var(--primary-blue);
    text-decoration: underline;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 5px;
    font-weight: 600;
}

.authorities-link-inline:hover {
    color: var(--blue-medium);
}

.authorities-link-inline svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--primary-blue);
    stroke-width: 2;
    display: inline-block;
    vertical-align: middle;
}

.authorities-note {
    margin-top: 24px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-blue);
    border-radius: 6px;
}

.authorities-note p {
    margin: 0;
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.7;
}

.authorities-note strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* =========================
   New Activities Modal Design
========================= */

/* =========================
   Activities Modal Design - Minimal & Clean (Site-Consistent)
========================= */

/* Hide dashboard-style overview */
.authorities-overview {
    display: none; /* إخفاء الملخص الكبير */
}

/* Global Search Container - شريط البحث العام */
.global-search-container {
    margin-bottom: 20px;
    padding: 0 4px;
}

.global-search-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
    text-align: right;
}

.global-search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.global-search-input::placeholder {
    color: var(--text-medium);
    opacity: 0.7;
}

/* Authority Accordion - Minimal Clean Style */
.authority-accordion {
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-sm);
}

/* Authority Header - Clean Flex Row */
.authority-header {
    display: flex;
    align-items: center;
    gap: 12px;
    direction: rtl;
    width: 100%;
    background: white;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.authority-header:hover {
    background: var(--bg-section);
}

.authority-title {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 700;
    color: #003366;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.authority-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.map-btn:hover {
    background: var(--bg-section);
    color: var(--primary-blue);
}

.map-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.activity-count {
    background: #eef2f7;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    color: #374151;
    white-space: nowrap;
    font-weight: 500;
}

.expand-btn {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-medium);
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
    padding: 0;
}

/* Legacy - hide old class */
.authority-accordion-header {
    display: none;
}

.authority-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--bg-section);
}

.authority-accordion-content.open {
    max-height: 2000px;
    padding: 16px;
}

/* Authority Details Header - Simplified */
.authority-details-header {
    display: none; /* إخفاء الـ badges الكبيرة */
}

/* Authority Search - Minimal */
.authority-search-container {
    margin-bottom: 16px;
}

.authority-search-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.2s ease;
    background: white;
}

.authority-search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.08);
}

.authority-search-input::placeholder {
    color: var(--text-light);
}

/* Authority Sections Container */
.authority-sections-container {
    margin-top: 0;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .authority-accordion {
        margin-bottom: 10px;
    }
    
    .authority-header {
        padding: 14px 16px;
        gap: 10px;
    }
    
    .authority-title {
        font-size: 0.95rem;
    }
    
    .map-btn {
        font-size: 0.75rem;
        padding: 3px 6px;
        gap: 3px;
    }
    
    .map-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .activity-count {
        font-size: 0.8rem;
        padding: 3px 8px;
    }
    
    .expand-btn {
        font-size: 0.85rem;
        width: 18px;
    }
    
    .authority-accordion-content.open {
        padding: 14px;
    }
    
    .authority-search-input {
        font-size: 0.9rem;
        padding: 9px 12px;
    }
}

/* Mobile only - Stack layout */
@media (max-width: 640px) {
    .authority-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .authority-title {
        width: 100%;
        font-size: 1rem;
    }

    .authority-actions {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .expand-btn {
        margin-right: auto; /* يثبت السهم أقصى اليسار */
    }
}

@media (max-width: 480px) {
    .authority-name {
        font-size: 0.9rem;
    }
    
    .authority-info {
        gap: 10px;
    }
}

/* Section (Accordion) - Minimal Clean Style */
.activities-section {
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    background: white;
}

.section-header {
    width: 100%;
    background: white;
    border: none;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: 'Cairo', sans-serif;
}

.section-header:hover {
    background: var(--bg-section);
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: right;
}

.section-icon {
    font-size: 0.8rem;
    color: var(--text-medium);
    transition: transform 0.3s ease;
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
    background: white;
}

.section-content.open {
    max-height: 1500px;
    padding: 12px 16px;
}

/* Activity Group - Minimal */
.activity-group {
    margin-bottom: 16px;
}

.activity-group:last-child {
    margin-bottom: 0;
}

.group-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 10px 0;
    padding: 6px 10px;
    background: var(--bg-section);
    border-right: 3px solid var(--primary-blue);
    border-radius: 4px;
}

/* Activities List - Clean */
.activities-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.activity-item:hover {
    background: var(--bg-section);
}

.activity-item.highlight {
    background: #FFF4E6;
    border-right: 2px solid var(--accent-gold);
}

.activity-bullet {
    color: var(--primary-blue);
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

.activity-name {
    font-size: 0.9rem;
    color: var(--text-medium);
    line-height: 1.4;
}

/* Search Input - Reuse existing style */
.activities-search-container {
    margin-bottom: 16px;
}

.activities-search-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.2s ease;
}

.activities-search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.08);
}

/* Activities Count - Hidden (minimal design) */
.activities-count {
    display: none;
}

/* Modal Adjustments */
.activities-modal {
    max-width: 950px;
}

.activities-modal .modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--bg-page);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .section-header {
        padding: 10px 14px;
    }
    
    .section-title {
        font-size: 0.9rem;
    }
    
    .section-content.open {
        padding: 10px 14px;
    }
    
    .group-title {
        font-size: 0.85rem;
        padding: 5px 8px;
    }
    
    .activity-item {
        padding: 7px 8px;
    }
    
    .activity-name {
        font-size: 0.85rem;
    }
    
    .activities-modal .modal-body {
        padding: 16px;
        max-height: 65vh;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 0.85rem;
    }
    
    .group-title {
        font-size: 0.8rem;
    }
    
    .activity-name {
        font-size: 0.8rem;
    }
}


/* Legacy - Old Authority Header Styles (not used) */
.old-authority-header-legacy {
    background: var(--blue-light);
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-right: 4px solid var(--primary-blue);
}

.old-authority-header-legacy h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.old-authority-header-legacy h3 span {
    color: var(--primary-blue);
    font-weight: 700;
}

/* Search Input */
.activities-search-container {
    margin-bottom: 20px;
}

.activities-search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.2s ease;
}

.activities-search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

/* Section (Accordion) */
.activities-section {
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.section-header {
    width: 100%;
    background: var(--bg-section);
    border: none;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: 'Cairo', sans-serif;
}

.section-header:hover {
    background: var(--blue-light);
}

.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-align: right;
}

.section-icon {
    font-size: 0.9rem;
    color: var(--primary-blue);
    transition: transform 0.3s ease;
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg-card);
}

.section-content.open {
    max-height: 2000px;
    padding: 16px 20px;
}

/* Activity Group */
.activity-group {
    margin-bottom: 24px;
}

.activity-group:last-child {
    margin-bottom: 0;
}

.group-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 12px 0;
    padding: 8px 12px;
    background: var(--blue-light);
    border-right: 3px solid var(--blue-medium);
    border-radius: 4px;
}

/* Activities List */
.activities-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    transition: background 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.activity-item:hover {
    background: var(--blue-light);
    transform: translateX(-4px);
}

.activity-item.highlight {
    background: #FFF4E6;
    border-right: 3px solid var(--accent-gold);
}

.activity-bullet {
    color: var(--primary-blue);
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.activity-name {
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.5;
}

/* Activities Count */
.activities-count {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-medium);
    text-align: center;
}

.activities-count strong {
    color: var(--primary-blue);
    font-weight: 700;
}

/* Modal Adjustments for New Design */
.activities-modal {
    max-width: 950px;
}

.activities-modal .modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .authority-header {
        padding: 14px 16px;
    }
    
    .authority-header h3 {
        font-size: 1rem;
    }
    
    .activities-search-input {
        font-size: 0.95rem;
        padding: 10px 14px;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .section-header {
        padding: 12px 16px;
    }
    
    .section-content.open {
        padding: 12px 16px;
    }
    
    .group-title {
        font-size: 0.95rem;
        padding: 6px 10px;
    }
    
    .activity-item {
        padding: 8px 10px;
    }
    
    .activity-name {
        font-size: 0.9rem;
    }
    
    .activities-modal .modal-body {
        padding: 16px;
        max-height: 65vh;
    }
}

@media (max-width: 480px) {
    .authority-header h3 {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 0.95rem;
    }
    
    .group-title {
        font-size: 0.9rem;
    }
    
    .activity-name {
        font-size: 0.85rem;
    }
}

/* Mobile navbar is hidden by default (desktop/tablet > 768px) */
.mobile-navbar {
    display: none;
}

/* Responsive Design - Mobile Only (max-width: 768px) */
/* Moved to end of file - see MOBILE FLOATING NAVBAR section */

/* =========================
   MOBILE FLOATING NAVBAR (FINAL – CLEAN)
========================= */

@media (max-width: 768px) {

  /* اخفاء ازرار الديسكتوب */
  .buttons-grid {
    display: none !important;
  }

  /* Body adjustments */
  body {
    padding: 0 !important;
    padding-bottom: 90px !important;
    overflow-x: hidden;
  }

  /* Container adjustments */
  .container {
    border-radius: 0;
    min-height: 100vh;
    box-shadow: none;
    border: none;
    margin: 0;
    max-width: 100%;
  }

  /* Header adjustments - Stack vertically */
  header {
    flex-direction: column !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 32px 16px 24px !important;
    gap: 6px !important;
    border-bottom-width: 2px;
    align-items: center;
  }

  /* الترتيب: 1. شعار وزارة الداخلية */
  .logo-container {
    order: 1 !important;
    width: 72px !important;
    height: 72px !important;
    margin: 0 auto 12px auto !important;
    flex-shrink: 0;
  }

  /* الترتيب: 2. العنوان (شهادة اعتماد التوقيع) + 3. المرور الكويت */
  .header-content {
    order: 2 !important;
    width: 100% !important;
    margin: 2px 0 !important;
    flex: 0 0 auto;
    text-align: center;
  }

  /* الترتيب: 3. شعار الإدارة العامة للمرور */
  .traffic-logo-container {
    order: 3 !important;
    width: 72px !important;
    height: 72px !important;
    margin: 12px auto 0 auto !important;
    flex-shrink: 0;
  }

  /* إلغاء transform/scale على الشعارات في الموبايل */
  header img,
  .traffic-logo,
  .ministry-logo {
    max-width: 72px !important;
    max-height: 72px !important;
    width: 72px !important;
    height: 72px !important;
    transform: none !important;
    object-fit: contain;
    margin-bottom: 12px;
  }

  header h1 {
    font-size: 22px !important;
    line-height: 1.4 !important;
    margin: 4px 0 2px 0 !important;
  }

  header h2,
  header p,
  .subtitle {
    font-size: 14px !important;
    margin: 0 !important;
  }

  /* Main content adjustments */
  main {
    padding: 16px 12px 20px 12px;
  }

  /* Info section */
  .info-section {
    padding: 20px 16px !important;
    margin-top: 16px;
    border-radius: 8px;
  }

  .info-text {
    font-size: 0.95rem;
  }

  /* Video container */
  .video-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .video-player {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
  }

  video {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }

  .video-container iframe {
    width: 100%;
    height: auto;
    min-height: 250px;
    max-height: 50vh;
    border-radius: 8px;
  }

  /* Requests page */
  .requests-container {
    max-width: 100%;
  }

  .requests-container h1 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    padding-bottom: 12px;
  }

  .requests-section {
    margin-bottom: 16px;
  }

  .requests-section-header {
    padding: 14px 16px;
    font-size: 1.1rem;
  }

  .requests-section-content {
    padding: 16px;
  }

  .requests-section li {
    padding-right: 24px;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 14px;
  }

  /* Download page */
  .download-container {
    max-width: 100%;
  }

  .download-container h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }

  .download-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .download-card {
    width: 100%;
  }

  .download-card-header {
    padding: 14px;
  }

  .download-card-body {
    padding: 14px;
  }

  .download-card-footer {
    padding: 14px;
  }
  
  .download-card-footer.dual-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  /* إخفاء زر المعاينة على الهواتف */
  .download-btn.secondary-btn {
    display: none !important;
  }

  .download-btn {
    padding: 14px 20px;
    font-size: 0.95rem;
    width: 100%;
  }
  
  .download-btn svg {
    width: 20px;
    height: 20px;
  }

  /* FAQ page */
  .faq-container {
    max-width: 100%;
  }

  .faq-container h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }

  .faq-section {
    gap: 12px;
  }

  .faq-item {
    width: 100%;
  }

  .faq-question {
    padding: 14px 16px;
  }

  .faq-question h3 {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .faq-answer {
    padding: 14px 16px;
    font-size: 0.9rem;
    line-height: 1.7;
  }

  /* Modal adjustments */
  .modal-content {
    width: 95%;
    max-height: 90vh;
    margin: 5vh auto;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-header h2 {
    font-size: 1.3rem;
  }

  .modal-body {
    padding: 16px;
  }

  .authorities-table {
    font-size: 0.9rem;
  }

  .authorities-table th,
  .authorities-table td {
    padding: 10px 8px;
    font-size: 0.85rem;
  }

  .authorities-note {
    margin-top: 16px;
    padding: 14px;
  }

  /* منع تداخل الفوتر */
  footer {
    margin-bottom: 90px;
    padding: 12px;
    font-size: 0.8rem;
  }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
  header {
    padding: 12px 8px !important;
    gap: 8px !important;
  }
  
  .logo-container,
  .traffic-logo-container {
    width: 70px !important;
    height: 70px !important;
  }

  header img,
  .traffic-logo,
  .ministry-logo {
    max-width: 70px !important;
    max-height: 70px !important;
    width: 70px !important;
    height: 70px !important;
  }

  header h1 {
    font-size: 1.2rem !important;
    margin-bottom: 4px !important;
    line-height: 1.3;
  }
  
  .subtitle {
    font-size: 0.8rem !important;
  }

  main {
    padding: 12px 8px;
  }

  .info-section {
    padding: 14px !important;
  }

  .video-container iframe {
    min-height: 200px;
    max-height: 45vh;
  }

  .requests-container h1 {
    font-size: 1.35rem;
    margin-bottom: 20px;
  }

  .requests-section-header {
    padding: 12px 14px;
    font-size: 1rem;
  }

  .requests-section-content {
    padding: 14px;
  }

  .requests-section li {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  .download-container h2,
  .faq-container h2 {
    font-size: 1.35rem;
  }

  .download-card-header h3 {
    font-size: 0.95rem;
  }

  .faq-question h3 {
    font-size: 0.9rem;
  }

  .faq-answer {
    font-size: 0.85rem;
  }

  .modal-content {
    width: 98%;
    max-height: 95vh;
    border-radius: 12px;
  }

  .modal-header {
    padding: 14px 12px;
  }
  
  .modal-header h2 {
    font-size: 1.2rem;
  }

  .modal-body {
    padding: 14px 12px;
  }

  .authorities-table th,
  .authorities-table td {
    padding: 8px 6px;
    font-size: 0.8rem;
  }
}

/* =========================
   Mobile Bottom Navbar (Modern Design)
========================= */
@media (max-width: 768px) {

  body {
    padding-bottom: 110px;
  }

  .mobile-navbar {
    position: fixed;
    bottom: env(safe-area-inset-bottom, 14px);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 420px;
    height: 80px;

    background: rgba(245, 247, 250, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    border: 1px solid rgba(0, 0, 0, 0.08);

    display: flex;
    justify-content: space-around;
    align-items: center;

    padding: 12px 8px;
    box-shadow: 
      0 0 1px rgba(0,0,0,0.08),
      0 8px 24px rgba(0,0,0,0.12),
      0 16px 48px rgba(0,0,0,0.08);
    z-index: 9999;
  }

  .mobile-navbar .nav-item {
    background: none;
    border: none;
    outline: none;

    flex: 1;
    text-align: center;
    color: #8b92a0;
    font-size: 13px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    
    position: relative;
    padding: 8px 4px;
    border-radius: 20px;
    
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  }

  /* دائرة خلفية للعنصر النشط */
  .mobile-navbar .nav-item.active {
    background: #0b3a67;
    color: #ffffff;
    font-weight: 600;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(11, 58, 103, 0.3);
  }

  .mobile-navbar .nav-icon {
    width: 26px;
    height: 26px;
    stroke-width: 2;
    transition: transform 0.2s ease, color 0.2s ease;
  }

  .mobile-navbar .nav-item.active .nav-icon {
    stroke: #ffffff;
    stroke-width: 2.2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  }

  .mobile-navbar .label {
    font-size: 12px;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
  }

  .mobile-navbar .nav-item.active .label {
    font-weight: 600;
    color: #ffffff;
  }

  /* إزالة النقطة الزرقاء القديمة */
  .mobile-navbar .nav-item.active::after {
    display: none;
  }

  /* منع تداخل الفوتر */
  footer {
    margin-bottom: 110px;
  }
}

/* =========================
   Sahel App Alert Card (Official Design)
========================= */

/* بطاقة التنبيه الرسمية - صفحة حجز الموعد */
.alert-card {
    background: #f8fafc;
    border-right: 6px solid #facc15;
    border-radius: 14px;
    padding: 20px;
    max-width: 100%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    font-family: 'Cairo', system-ui, sans-serif;
    margin: 0 0 32px 0;
}

.alert-header {
    font-size: 18px;
    font-weight: 700;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.alert-text {
    margin: 0 0 18px 0;
    color: #374151;
    font-size: 15px;
    line-height: 1.6;
}

.alert-text strong {
    color: #0b3a67;
    font-weight: 700;
}

.alert-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.alert-actions .btn {
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    font-family: 'Cairo', sans-serif;
}

.alert-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alert-actions .appstore {
    background: #000;
}

.alert-actions .appstore:hover {
    background: #1a1a1a;
}

.alert-actions .playstore {
    background: #15803d;
}

.alert-actions .playstore:hover {
    background: #166534;
}

/* تذكير مختصر - الصفحة الرئيسية */
.appointment-reminder-compact {
    background: #fffbeb;
    border: 2px solid #fcd34d;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 0 0 24px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(252, 211, 77, 0.15);
}

.reminder-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.appointment-reminder-compact span {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: #451a03;
}

.appointment-reminder-compact strong {
    color: #0b3a67;
    font-weight: 700;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .alert-card {
        padding: 18px;
        border-right-width: 5px;
    }
    
    .alert-header {
        font-size: 16px;
    }
    
    .alert-text {
        font-size: 14px;
    }
    
    .alert-actions {
        flex-direction: column;
    }
    
    .alert-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }
    
    .appointment-reminder-compact {
        flex-direction: row;
        text-align: right;
        padding: 12px 14px;
    }
    
    .reminder-icon {
        font-size: 20px;
    }
    
    .appointment-reminder-compact span {
        font-size: 13px;
    }
}

/* =========================
   PDF Viewer Styles
========================= */

#pdfViewerContainer {
    margin: 24px 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-md);
}

.pdf-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--blue-light);
    border-bottom: 2px solid var(--primary-blue);
    gap: 16px;
}

.pdf-title {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
}

.pdf-control-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.pdf-control-btn:hover {
    background: var(--blue-medium);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.pdf-control-btn:active {
    transform: translateY(0);
}

.pdf-control-btn svg {
    width: 18px;
    height: 18px;
    stroke: white;
    flex-shrink: 0;
}

.pdf-canvas-container {
    background: #f5f5f5;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
    overflow: hidden;
}

.pdf-canvas-container iframe {
    display: block;
    width: 100%;
    height: 600px;
    border: none;
    background: white;
}

.pdf-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    background: var(--bg-section);
    border-top: 1px solid var(--border-color);
}

.pdf-nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.pdf-nav-btn:hover:not(:disabled) {
    background: var(--blue-medium);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.pdf-nav-btn:active:not(:disabled) {
    transform: translateY(0);
}

.pdf-nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.pdf-nav-btn svg {
    width: 16px;
    height: 16px;
    stroke: white;
}

.page-info {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    min-width: 120px;
    text-align: center;
}

/* Mobile adjustments for PDF Viewer */
@media (max-width: 768px) {
    .pdf-controls {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 8px;
    }
    
    .pdf-title {
        order: 1;
        width: 100%;
        margin-bottom: 8px;
        font-size: 1rem;
    }
    
    .pdf-control-btn {
        flex: 1;
        order: 2;
        padding: 10px 12px;
        font-size: 0.9rem;
        justify-content: center;
    }
    
    .pdf-canvas-container {
        padding: 0;
        min-height: 400px;
    }
    
    .pdf-canvas-container iframe {
        height: 500px;
    }
    
    .pdf-navigation {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .pdf-nav-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .page-info {
        font-size: 0.9rem;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .pdf-control-btn {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .pdf-control-btn span {
        display: none; /* Hide button text on very small screens, show only icons */
    }
    
    .pdf-nav-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .page-info {
        font-size: 0.85rem;
    }
}

/* =========================
   Kuwait Government Official Alert Card - Final Design
========================= */

/* الكرت الرئيسي */
.alert-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 14px 20px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    position: relative;
    max-width: 900px;
    margin: 0 auto 24px;
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

/* خط التنبيه الجانبي */
.alert-card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    background: #f5b301;
    border-radius: 0 16px 16px 0;
}

/* عنوان التنبيه */
.alert-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 14px;
}

/* نص التنبيه */
.alert-text {
    max-width: 100%;
    margin-inline: auto;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 10px;
}

.alert-text strong {
    color: #1e3a8a;
    font-weight: 700;
}

/* نص الدعوة للعمل */
.alert-cta {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
    text-align: center;
}

/* الأزرار */
.alert-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-top: 10px;
    flex-wrap: wrap; /* مهم للجوال */
}

/* زر كبير وواضح */
.alert-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 200px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Google Play */
.alert-btn.play {
    background: #166534;
}

/* App Store */
.alert-btn.app {
    background: #111827;
}

/* Hover خفيف جداً (رسمي) */
.alert-btn:hover {
    transform: translateY(-1px);
}

/* تحسين الموبايل */
@media (max-width: 640px) {
    .alert-actions {
        flex-direction: column;
    }
    
    .alert-btn {
        width: 100%;
        max-width: 360px;
    }
}

@media (max-width: 768px) {
    .alert-card {
        padding: 22px 20px;
        border-radius: 14px;
    }
    
    .alert-title {
        font-size: 16px;
    }
    
    .alert-text {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .alert-btn {
        padding: 14px 22px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .alert-card {
        padding: 18px 16px;
    }
    
    .alert-title {
        font-size: 15px;
    }
    
    .alert-text {
        font-size: 13px;
    }
    
    .alert-btn {
        max-width: 320px;
    }
}

/* ===== تحسينات الأداء للشاشات الصغيرة ===== */
@media (max-width: 768px) {
    /* تعطيل/تقليل box-shadows لتحسين الأداء */
    .action-btn,
    .download-card,
    .faq-item,
    .authority-accordion,
    .modal-content {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    }
    
    .action-btn:hover,
    .download-card:hover {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
        transform: none !important;
    }
    
    /* تعطيل transforms على hover للموبايل */
    .activity-item:hover {
        transform: none !important;
    }
    
    /* تقليل transitions للموبايل */
    * {
        transition-duration: 0.15s !important;
    }
    
    /* تثبيت ارتفاع header */
    header {
        min-height: 80px;
    }
    
    /* منع تكرار حساب flex-wrap */
    .buttons-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

/* ============================================
   أنماط زر الموقع وModal الخريطة
   ============================================ */

/* Modal الخريطة */
.location-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.location-modal-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

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

.location-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.location-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 28px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    line-height: 1;
    padding: 0;
}

.location-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.location-modal-body {
    padding: 24px;
}

.location-map-container {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.location-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.location-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Cairo', 'Segoe UI', sans-serif;
}

.location-btn-primary {
    background: linear-gradient(135deg, #166534 0%, #16a34a 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(22, 101, 52, 0.3);
}

.location-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(22, 101, 52, 0.4);
}

.location-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.location-btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

/* تحسينات الموبايل */
@media (max-width: 768px) {
    .location-modal {
        padding: 12px;
    }
    
    .location-modal-content {
        border-radius: 12px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .location-modal-header {
        padding: 16px 18px;
    }
    
    .location-modal-header h3 {
        font-size: 18px;
    }
    
    .location-modal-body {
        padding: 18px;
    }
    
    .location-map-container iframe {
        height: 350px;
    }
    
    .location-actions {
        flex-direction: column;
    }
    
    .location-btn {
        width: 100%;
        justify-content: center;
    }
}
