/* styles.css - Travel Booking Platform */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* CSS Variables */
:root {
    /* Colors */
    --primary-color: #f26722;
    --primary-hover: #e05b17;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #48cae4;
    --bg-light: #f5f5f5;
    --bg-white: #fff;
    
    /* Shadows */
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
    --shadow-md: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 20px rgba(0,0,0,0.15);
    
    /* Common values */
    --border-radius-sm: 6px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 20px;
}

/* Global Styles */
body {
    background-color: var(--bg-light);
    padding-bottom: 70px;
    text-size-adjust: 100%;
    color: var(--text-dark);
}

/* Accessibility Focus Styles */
a:focus, 
button:focus, 
input:focus, 
select:focus, 
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="password"]:focus,
input[type="date"]:focus,
select:focus,
button:focus,
a:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(242, 103, 34, 0.3);
    outline: none;
}

/* Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes gentle-scroll {
    0% { transform: translateX(0); }
    15% { transform: translateX(-15px); }
    30% { transform: translateX(0); }
    100% { transform: translateX(0); }
}

/* Legacy Header Styles - Deprecated in favor of header.css */
header:not(.main-header) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

header:not(.main-header) .menu-icon {
    font-size: 1.5rem;
}

header:not(.main-header) .menu-icon button {
    background: none; 
    border: none; 
    cursor: pointer;
}

header:not(.main-header) .logo img {
    height: 30px;
}

header:not(.main-header) .login a {
    text-decoration: none;
    color: var(--text-dark);
}

/* Bottom Navigation Styles */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    background-color: var(--bg-white);
    padding: 8px 5px;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

.main-bottom-nav .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-light);
    padding: 5px 2px;
    width: 20%;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    border-radius: 4px;
}

.main-bottom-nav .bottom-nav-item i {
    font-size: 18px;
}

.main-bottom-nav .bottom-nav-item span {
    font-size: 11px;
    font-weight: 500;
}

.main-bottom-nav .bottom-nav-item.active {
    color: var(--primary-color);
    font-weight: bold;
    background-color: rgba(242, 103, 34, 0.1);
}

/* Service Grid Styles */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 10px;
    margin: 0 auto;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 4px;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: var(--bg-white);
    min-height: 60px;
    text-align: center;
    width: 100%;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.service-icon {
    font-size: 24px;
    color: var(--primary-color);
}

.service-text {
    font-size: 14px;
    line-height: 1.2;
    font-weight: bold;
}

/* Form Visibility Control */
.booking-form,
.account-section {
    display: none;
}

.booking-form.active-form,
.account-section.active-section {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Booking Form Styles */
.booking-form {
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    max-width: 800px;
    margin: 20px auto;
}

.booking-form h2 {
    color: var(--text-dark);
    margin-bottom: 20px;
    text-align: center;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-light);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* Button Styles */
.search-button,
.submit-button,
.account-button,
button[type="submit"] {
    width: 100%;
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 16px;
    /* margin-top: 20px; */
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
}

.search-button:hover,
.submit-button:hover,
.account-button:hover,
button[type="submit"]:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Trip Type Styles */
.trip-type {
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.trip-type label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.trip-type input[type="radio"] {
    margin: 0;
    accent-color: var(--primary-color);
}

/* Account Section Styles */
.account-section {
    background-color: var(--bg-white);
    padding: 20px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 30px auto;
    transition: all 0.3s ease;
    z-index: 100;
}

.account-container {
    max-width: 500px;
    margin: 0 auto;
}

.account-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.tab-button {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    color: var(--text-light);
    transition: all 0.3s ease;
    font-size: 16px;
    border-bottom: 3px solid transparent;
}

.tab-button.active {
    border-bottom: 3px solid var(--primary-color);
    color: var(--text-dark);
}

.tab-button:hover:not(.active) {
    color: var(--text-dark);
    border-bottom-color: var(--border-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active-tab {
    display: block;
}

/* Account Form Styles */
.account-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.account-form .form-group {
    margin-bottom: 15px;
}

.account-form .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 15px;
}

.account-form .form-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #f9f9f9;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.remember-me span {
    font-size: 15px;
    color: var(--text-light);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.account-button {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(242, 103, 34, 0.2);
}

/* Social Login Styles */
.social-login {
    margin-top: 25px;
    text-align: center;
}

.divider {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.divider::before,
.divider::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background-color: var(--border-color);
}

.divider p {
    margin: 0 15px;
    color: var(--text-light);
    font-size: 14px;
}

.social-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

.social-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background: var(--bg-white);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.social-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.social-button.google i {
    color: #4285f4;
    font-size: 18px;
}

.social-button.facebook i {
    color: #3b5998;
    font-size: 18px;
}

.social-button span {
    font-size: 15px;
    font-weight: 500;
}

.terms {
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
}

.terms a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.terms a:hover {
    text-decoration: underline;
}

/* Offers Section Styles */
.offers-section {
    padding: 0.5rem 0.3rem;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

.offers-section-title {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--text-dark);
}

.section-title {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--text-dark);
}

.offers-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.6rem;
    width: 97%;
    margin: 0 auto;
    padding: 0.5rem;
}

.offer-box {
    background-color: var(--bg-white);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Virtual scrolling support - make page wrapper invisible to flexbox */
.offer-page {
    display: contents;
}

.offer-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.offer-image {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.offer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.offer-tag {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #ff5722;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 0.7rem;
}

.offer-content {
    padding: 0.6rem;
}

.offer-content h3 {
    margin: 0 0 0.2rem;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.offer-content p {
    color: var(--text-light);
    margin-bottom: 0.6rem;
    font-size: 0.7rem;
    line-height: 1.2;
}

.offer-button {
    display: inline-block;
    background-color: #4285f4;
    color: white;
    padding: 4px 10px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.7rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.offer-button:hover {
    background-color: #3367d6;
    transform: translateY(-1px);
}

/* Filter Styles */
.filters-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
}

.offer-filters {
    display: flex;
    overflow-x: auto;
    padding: 0.5rem 1rem;
    margin: 0 auto 1rem;
    gap: 0.5rem;
    justify-content: center;
    white-space: nowrap;
    max-width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
}

.offer-filters::-webkit-scrollbar {
    display: none;
}

.offer-filter {
    padding: 6px 12px;
    border-radius: var(--border-radius-xl);
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
    color: var(--text-light);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.2px;
}

.offer-filter.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-color);
}

/* ============= Favorite Button Styles ============= */
.favorite-button {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    width: 32px;
    height: 32px;
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.favorite-button:hover {
    background: var(--bg-white);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.favorite-button.favorited,
.favorite-button.is-favorite {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.favorite-button.favorited:hover,
.favorite-button.is-favorite:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.favorite-button.loading {
    color: var(--primary-color);
    cursor: not-allowed;
}

/* ============= End Favorite Button Styles ============= */

/* ============= Offer Actions Container ============= */
.offer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.offer-price {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 22px;
    background-color: antiquewhite;
    padding: 2px;
    border-radius: 4px;
}

.original-price {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 12px;
}

/* ============= End Offer Actions Container ============= */

/* Media Queries */
/* Large screens (tablets, small desktops) */
@media (max-width: 992px) {
    .offers-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .offer-filters {
        justify-content: flex-start;
        padding: 0.5rem 0.5rem;
    }
}

/* Medium screens (tablets) */
@media (max-width: 767px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .form-row {
        flex-direction: column;
    }
      .bottom-nav .main-bottom-nav .bottom-nav-item span {
        font-size: 10px;
    }
    
    .bottom-nav .main-bottom-nav .bottom-nav-item i {
        font-size: 16px;
    }
    
    .offers-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .offer-filters {
        padding: 0.5rem 0.3rem;
        gap: 0.3rem;
        margin-bottom: 0.5rem;
    }
    
    .offer-filter {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    /* Improved scroll indicators */
    .filters-wrapper::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        width: 40px;
        height: 100%;
        background: linear-gradient(to left, var(--bg-light) 15%, rgba(248, 249, 250, 0));
        pointer-events: none;
        z-index: 2;
    }
    
    .filters-wrapper::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 40px;
        height: 100%;
        background: linear-gradient(to right, var(--bg-light) 15%, rgba(248, 249, 250, 0));
        pointer-events: none;
        z-index: 2;
    }
}

/* Small screens (mobile) */
@media (max-width: 600px) {
    .offers-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
        width: 98%;
        padding: 0.4rem 0.2rem;
    }
    
    .offer-box {
        margin-bottom: 10px;
    }
    
    .offer-image {
        height: 100px;
    }
    
    .offer-content {
        padding: 0.4rem;
    }
    
    .offer-content h3 {
        font-size: 0.8rem;
        margin-bottom: 0.1rem;
    }
    
    .offer-content p {
        font-size: 0.7rem;
        margin-bottom: 0.4rem;
        line-height: 1.2;
    }
    
    .offer-button {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .offer-tag {
        font-size: 0.65rem;
        padding: 2px 5px;
    }
    
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
    }
    
    .service-item {
        padding: 6px 2px;
        min-height: 55px;
    }
    
    .service-icon {
        font-size: 20px;
    }
    
    .service-text {
        font-size: 11px;
        line-height: 1.1;
    }
      .bottom-nav {
        padding: 8px 2px;
    }
    
    .main-bottom-nav .bottom-nav-item {
        padding: 4px 0;
        width: 20%;
        min-width: 0;
    }
    
    .offer-filters {
        padding: 0.4rem 0.3rem;
        gap: 0.4rem;
        animation: gentle-scroll 2.5s ease-in-out 0.8s 1 normal forwards;
    }
    
    .offer-filter {
        padding: 6px 12px;
        font-size: 0.75rem;
        min-width: 80px;
        text-align: center;
        background-color: var(--bg-white);
        border: 1px solid var(--border-color);
    }
}

/* Extra small screens */
@media (max-width: 320px) {    .bottom-nav {
        padding: 6px 1px;
    }
    
    .main-bottom-nav .bottom-nav-item {
        padding: 3px 0;
    }
    
    .main-bottom-nav .bottom-nav-item i {
        font-size: 14px;
    }
    
    .main-bottom-nav .bottom-nav-item span {
        font-size: 9px;
    }
}

/* For large screen */
@media (min-width: 768px) {
    .services-grid {
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}
}
