/* ========================================
   Brand & Custom Properties
   ======================================== */
:root {
    --color-primary: #93774c;
    --color-primary-dark: #7a6340;
    --color-primary-light: #b89d6c;
    --color-text-light: #6b6b6b;
    --navbar-height: 76px;
}

body {
    scroll-behavior: smooth;
}

[id] {
    scroll-margin-top: var(--navbar-height);
}

/* Override Bootstrap primary color */
.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-outline-primary {
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-outline-primary:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.text-primary-custom {
    color: var(--color-primary-light) !important;
}

/* Focus ring color */
.form-control:focus,
.form-check-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(147, 119, 76, 0.25);
}
.form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ========================================
   Navbar Scroll Effect
   ======================================== */
.navbar--scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
/* backdrop-filter creates new containing block, breaking offcanvas position:fixed */
.navbar:has(.offcanvas.show, .offcanvas.showing) {
    backdrop-filter: none !important;
}
.navbar--scrolled .navbar-brand,
.navbar--scrolled .nav-link {
    color: #2c2c2c !important;
}
.navbar--scrolled .nav-link.active {
    color: var(--color-primary) !important;
}
.navbar--scrolled .navbar-toggler-icon {
    filter: invert(1);
}

/* Active link underline on desktop */
@media (min-width: 992px) {
    .nav-link {
        position: relative;
    }
    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: var(--color-primary-light);
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }
    .nav-link:hover::after,
    .nav-link.active::after {
        width: 70%;
    }
}

/* ========================================
   Hero
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(30, 30, 30, 0.7), rgba(44, 44, 44, 0.5)),
        linear-gradient(to bottom right, #4a3728, #6b5240, #93774c, #3d6b4f, #2d5a3d);
    z-index: 0;
}

.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 600'%3E%3Cpath d='M0,600 L200,250 L350,400 L500,180 L650,350 L800,120 L950,300 L1100,150 L1200,280 L1200,600 Z' fill='rgba(255,255,255,0.03)'/%3E%3Cpath d='M0,600 L150,350 L300,450 L450,280 L600,420 L750,200 L900,380 L1050,250 L1200,350 L1200,600 Z' fill='rgba(255,255,255,0.02)'/%3E%3C/svg%3E") center bottom / cover no-repeat;
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 1.5rem;
}

.hero__subtitle {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-primary-light);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero__title {
    font-size: 3.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero__description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero--mini {
    min-height: 320px;
    padding-top: var(--navbar-height);
}

.hero__mountains {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    z-index: 1;
    pointer-events: none;
}

.hero--mini .hero__title {
    font-size: 2.5rem;
}

/* ========================================
   Section Title
   ======================================== */
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-primary);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

/* ========================================
   Tour Card Custom
   ======================================== */
.tour-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tour-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12) !important;
    color: inherit;
}

.tour-card__image {
    aspect-ratio: 8 / 5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.tour-card__badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-primary);
    color: #fff;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}
.tour-card__price {
    font-weight: 700;
    color: var(--color-primary);
}
.tour-card__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tour-card__placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #7ecb7e, #5fa85f, #3d8b5e, #2d6b4a);
}

/* ========================================
   Tour Detail Hero
   ======================================== */
.tour-hero {
    height: 400px;
    padding-top: var(--navbar-height);
    position: relative;
    display: flex;
    align-items: flex-end;
}
.tour-hero__bg {
    position: absolute;
    inset: 0;
}
.tour-hero__bg:not(.tour-hero__bg--photo) {
    background: linear-gradient(135deg, #7ecb7e, #5fa85f, #3d8b5e, #2d6b4a);
}
.tour-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
}
.tour-hero__content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}
.tour-hero__title {
    font-size: 2.5rem;
    color: #fff;
    font-weight: 700;
}
.tour-hero__breadcrumb {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}
.tour-hero__breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}
.tour-hero__breadcrumb a:hover {
    color: var(--color-primary-light);
}
.tour-hero__bg--photo {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ========================================
   Timeline
   ======================================== */
.timeline__list {
    position: relative;
    padding-left: 3rem;
}
.timeline__list::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #e8e5e0;
}
.timeline__item {
    position: relative;
    padding-bottom: 1.5rem;
}
.timeline__item:last-child {
    padding-bottom: 0;
}
.timeline__item::before {
    content: '';
    position: absolute;
    left: calc(-3rem + 6px);
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--color-primary);
    z-index: 1;
}
.timeline__time {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 2px;
}
.timeline__item-title {
    font-weight: 600;
    margin-bottom: 2px;
}
.timeline__item-description {
    color: var(--color-text-light);
    font-size: 0.875rem;
}

/* ========================================
   Tour Sidebar
   ======================================== */
.tour-sidebar__price-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
}
.tour-sidebar__price-currency {
    font-size: 1.5rem;
    color: var(--color-primary);
}
.tour-sidebar__detail-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--color-primary);
}
.tour-sidebar__list-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}
.tour-sidebar__list-item--included svg {
    color: #3a8f40;
}
.tour-sidebar__list-item--excluded svg {
    color: #c0392b;
}

/* ========================================
   About Section
   ======================================== */
.about__image {
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
}
.about__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}
.about__stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* ========================================
   Contact Links
   ======================================== */
.contact__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    background: #f9f8f6;
    color: #2c2c2c;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}
.contact__link:hover {
    background: rgba(147, 119, 76, 0.08);
    color: var(--color-primary);
}

/* ========================================
   Footer Social
   ======================================== */
.footer-social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    transition: all 0.3s ease;
}
.footer-social-link:hover {
    background: var(--color-primary);
    color: #fff;
}
.footer-link:hover {
    color: var(--color-primary-light) !important;
}

/* ========================================
   Offcanvas nav links (white text fix)
   ======================================== */
@media (max-width: 991.98px) {
    .offcanvas .nav-link {
        color: #2c2c2c !important;
        padding: 0.75rem 0;
        font-size: 1.1rem;
    }
    .offcanvas .nav-link.active {
        color: var(--color-primary) !important;
    }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .hero__title {
        font-size: 2.25rem;
    }
    .hero--mini {
        min-height: 240px;
    }
    .hero--mini .hero__title {
        font-size: 2rem;
    }
    .tour-hero {
        height: 300px;
    }
    .tour-hero__title {
        font-size: 2rem;
    }
    .about__image {
        height: 250px;
    }
}

/* ========================================
   Gallery mosaic
   ======================================== */
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 180px;
    gap: 6px;
}
.gallery__item {
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}
.gallery__item--featured {
    grid-column: span 2;
    grid-row: span 2;
}
.gallery__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.gallery__item:hover .gallery__photo {
    transform: scale(1.04);
}

@media (max-width: 768px) {
    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 140px;
    }
    .gallery__item--featured {
        grid-column: span 2;
        grid-row: span 1;
    }
}

/* ========================================
   Gallery Lightbox
   ======================================== */
.lightbox {
    background: rgba(0, 0, 0, 0.93);
    border: none;
    border-radius: 0;
    position: relative;
    width: 100vw;
    height: 100vh;
}

.lightbox__stage {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 5rem;
}

.lightbox__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
}

.lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 0;
    transition: color 0.2s;
}
.lightbox__close:hover {
    color: #fff;
}

.lightbox__counter {
    position: absolute;
    top: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    z-index: 10;
    pointer-events: none;
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.07);
    border: none;
    color: rgba(255, 255, 255, 0.75);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    line-height: 0;
}
.lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.lightbox__nav--prev { left: 1.25rem; }
.lightbox__nav--next { right: 1.25rem; }

@media (max-width: 768px) {
    .lightbox__stage {
        padding: 3rem 3.5rem;
    }
    .lightbox__nav {
        width: 2.25rem;
        height: 2.25rem;
    }
    .lightbox__nav--prev { left: 0.5rem; }
    .lightbox__nav--next { right: 0.5rem; }
}
