/* Page-specific styles for package-detail.html */

.detail-hero {
    /* Make the hero section use the hero media image as the section background.
       Keep a dark gradient overlay to keep content readable. */
    padding-top: 200px;
    /* leave space for fixed nav */
    padding-bottom: 4.5rem;
    color: var(--color-white);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* use CSS variable for the background so server-side/PHP can change it later
         --detail-hero-bg should be set to "url('path/to/image')" */
    background-image: linear-gradient(180deg, rgba(12, 26, 20, 0.45), rgba(12, 26, 20, 0.15)), var(--detail-hero-bg, url('../images/4.png'));
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
}

/* Background layer element (fallback and visual enhancement) */
.detail-hero .hero-bg-layer {
    position: absolute;
    inset: 0;
    background-image: var(--detail-hero-bg, url('../images/4.png'));
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    filter: brightness(0.6) saturate(1.02);
    z-index: 0;
}

/* Ensure the content box sits above the background */
.detail-hero .hero-grid,
.detail-hero .hero-content-right {
    z-index: 2;
    position: relative
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

.hero-media {
    /* keep the element for fallback but hide the inline image when using section background */
    display: none;
}

.badge-group {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    gap: 8px;
}

.badge {
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-white);
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.badge.gold {
    background: var(--color-gold);
    color: var(--color-emerald-dark);
    border: none;
}

.hero-content-right {
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 760px;
    color: var(--color-text);
    padding: 2.2rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 0.98));
    border-radius: 20px;
    box-shadow:
        0 30px 60px rgba(2, 18, 12, 0.28),
        /* deep shadow */
        0 10px 30px rgba(46, 139, 87, 0.06);
    /* greenish uplift */
    transform: translateY(-18px) rotateX(0.8deg);
    backface-visibility: hidden;
}

/* soft floating shadow under the box for 3D illusion */
.hero-content-right::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -28px;
    transform: translateX(-50%);
    width: 78%;
    height: 48px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0));
    filter: blur(12px);
    z-index: -1;
    border-radius: 50%;
}

.title {
    font-size: 1.9rem;
    margin-bottom: 0.5rem;
    color: var(--color-emerald-dark);
}

.meta {
    color: #444;
    margin-bottom: 1rem;
}

.hero-description {
    color: #555;
    margin-bottom: 1.5rem;
}

.price-row {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

/* When the price element is removed we center the actions and
   make the primary CTA more prominent. We apply the class
   `.no-price` from JS when a `.price` child is not present. */
.price-row.no-price {
    justify-content: center;
    gap: 1rem;
}

.price-row.no-price .actions {
    gap: 1rem;
    align-items: center;
}

.price-row.no-price .btn-primary {
    padding: 1rem 1.8rem;
    font-size: 1.06rem;
    box-shadow: 0 18px 44px rgba(46, 139, 87, 0.16);
    transform: translateY(0);
}

/* make the secondary action less visually heavy when price missing */
.price-row.no-price .btn-outline {
    opacity: 0.92;
    border-color: rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.9);
}

.price {
    background: linear-gradient(90deg, rgba(46, 139, 87, 0.06), rgba(255, 197, 79, 0.04));
    padding: 12px 18px;
    border-radius: 12px;
}

.price-label {
    font-size: 0.85rem;
    color: #666
}

.price-value {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--color-emerald-dark)
}

.actions {
    display: flex;
    gap: 0.75rem;
    align-items: center
}

.btn-primary.large {
    padding: 0.9rem 1.4rem;
    font-size: 1rem
}

.features {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    list-style: none;
    padding-left: 0
}

.features li {
    color: #555;
    display: flex;
    gap: 0.5rem;
    align-items: center
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.06);
    background: transparent;
    cursor: pointer;
    transition: all .22s ease
}

.btn-outline:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(2, 18, 12, 0.06);
    border-color: var(--color-emerald)
}

.btn-primary {
    background: var(--color-emerald);
    color: var(--color-white);
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(46, 139, 87, 0.18)
}

.btn-primary.large {
    padding: 0.95rem 1.6rem;
    font-size: 1.02rem
}

/* Modal form styles */
.modal .modal-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    text-align: right
}

.modal .modal-form label {
    font-size: 0.95rem;
    color: #333
}

.modal .modal-form input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    font-size: 0.95rem
}

.modal .modal-form .row,
.modal .modal-form .modal-actions {
    display: flex;
    gap: 0.6rem;
    width: 100%;
    align-items: stretch;
}

.modal .modal-form .modal-actions button {
    flex: 1;
    justify-content: center;
}

.modal .modal-form .modal-actions .btn-cancel {
    background: #ef4444;
    color: #fff;
}

.modal .modal-form .modal-actions .btn-cancel:hover {
    background: #dc2626;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.2);
}

.modal .modal-success {
    display: none;
    text-align: center;
    padding: 1rem
}

.modal[aria-hidden="false"] .modal-success.show {
    display: block
}

.modal[aria-hidden="false"] .modal-form.hide {
    display: none
}

.modal .modal-note {
    font-size: 0.95rem;
    color: #666;
    margin-top: 0.6rem
}

/* Ensure form fields and buttons use the site font (placeholders included) */
input,
textarea,
select,
button {
    font-family: var(--font-body, 'Vazirmatn'), sans-serif
}

input::placeholder,
textarea::placeholder {
    font-family: var(--font-body, 'Vazirmatn'), sans-serif;
    color: #999;
}

/* vendor prefixes for placeholders */
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    font-family: var(--font-body, 'Vazirmatn'), sans-serif
}

input::-moz-placeholder,
textarea::-moz-placeholder {
    font-family: var(--font-body, 'Vazirmatn'), sans-serif
}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
    font-family: var(--font-body, 'Vazirmatn'), sans-serif
}

input:-moz-placeholder,
textarea:-moz-placeholder {
    font-family: var(--font-body, 'Vazirmatn'), sans-serif
}

.small-links {
    margin-top: 1rem;
    display: flex;
    gap: 1rem
}

.small-links a {
    color: var(--color-emerald);
    text-decoration: none
}

.detail-main {
    padding: 3rem 0
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    justify-items: center
}

/* When a side panel exists we switch to two-column layout */
.detail-grid.has-side {
    grid-template-columns: 1fr 340px;
    align-items: start;
    justify-items: stretch
}

/* Main panel should be centered when there is no side panel */
.main-panel {
    width: 100%;
    max-width: 860px;
    margin: 0 auto
}

.detail-grid.has-side .main-panel {
    max-width: none;
    margin: 0
}

.panel {
    display: block
}

.main-panel .card {
    background: white;
    padding: 1.6rem;
    border-radius: 14px;
    margin-bottom: 1.2rem;
    box-shadow: var(--shadow-soft)
}

.itinerary-list {
    list-style: none;
    padding-left: 0
}

.itinerary-list li {
    padding: 1rem 0;
    border-bottom: 1px dashed #eee
}

.itinerary-list h4 {
    margin-bottom: 0.4rem
}

.included-list {
    list-style: disc;
    margin-right: 1.2rem
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px
}

.gallery-grid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer
}

.gallery-note {
    color: #666;
    margin-top: 0.5rem
}

.review {
    padding: 0.8rem 0
}

.quote {
    font-style: italic;
    color: #333
}

.review-meta {
    color: #777;
    margin-top: 0.5rem
}

.side-panel {
    position: relative
}

.sticky {
    position: sticky;
    top: 100px
}

.booking-card {
    background: linear-gradient(180deg, #fff, #fcfcfc);
    padding: 1.2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 12px
}

.price-compact {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.quick-form label {
    font-size: 0.85rem;
    color: #444;
    margin-top: 6px
}

.quick-form input,
.quick-form select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e6e6e6
}

.contact-small {
    font-size: 0.9rem;
    color: #666;
    margin-top: 8px
}

.trust {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--color-emerald-dark);
    font-weight: 700
}

.map-card img {
    width: 100%;
    border-radius: 10px
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999
}

.lightbox[aria-hidden="false"] {
    display: flex
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 6px
}

.close-lb {
    position: absolute;
    top: 18px;
    left: 18px;
    background: transparent;
    color: #fff;
    border: none;
    font-size: 1.2rem
}

.lightbox .nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 8px
}

.lightbox .prev {
    right: 90%;
}

.lightbox .next {
    left: 90%;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000
}

.modal[aria-hidden="false"] {
    display: flex
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 420px;
    text-align: center
}

.close-modal {
    position: absolute;
    top: 18px;
    left: 18px;
    background: transparent;
    border: none;
    font-size: 1.2rem
}

/* Responsive */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .hero-content-right {
        transform: none;
        margin-top: -40px
    }

    .hero-media {
        display: block
    }

    .hero-media img {
        height: 320px;
        display: block
    }

    .lightbox .prev,
    .lightbox .next {
        display: none
    }

    /* Mobile friendly actions when price is removed: stack and full-width CTAs */
    .price-row.no-price {
        flex-direction: column;
        gap: 0.8rem;
        align-items: stretch
    }

    .price-row.no-price .actions {
        flex-direction: column;
        width: 100%;
    }

    .price-row.no-price .actions .btn-primary,
    .price-row.no-price .actions .btn-outline {
        width: 100%;
        justify-content: center
    }
}