/* 
   Udawalawa Wild Eye Safari - Advanced Effects
   Focus: Inverted border-radius, Subgrids, Complex Masking
*/

/* --- Inverted Border Radius Utility --- */
/* This effect creates a concave corner appearance */

.inverted-radius-bottom {
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 30px 100%, 0 calc(100% - 30px));
}

/* --- Brush Stroke Effect --- */
.brush-bottom {
    position: relative;
    margin-bottom: 60px;
    /* Space for the brush stroke */
}

.brush-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 10;
    pointer-events: none;
}

.brush-divider svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Wavy Section Divider */
.wave-divider {
    position: relative;
    width: 100%;
    height: 60px;
    background: var(--bg-main);
}

.wave-divider::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23431F07' fill-opacity='1' d='M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,224C672,245,768,267,864,250.7C960,235,1056,181,1152,149.3C1248,117,1344,107,1392,101.3L1440,96L1440,0L1392,0C1344,0,1248,0,1152,0C1056,0,960,0,864,0C768,0,672,0,576,0C480,0,384,0,288,0C192,0,96,0,48,0L0,0Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    background-repeat: no-repeat;
    transform: rotate(180deg);
}

/* Card Inverted Corners */
.card-inverted {
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.card-inverted::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    background: transparent;
    border-top-left-radius: 20px;
    box-shadow: -10px -10px 0 0 var(--bg-main);
    /* Creates the inverted feel */
    z-index: 2;
}

/* --- Package Card Enhancements --- */
.package-card {
    transition: var(--transition-base);
    overflow: hidden;
    display: grid;
    /* Keep existing display properties */
    grid-template-rows: subgrid;
    grid-row: span 4;
    /* header, info, highlights, footer */
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.package-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-bold);
}

.package-card .img-container {
    height: 250px;
    overflow: hidden;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 90% 100%, 0 100%);
    /* Slight inverted variation */
}

.package-card:hover .img-container img {
    transform: scale(1.1);
}

.package-card .img-container img {
    transition: var(--transition-base);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Wildlife Interaction --- */
.wildlife-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 350px;
}

.wildlife-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-base);
}

.wildlife-overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, var(--primary-brown), transparent);
    color: var(--white);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: var(--transition-base);
}

.wildlife-card:hover .wildlife-overlay {
    bottom: 0;
}

.wildlife-card:hover img {
    transform: scale(1.15);
}

/* --- CSS Subgrid Pattern --- */
.package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* --- Scroll Reveal Animations --- */
.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Glassy / Glassmorphism Highlight for accents */
.glass-panel {
    background: rgba(255, 255, 240, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
}

/* --- Hero Carousel Controls --- */
.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent-yellow);
    margin: 0 8px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.carousel-item h1 {
    animation: fadeInUp 0.8s ease-out both;
}

.hero-slide-bg {
    filter: brightness(0.5);
    /* Always dark for maximum text contrast */
    transition: filter 0.6s ease;
}

.carousel-item p {
    animation: fadeInUp 1s ease-out both 0.2s;
}

.carousel-item .btn {
    animation: fadeInUp 1.2s ease-out both 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive Tweaks for Carousel */
@media (max-width: 768px) {

    .carousel-control-prev,
    .carousel-control-next {
        width: 10%;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 1.5rem;
        height: 1.5rem;
    }

    .display-3 {
        font-size: 2.2rem;
    }

    .lead.fs-4 {
        font-size: 1.1rem !important;
    }
}