:root {
    --primary-color: #005baa;
    --secondary-color: #ffcd00;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #757575;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    touch-action: pan-x pan-y;
    height: 100%;
}

.timetable-finder-fr .container {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.timetable-finder-fr header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.timetable-finder-fr h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.timetable-finder-fr .search-container {
    display: flex;
    justify-content: center;
    position: relative;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.timetable-finder-fr .search-input {
    width: 100%;
    max-width: 600px;
    padding: 15px 20px;
    border: 2px solid var(--medium-gray);
    border-radius: 30px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    margin-bottom: unset;
}

.timetable-finder-fr .search-input:focus {
    border-color: var(--primary-color);
}

.timetable-finder-fr .search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark-gray);
}

.timetable-finder-fr .filter-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.timetable-finder-fr .filter-btn {
    padding: 8px 16px;
    background-color: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.timetable-finder-fr .filter-btn:hover,
.timetable-finder-fr .filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.timetable-finder-fr .results-count {
    text-align: center;
    margin-bottom: 20px;
    color: var(--dark-gray);
    font-size: 14px;
}

.timetable-finder-fr .bus-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.timetable-finder-fr .bus-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.timetable-finder-fr .bus-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.timetable-finder-fr .bus-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.timetable-finder-fr .bus-icon {
    /* width: 40px;
    height: 40px; */
    /* background-color: var(--white); */
    /* border-radius: 50%; */
    display: flex;
    /* align-items: center; */
    justify-content: center;
    margin-right: 8px;
}

.timetable-finder-fr .bus-icon img {
    width: 78px;
    /* height: 30px; */
}

.timetable-finder-fr .bus-code {
    display: none;
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary-color);
}

.timetable-finder-fr .bus-title {
    flex: 1;
}

.timetable-finder-fr .bus-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 3px;
}

.timetable-finder-fr .bus-operator {
    font-size: 12px;
    opacity: 0.9;
}

.timetable-finder-fr .bus-body {
    padding: 20px;
    flex: 1;
}

.timetable-finder-fr .bus-route {
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    gap: 8px;
}

.timetable-finder-fr .bus-route i {
    color: var(--primary-color);
}

.timetable-finder-fr .bus-footer {
    display: flex;
    border-top: 1px solid var(--medium-gray);
}

.timetable-finder-fr .bus-action {
    flex: 1;
    text-align: center;
    padding: 12px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.timetable-finder-fr .bus-action:hover {
    background-color: rgba(0, 91, 170, 0.1);
}

.timetable-finder-fr .bus-action i {
    font-size: 16px;
}

.timetable-finder-fr .no-results {
    text-align: center;
    padding: 40px;
    color: var(--dark-gray);
    grid-column: 1 / -1;
}

.timetable-finder-fr .loading {
    text-align: center;
    padding: 40px;
    grid-column: 1 / -1;
}

.timetable-finder-fr .spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--primary-color);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .timetable-finder-fr .bus-list {
        grid-template-columns: 1fr;
    }

    .timetable-finder-fr .search-input {
        padding: 12px 20px;
    }
}


/* PDF Modal Styles */
.pdf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.pdf-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.pdf-modal .modal-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    height: 80%;
    margin: 5% auto;
    background: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.pdf-modal .modal-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdf-modal .modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.pdf-modal .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #555;
}

.pdf-modal .modal-content {
    flex: 1;
    padding: 15px;
    overflow: hidden;
}

.pdf-modal .modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.pdf-modal .modal-footer {
    padding: 10px 15px;
    border-top: 1px solid #eee;
    text-align: right;
}

.pdf-modal .modal-download {
    background-color: #005baa;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pdf-modal .modal-container {
        width: 95%;
        height: 90%;
        margin: 2% auto;
    }

    .pdf-modal .modal-header h3 {
        font-size: 1rem;
    }

    .pdf-modal .modal-download {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .pdf-modal .modal-container {
        width: 100%;
        height: 100%;
        margin: 0;
        border-radius: 0;
    }

    .pdf-modal .modal-header {
        padding: 10px;
    }
}



/* App Modal Styles */
.app-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.app-modal .modal-container {
    position: relative;
    width: 90%;
    max-width: 500px;
    margin: 5% auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

.app-modal .modal-header {
    padding: 20px;
    background-color: #005baa;
    color: white;
    text-align: center;
}

.app-modal .modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.app-modal .modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.app-modal .modal-content {
    padding: 20px 20px 0 20px;
}

.app-modal .app-features {
    margin-bottom: 20px;
}

.app-modal .feature {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.app-modal .feature i {
    width: 30px;
    color: #005baa;
    font-size: 1.2rem;
    text-align: center;
    margin-right: 15px;
}

.app-modal .feature p {
    margin: 0;
    font-size: 0.95rem;
}

.app-modal .app-download {
    text-align: center;
    margin: 25px 0;
}

.app-modal .app-download p {
    margin-bottom: 15px;
    color: #555;
}

.app-modal .play-store-btn {
    display: inline-block;
    height: 60px;
}

.app-modal .play-store-btn img {
    height: 100%;
}

.app-modal .modal-footer {
    padding: 0 15px 15px 15px;
    border-top: 1px solid #eee;
    text-align: center;
}

.app-modal .modal-continue {
    background: none;
    border: none;
    color: #005baa;
    font-size: 1rem;
    cursor: pointer;
    padding: 8px 15px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .app-modal .modal-container {
        width: 95%;
        margin: 2% auto;
    }

    .app-modal .modal-header h3 {
        font-size: 1.1rem;
    }

    .app-modal .feature {
        margin-bottom: 12px;
    }

    .app-modal .play-store-btn {
        height: 50px;
    }
}

@media (max-width: 400px) {
    .app-modal .modal-header {
        padding: 15px;
    }

    .app-modal .modal-content {
        padding: 15px 15px 0 15px;
    }

    .app-modal .feature i {
        font-size: 1rem;
        margin-right: 10px;
    }

    .app-modal .feature p {
        font-size: 0.85rem;
    }

    .app-modal .play-store-btn {
        height: 45px;
    }
}


.app-modal .app-description {
    margin: 20px 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .app-modal .app-description {
        margin: 15px 0;
        padding: 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .app-modal .app-description {
        margin: 10px 0;
        padding: 10px;
        font-size: 0.85rem;
    }
}