/* ===================================
   Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2196F3;
    --primary-dark: #1976D2;
    --secondary-color: #FF9800;
    --text-dark: #212121;
    --text-light: #757575;
    --bg-light: #FAFAFA;
    --bg-white: #FFFFFF;
    --border-color: #E0E0E0;
    --success-color: #4CAF50;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   Header & Navigation
   =================================== */
.site-header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.btn-nav {
    background: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: background 0.3s;
}

.btn-nav:hover {
    background: var(--primary-dark);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: all 0.3s;
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    margin-top: -1px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
}

/* ===================================
   Sections
   =================================== */
section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

/* ===================================
   Features Section
   =================================== */
.features {
    background: var(--bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
}

/* ===================================
   Route Finder Section
   =================================== */
.route-finder {
    background: var(--bg-white);
}

.finder-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ===================================
   Stats Section
   =================================== */
.stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ===================================
   CTA Section
   =================================== */
.cta {
    background: var(--bg-white);
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* ===================================
   Page Content
   =================================== */
.page-content {
    min-height: 60vh;
    padding: 3rem 0;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

/* ===================================
   Search Section
   =================================== */
.search-section {
    margin-bottom: 3rem;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
}

.route-search-form .search-inputs {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-inputs input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
}

.swap-btn {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.swap-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===================================
   Routes & Stops
   =================================== */
.popular-routes,
.areas-section {
    margin-bottom: 3rem;
}

.routes-grid,
.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.route-card,
.area-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.route-card:hover,
.area-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.route-card h3,
.area-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.route-card p,
.area-card p {
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.route-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--success-color);
    color: white;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ===================================
   Info Box
   =================================== */
.info-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 15px;
    margin-top: 3rem;
}

.info-box h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.info-box ul {
    list-style-position: inside;
    margin: 1.5rem 0;
}

.info-box li {
    margin-bottom: 0.5rem;
}

/* ===================================
   About Page
   =================================== */
.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-section {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.about-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.features-list {
    display: grid;
    gap: 1.5rem;
}

.feature-item h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.tech-list {
    list-style-position: inside;
    margin-top: 1rem;
}

.tech-list li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.cta-section {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cta-section h2 {
    color: white;
}

/* ===================================
   Download Page
   =================================== */
.download-section {
    max-width: 900px;
    margin: 0 auto;
}

.download-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.download-info h2 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.app-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 10px;
}

.stat strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.stat span {
    color: var(--text-light);
    font-size: 0.95rem;
}

.download-buttons {
    margin-top: 2rem;
}

.coming-soon-text {
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.download-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.download-features,
.system-requirements,
.installation-guide,
.privacy-note {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.features-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-mini {
    text-align: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 10px;
}

.feature-mini .icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.installation-guide ol {
    margin-top: 1.5rem;
    padding-left: 1.5rem;
}

.installation-guide li {
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.privacy-note ul {
    list-style-position: inside;
    margin-top: 1rem;
}

.privacy-note li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

/* ===================================
   Footer
   =================================== */
.site-footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    font-size: 1.5rem;
    text-decoration: none;
    transition: transform 0.3s;
}

.social-link:hover {
    transform: scale(1.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    margin: 0.5rem 0;
    color: rgba(255,255,255,0.6);
}

/* ===================================
   Results & Info
   =================================== */
.search-results {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.results-info {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 10px;
    margin-top: 1.5rem;
}

.info-text {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .download-hero {
        grid-template-columns: 1fr;
    }

    .app-stats {
        grid-template-columns: 1fr;
    }

    .search-inputs {
        flex-direction: column;
    }

    .search-inputs input {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Firebase Loading & Results
   =================================== */
.loading-spinner {
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results {
    text-align: center;
    padding: 3rem;
    background: var(--bg-light);
    border-radius: 12px;
    margin: 2rem 0;
}

.no-results p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #dc3545;
    margin: 2rem 0;
}

/* Route Type Badges */
.route-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.route-red {
    background: #dc3545;
    color: white;
}

.route-green {
    background: #28a745;
    color: white;
}

.route-orange {
    background: #fd7e14;
    color: white;
}

.route-mini {
    background: #6c757d;
    color: white;
}

.route-default {
    background: var(--primary-color);
    color: white;
}

/* Route Detail Styling */
.route-detail {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0.25rem 0;
}

.route-detail strong {
    color: var(--text-dark);
}

/* Search Results Container */
#route-results-container,
#popular-routes-container {
    min-height: 200px;
}

/* Results Info */
.results-info {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 12px;
    margin-top: 2rem;
}

.info-text {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}
