/*
Theme Name: UsaRailTickets
Theme URI: https://usarailtickets.com/
Author: Trishala Sharma
Description: Custom high-performance US Rail & Train Ticket booking and route comparison theme with instant e-pass integration.
Version: 1.0
*/

:root {
    --primary: #0a4abf;
    --primary-dark: #063488;
    --primary-light: #eff6ff;
    --accent: #d97706;
    --secondary: #dc2626;
    
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --card-bg: #ffffff;
    
    --text-dark: #0f172a;
    --text-main: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-white);
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    color: var(--text-dark);
    font-family: var(--font-heading);
}

.tag {
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 8px;
}

.text-center { text-align: center; }

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(10, 74, 191, 0.25);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 700;
    padding: 12px 20px;
}

.btn-secondary:hover {
    color: var(--primary);
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    text-decoration: none;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: var(--primary);
    color: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.logo .highlight {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Hero Section with High-Quality Background Image */
.hero-section {
    position: relative;
    background: url('https://images.unsplash.com/photo-1474487548417-781cb71495f3?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;

    padding: 100px 0 120px 0;
    color: #ffffff;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-badge i { color: #f59e0b; }

.hero-content h1 {
    font-size: 52px;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 16px;
}

.gradient-text {
    color: #93c5fd;
}

.hero-content p {
    color: #e2e8f0;
    font-size: 18px;
    max-width: 680px;
    margin: 0 auto 36px auto;
}

/* Booking Card (Light Theme over Hero Image) */
.booking-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 1100px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    text-align: left;
    color: var(--text-main);
}

.booking-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.b-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.b-tab.active, .b-tab:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.booking-grid {
    display: grid;
    grid-template-columns: 2fr 40px 2fr 1.5fr 1.5fr 1.5fr;
    gap: 12px;
    align-items: center;
}

.input-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    background: var(--bg-light);
}

.input-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.input-card input, .input-card select {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 14px;
    outline: none;
}

.swap-circle {
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-submit-search {
    background: var(--secondary);
    color: #ffffff;
    border: none;
    padding: 16px;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s;
}

.btn-submit-search:hover {
    background: #b91c1c;
}

/* Routes Section */
.routes-section {
    padding: 90px 0;
    background: var(--bg-light);
}

.section-title h2 {
    font-size: 36px;
    margin-bottom: 8px;
}

.section-title p {
    color: var(--text-muted);
}

.routes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.route-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.route-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.route-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    padding: 14px;
}

.route-tag {
    background: rgba(15, 23, 42, 0.8);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
}

.route-info {
    padding: 20px;
}

.route-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.route-header h3 {
    font-size: 18px;
}

.route-header h3 span {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 14px;
}

.price {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
}

.route-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.route-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding: 12px 0 16px 0;
}

.btn-card {
    display: block;
    text-align: center;
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    transition: all 0.2s;
}

.btn-card:hover {
    background: var(--primary);
    color: #ffffff;
}

/* Travel Classes Section */
.classes-section {
    padding: 90px 0;
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.class-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    position: relative;
}

.class-card.highlighted {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.class-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--primary);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 50px;
}

.class-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}

.class-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.class-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.class-features {
    list-style: none;
}

.class-features li {
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.class-features li i {
    color: #16a34a;
}

/* Guide Section */
.guide-section {
    padding: 90px 0;
    background: var(--bg-light);
}

.guide-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.step-list {
    margin-top: 30px;
}

.step-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.step-num {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    background: var(--primary-light);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-item h4 {
    font-size: 18px;
    margin-bottom: 4px;
}

.step-item p {
    color: var(--text-muted);
    font-size: 14px;
}

.guide-box-decor {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    font-size: 30px;
    color: var(--primary);
}

.stat-card h3 {
    font-size: 24px;
}

.stat-card p {
    color: var(--text-muted);
    font-size: 13px;
}

/* FAQ Section */
.faq-section {
    padding: 90px 0;
}

.faq-accordion {
    max-width: 800px;
    margin: 40px auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.faq-question {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 20px;
    color: var(--text-dark);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question i {
    transition: transform 0.3s;
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer p {
    color: var(--text-muted);
    font-size: 14px;
}

.faq-item.active .faq-answer {
    max-height: 150px;
    padding: 0 20px 20px 20px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* Footer */
.site-footer {
    background: var(--text-dark);
    color: #94a3b8;
    padding: 70px 0 30px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    color: #ffffff;
    margin-bottom: 12px;
}

.brand-col p {
    font-size: 14px;
    margin-bottom: 16px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: #1e293b;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary);
}

.footer-col h4 {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
}

.footer-col ul li a:hover {
    color: #ffffff;
}

.footer-col p {
    font-size: 14px;
    margin-bottom: 10px;
}

.pay-icons {
    display: flex;
    gap: 10px;
    font-size: 26px;
    color: #cbd5e1;
    margin-top: 12px;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 24px;
    text-align: center;
    font-size: 13px;
}

/* Responsive Rules */
@media (max-width: 1024px) {
    .booking-grid {
        grid-template-columns: 1fr 1fr;
    }
    .swap-circle { display: none; }
    .routes-grid, .classes-grid {
        grid-template-columns: 1fr;
    }
    .guide-wrapper {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================
   Mobile Phone Responsive Styles (Max Width: 768px)
   ========================================== */

/* ==========================================
   Mobile Phone Responsive (Fixed Horizontal Scroll)
   ========================================== */

@media (max-width: 768px) {
    /* Global Container Fixes */
    html, body {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 16px;
        box-sizing: border-box;
    }

    /* Typography & Spacing */
    .hero-content h1 {
        font-size: 28px;
        line-height: 1.25;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-content p {
       display: none;
    }

    /* Navbar Fixes */
    .navbar {
        padding: 12px 0;
        width: 100%;
    }

    .nav-links, .nav-actions .btn-secondary {
        display: none;
    }

    /* Booking Card Fixes (Main culprit for horizontal scroll) */
    .booking-card {
        width: 100%;
        max-width: 100%;
        padding: 16px 12px;
        box-sizing: border-box;
    }

    .booking-nav {
        display: flex;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        gap: 6px;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .b-tab {
        flex-shrink: 0;
        padding: 6px 10px;
        font-size: 13px;
    }

    .booking-grid {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .input-card {
        width: 100%;
        box-sizing: border-box;
    }

    .input-card input, 
    .input-card select {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .swap-circle {
        margin: 4px auto;
        transform: rotate(90deg);
        flex-shrink: 0;
    }

    .btn-submit-search {
        width: 100%;
        box-sizing: border-box;
    }

    /* Section Grids Fixes */
    .routes-grid,
    .classes-grid,
    .guide-wrapper,
    .footer-grid {
        grid-template-columns: 1fr;
        width: 100%;
        gap: 20px;
    }

    .route-card,
    .class-card,
    .stat-card,
    .faq-item {
        width: 100%;
        box-sizing: border-box;
    }

    /* FAQ Section Fix */
    .faq-accordion {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .faq-question {
        padding: 14px;
        font-size: 14px;
        word-break: break-word;
    }
	.hero-badge {
		display: none;
	}
}