/**
 * Tour Packages Display - Stylesheet
 * Version: 1.1.0
 * Matches Django app color scheme
 */

:root {
    --brand-blue: #004080;
    --brand-blue-dark: #003366;
    --text-primary: #1d3557;
    --text-secondary: #4a6075;
    --muted: #8d9bb0;
    --background: #f4f6fb;
    --card-shadow: rgba(12, 69, 119, 0.08);
    --button-shadow: rgba(0, 64, 128, 0.25);
    --divider: #e5e8ef;
}

.tour-packages-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 12px 28px;
    direction: rtl;
    font-family: 'Kalame', 'Tahoma', sans-serif;
    background: #fff;
}

.tour-packages-title {
    margin: 0;
    padding: 12px 16px;
    font-size: 20px;
    font-weight: 900;
    color: var(--text-primary);
    text-align: right;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 16px 16px 0 0;
}

.tour-packages-title::before {
    content: '';
    width: 7px;
    height: 22px;
    background: var(--brand-blue);
    border-radius: 4px;
    display: inline-block;
}

.tour-packages-loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.tour-packages-loading span {
    font-size: 16px;
    color: var(--text-secondary);
}

.tour-packages-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tour-packages-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 14px 34px var(--card-shadow);
    padding: 14px;
    border: 1px solid #eef1f6;
    border-top: 1px solid var(--divider);
    margin-top: 0;
}

.tour-package-card {
    display: grid;
    grid-template-columns: 280px 1fr 260px;
    align-items: stretch;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 16px var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #eef1f6;
    min-height: 200px;
    position: relative;
}

.tour-package-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(12, 127, 173, 0.15);
}

.tour-package-content {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.tour-package-col.price-col {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    border-left: 1px dashed var(--divider);
    background: linear-gradient(180deg, #f7f9fd 0%, #ffffff 100%);
}

.tour-package-col.info-col {
    border-left: 1px dashed var(--divider);
}

.tour-package-image-wrapper {
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    background: #f8fafc;
}

.tour-package-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 200px;
    max-height: 240px;
    aspect-ratio: 4 / 3;
}

.tour-package-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--brand-blue);
    color: white;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0, 64, 128, 0.2);
}


.tour-package-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.tour-package-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--brand-blue);
    margin-bottom: 6px;
}

.tour-package-price small {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.tour-package-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 6px;
}

.tour-package-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.tour-package-includes {
    font-size: 13px;
    color: var(--muted);
}

.tour-package-info-item i,
.tour-package-info-item svg {
    width: 20px;
    height: 20px;
    color: var(--brand-blue);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tour-package-button {
    background: var(--brand-blue);
    color: #fff !important;
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    width: fit-content;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.tour-package-button.secondary {
    background: #fff;
    color: var(--brand-blue) !important;
    border: 1px solid var(--brand-blue);
    box-shadow: none;
}

.tour-package-button.secondary:hover {
    background: var(--background);
    color: #fff;
    box-shadow: 0 10px 20px var(--button-shadow);
    transform: translateY(-1px);
}

.tour-button-row {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
}

.tour-package-button:hover {
    background: var(--brand-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px var(--button-shadow);
}

.tour-package-error {
    text-align: center;
    padding: 20px;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 20px 0;
}

/* Loading spinner */
.loading-spinner {
    border: 3px solid rgba(0, 64, 128, 0.1);
    border-top: 3px solid var(--brand-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 968px) {
    .tour-package-card {
        grid-template-columns: 1fr;
    }
    .tour-package-col.price-col,
    .tour-package-col.info-col {
        border-left: none;
        border-bottom: 1px dashed var(--divider);
        background: #fff;
    }
    .tour-package-image-wrapper {
        width: 100%;
        min-width: 100%;
        height: 220px;
    }
    .tour-package-image {
        min-height: 220px;
        max-height: 220px;
    }
    .tour-package-content {
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .tour-packages-container {
        padding: 15px;
    }
    
    .tour-package-content {
        padding: 20px;
    }
    
    .tour-package-title {
        font-size: 20px;
    }
    
    .tour-package-price {
        font-size: 18px;
    }
    
    .tour-package-info-item {
        font-size: 14px;
    }
    
    .tour-package-button {
        width: 100%;
        padding: 12px 24px;
    }
    
    .tour-package-badge {
        font-size: 12px;
        padding: 6px 12px;
        top: 10px;
        right: 10px;
    }
    
}

/* Extra small devices */
@media (max-width: 480px) {
    .tour-packages-container {
        padding: 10px;
    }
    
    .tour-package-content {
        padding: 15px;
    }
    
    .tour-package-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .tour-package-price {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .tour-package-info {
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .tour-package-info-item {
        font-size: 13px;
    }
    
    .tour-package-image-wrapper {
        height: 200px;
    }
    
    .tour-package-image {
        min-height: 200px;
    }
}

/* Print styles */
@media print {
    .tour-package-badge {
        display: none;
    }
    
    .tour-package-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

