/* إعادة تعيين الأنماط الأساسية */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --text-color: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* شاشة الترحيب */
.splash-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    animation: fadeInUp 1s ease;
    padding: 20px;
}

.splash-logo img {
    width: 220px;
    max-width: 70vw;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.3));
}

.splash-text {
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.splash-loader {
    display: flex;
    gap: 10px;
}

.splash-loader span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    animation: splashBounce 1.2s infinite ease-in-out;
}

.splash-loader span:nth-child(2) {
    animation-delay: 0.2s;
}

.splash-loader span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes splashBounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.6;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .splash-text {
        font-size: 1rem;
    }

    .splash-loader span {
        width: 10px;
        height: 10px;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* شريط التنقل */
.header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar {
    padding: 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-brand i {
    font-size: 2rem;
    color: var(--secondary-color);
}

.nav-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

/* التأكد من أن القائمة لا تظهر على الشاشات الكبيرة */
@media (min-width: 769px) {
    .nav-menu {
        position: static !important;
        right: auto !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        flex-direction: row !important;
        padding: 0 !important;
        box-shadow: none !important;
    }
    
    .nav-menu.active {
        right: auto !important;
    }
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    transition: 0.3s;
}

/* قسم البطل */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 60px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s;
}
/* .hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 50px 0 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 50%;
    background: url('data:image/svg+xml,<svg width="50" height="50" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s;
} */

/* الأزرار */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    text-decoration: none;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* قسم الخريطة */
.map-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.map-container {
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--primary-color);
    color: var(--white);
}

.map-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-controls {
    display: flex;
    gap: 10px;
}

#map {
    height: 500px;
    width: 100%;
}

.map-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px;
    background: var(--bg-light);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
}

/* قسم الخطوط */
.routes-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.search-box {
    max-width: 500px;
    margin: 0 auto 40px;
    position: relative;
}

.search-box i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.routes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.route-card {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.route-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

.route-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.route-number {
    background: var(--secondary-color);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.2rem;
}

.route-status {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.route-status.active {
    background: var(--success-color);
    color: var(--white);
}

.route-status.inactive {
    background: #95a5a6;
    color: var(--white);
}

.route-name {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.route-path {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.route-info {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.route-info-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* قسم المحطات */
.stations-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.stations-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.station-card {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
}

.station-card:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow-lg);
}

.station-icon {
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.station-info {
    flex: 1;
}

.station-name {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.station-distance {
    color: var(--text-light);
    font-size: 0.9rem;
}

.station-routes {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.station-route-badge {
    background: var(--bg-light);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--text-color);
}

/* قسم الأسعار */
.prices-section {
    padding: 80px 0;
}

.prices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.price-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
}

.price-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.price-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.price-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.price-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.price-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.price-desc {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* قسم عن المشروع */
.about-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.about-card {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.about-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.about-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.about-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* التذييل */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* النموذج المنبثق */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background: var(--white);
    margin: 50px auto;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    position: relative;
    animation: modalFadeIn 0.3s;
}

.close {
    position: absolute;
    left: 20px;
    top: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--accent-color);
}

/* الرسوم المتحركة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* التصميم المتجاوب */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--primary-color);
        flex-direction: column;
        padding: 50px 20px;
        transition: right 0.3s;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-logo {
        height: 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .map-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .map-controls {
        width: 100%;
        justify-content: space-between;
    }

    #map {
        height: 400px;
    }

    .routes-grid,
    .stations-list,
    .prices-grid,
    .about-content {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 20px;
        padding: 20px;
    }
}

/* تحسينات إضافية */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-right: 4px solid #c33;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-right: 4px solid #3c3;
}

/* زر تحديد الموقع والوجهة */
.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--accent-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* لوحة معلومات المسار */
.route-info-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.route-info-content {
    max-width: 1200px;
    margin: 0 auto;
}

.route-info-content h4 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.route-info-content h4 i {
    font-size: 1.2rem;
}

#routeInfoDetails {
    margin: 15px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.route-step {
    padding: 10px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    border-right: 3px solid var(--warning-color);
}

.route-step h5 {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.route-step p {
    margin: 5px 0;
    opacity: 0.9;
}

/* نموذج الوجهة */
.destination-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-control select {
    cursor: pointer;
}

/* تحسينات الأزرار */
.map-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.map-controls .btn {
    white-space: nowrap;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .map-controls {
        width: 100%;
        flex-direction: column;
    }

    .map-controls .btn {
        width: 100%;
        justify-content: center;
    }

    .route-info-panel {
        padding: 15px;
    }

    .route-info-content h4 {
        font-size: 1rem;
    }

    .route-step {
        font-size: 0.9rem;
    }
}

/* إشعارات الموقع */
.location-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 3000;
    max-width: 400px;
    min-width: 300px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.location-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.location-notification.success {
    border-right: 4px solid var(--success-color);
}

.location-notification.error {
    border-right: 4px solid var(--accent-color);
}

.location-notification.info {
    border-right: 4px solid var(--secondary-color);
}

.notification-content {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    direction: rtl;
}

.notification-content i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.location-notification.success .notification-content i {
    color: var(--success-color);
}

.location-notification.error .notification-content i {
    color: var(--accent-color);
}

.location-notification.info .notification-content i {
    color: var(--secondary-color);
}

.notification-content span {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.5;
}

.notification-close {
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
    flex-shrink: 0;
}

.notification-close:hover {
    color: var(--accent-color);
}

.notification-close i {
    font-size: 1rem;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .location-notification {
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
        min-width: auto;
        transform: translateY(-100px);
    }

    .location-notification.show {
        transform: translateY(0);
    }
}

