/* General Layout & Flight Card */
body, .site-content {
    background-color: #f0f2f5;
}
.amadeus-results-wrapper {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 15px;
}
.results-title {
    text-align: center;
}
.flight-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.flight-item:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.flight-offer-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Infos sur la compagnie aériئة */
.airline-info {
    width: 15%;
    display: flex;
    justify-content: center;
}
.airline-logo {
    max-width: 80px;
    max-height: 40px;
    object-fit: contain;
}

/* Détails du vol - Section centrale */
.flight-details-middle {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 50%;
}
.departure-time-info, .arrival-time-info {
    text-align: center;
}
.flight-time {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}
.airport-code {
    font-size: 1em;
    color: #777;
    font-weight: bold;
}
.flight-date {
    font-size: 0.8em;
    color: #999;
}
.flight-duration-info {
    text-align: center;
    width: 150px;
}
.flight-duration, .flight-stops {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 5px;
}
.flight-line-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}
/* تصحيح مشكلة السهم المقطع */
.flight-line {
    border-top: 1px solid #999 !important;
    width: 50px;
    height: 0px !important;
    background: none !important;
}
.flight-arrow {
    font-size: 1.5em;
    color: #999;
    font-weight: bold;
    margin: 0 5px;
    line-height: 0;
}
.view-details-link {
    font-size: 0.8em;
    color: #007bff;
    text-decoration: none;
    margin-top: 5px;
    display: block;
}

/* Pricing & Button */
.flight-pricing {
    width: 25%;
    text-align: right;
}
.original-price-wrap {
    color: #999;
    font-size: 0.9em;
    text-decoration: line-through;
    text-align: right;
    margin-bottom: 0; /* تم تعديل هذه القيمة */
}
.sale-price-wrap {
    color: #007bff;
    font-size: 1.8em;
    font-weight: bold;
    margin: 0; /* تم تعديل هذه القيمة */
    text-align: right;
}
.currency-code {
    font-size: 0.7em;
    font-weight: normal;
}
.select-button {
    background-color: #ff6000 !important;
    color: #fff !important;
    border: none;
    padding: 10px 20px;
    border-radius: 50px !important;
    cursor: pointer;
    font-weight: bold !important;
    font-size: 1.1em !important;
    transition: background-color 0.2s ease;
    margin-top: 5px;
}
.select-button:hover {
    background-color: #e65600 !important;
}

/* تفاصيل "Sac" و "Classe" التي تظهر دائمًا */
.flight-meta-always-visible {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 0; /* تم تعديل هذه القيمة */
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #555;
    border-top: none; 
    border-bottom: none;
    padding-top: 0;
    padding-bottom: 0;
}
.flight-details-expanded {
    display: none;
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
    text-align: center;
}
.expanded-segments-wrapper {
    margin-top: 15px;
    line-height: 1.4;
}
.departure-label {
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.1em;
}
.expanded-segment-line {
    display: block;
    font-size: 0.85em;
    color: #555;
    margin-bottom: 5px;
    padding: 5px 0;
}
.expanded-segment-line span {
    margin-right: 5px;
}


/* Responsive Design for smaller screens */
@media (max-width: 768px) {
    /* Main Layout */
    .flight-offer-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    /* Airline Info */
    .airline-info {
        width: 100%;
        justify-content: center;
        margin-bottom: 15px;
    }
    
    /* Middle Section (تنسيق أفقي) */
    .flight-details-middle {
        width: 100%;
        flex-direction: row; 
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
        flex-wrap: wrap;
    }
    .flight-time {
        font-size: 1.2em;
    }
    .departure-time-info, .arrival-time-info {
        width: auto;
    }
    .flight-duration-info {
        width: auto;
        order: 1;
    }
    .departure-time-info {
        order: 0;
    }
    .arrival-time-info {
        order: 2;
    }
    .flight-line-wrapper {
        display: none;
    }
    
    /* Pricing & Button (تعديل ليظهر الزر بالأسفل) */
    .flight-pricing {
        width: 100%;
        display: flex;
        flex-direction: column; 
        align-items: center;
        margin-top: 0px;
        padding-top: 10px;
        border-top: 1px solid #eee;
    }
    .pricing-details {
        text-align: center;
        width: 100%;
    }
    .sale-price-wrap, .original-price-wrap {
        text-align: center;
        margin: 0; /* تم تعديل هذه القيمة */
    }
    .select-button {
        width: 90%;
        margin-top: 10px; 
    }
    
    /* Meta Details */
    .flight-meta-always-visible {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        text-align: center;
        margin-top: 0; /* تم تعديل هذه القيمة */
    }

    /* General Adjustments */
    .flight-item {
        padding: 15px;
    }
}