/* Your existing styles remain the same */
.hero-carousel {
    position: relative;
    height: 85dvh;
    width: 100%;
    overflow: hidden;
}

.carousel-slides {
    position: relative;
    height: 100%;
    width: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.slide-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    box-sizing: border-box;
}

.text-content {
    margin-top: 5%;
    text-align: center;
}

.cta-content {
    margin-bottom: 5%;
    text-align: center;
}

.text-content h1 {
    font-size: 2.4rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 1.2rem;
    text-shadow: 4px 3px 30px rgba(0, 0, 0, 0.37);
}

.text-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #173047;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .text-content h1 {
        font-size: 4.5rem;
    }

    .text-content h2 {
        font-size: 3.5rem;
    }
}

.text-content p {
    font-size: 1.3rem;
    font-weight: 500;
    color: #000000;
    text-shadow: 2px 1px 1px rgba(255, 255, 255, 0.74);
}

.cta-content p {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #7f1146;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.carousel-controls {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-dot.active {
    background: white;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.4);
}

.carousel-arrow.prev {
    left: 20px;
}

.carousel-arrow.next {
    right: 20px;
}

.slide-in-top {
    animation: slideInTop 1s ease-out;
}

.slide-in-bottom {
    animation: slideInBottom 1s ease-out;
}

@keyframes slideInTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Foot Icon Styles */
.foot-icon {
    position: fixed;
    z-index: 1000;
    transition: all 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    pointer-events: none;
    opacity: 0;
    /* Start hidden by default */
}

.foot-icon.initial-state {
    top: 50%;
    left: 65%;
    transform: translate(-50%, -50%);
    height: 550px;
    /* Removed opacity: 0.8; - will be controlled by JavaScript */
}

.foot-icon.scrolled-state {
    top: 73%;
    right: 30px;
    transform: translateY(-50%);
    height: 200px;
    opacity: 0.7;
    /* Show when scrolled */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .foot-icon.initial-state {
        height: 200px;
    }

    .foot-icon.scrolled-state {
        height: 180px;
        right: 15px;
    }
}


/* gallery */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 50px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 450px;
    cursor: pointer;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.08);
}

.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.94), transparent);
    color: white;
    padding: 20px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

/* Auto-animation state */
.gallery-item.auto-animate {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
}

.gallery-item.auto-animate .gallery-img {
    transform: scale(1.08);
}

.gallery-item.auto-animate .caption {
    opacity: 1;
    transform: translateY(0);
}

/* Hover state - overrides auto-animate */
.gallery-item:hover .caption {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        height: 350px !important;
    }
}

.gallery-title {
    color: white;
}

/* pattern gallery wrapper */
.gallery.pattern-grid {
    display: block !important;
    gap: 25px;
    padding: 10px;
    text-align: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* new row class to avoid Bootstrap conflict */
.gallery.pattern-grid .g-row {
    display: grid !important;
    gap: 30px;
    margin-bottom: 45px;
    justify-items: stretch; /* columns ko fully fill kare */
}

/* Items occupy full column width */
.gallery.pattern-grid .g-row .gallery-item {
    width: 100%;
}

/* row titles */
.gallery.pattern-grid .row-title {
    font-size: 2rem;
    font-weight: 700;
    color: #7f1146;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    grid-column: 1 / -1;
    order: -1;
    width: 100%;
}

/* Dynamic column classes - UPDATED */
.gallery.pattern-grid .g-row.cols-1 {
    grid-template-columns: minmax(280px, 1fr);
    justify-items: center;
}

.gallery.pattern-grid .g-row.cols-2 {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    justify-items: center;
}

.gallery.pattern-grid .g-row.cols-3 {
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    justify-items: center;
}

.gallery.pattern-grid .g-row.cols-4 {
    grid-template-columns: repeat(4, minmax(200px, 1fr));
    justify-items: center;
}

.gallery.pattern-grid .g-row.cols-5 {
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    justify-items: center;
}

/* Ensure gallery items take full width of their grid cell */
.gallery.pattern-grid .gallery-item {
    width: 100%;
    max-width: 100%;
}

/* Dynamic heights */
.gallery.pattern-grid .g-row.cols-1 .gallery-item {
    height: 700px;
    max-width: 800px; /* Limit width for single column */
}

.gallery.pattern-grid .g-row.cols-2 .gallery-item {
    height: 650px;
}

.gallery.pattern-grid .g-row.cols-3 .gallery-item {
    height: 550px;
}

.gallery.pattern-grid .g-row.cols-4 .gallery-item {
    height: 450px;
}

.gallery.pattern-grid .g-row.cols-5 .gallery-item {
    height: 400px;
}

/* Responsive adjustments for dynamic columns */
@media (max-width: 1200px) {
    .gallery.pattern-grid .g-row.cols-5 {
        grid-template-columns: repeat(4, minmax(200px, 1fr));
    }
    
    .gallery.pattern-grid .g-row.cols-5 .gallery-item {
        height: 350px;
    }
}

@media (max-width: 992px) {
    .gallery.pattern-grid .g-row.cols-4,
    .gallery.pattern-grid .g-row.cols-5 {
        grid-template-columns: repeat(3, minmax(200px, 1fr));
    }

    .gallery.pattern-grid .g-row.cols-4 .gallery-item,
    .gallery.pattern-grid .g-row.cols-5 .gallery-item {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .gallery.pattern-grid .g-row[class*="cols-"] {
        grid-template-columns: repeat(2, minmax(200px, 1fr));
    }

    .gallery.pattern-grid .g-row .gallery-item {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .gallery.pattern-grid .g-row[class*="cols-"] {
        grid-template-columns: minmax(280px, 1fr);
        justify-items: center;
    }

    .gallery.pattern-grid .g-row .gallery-item {
        height: 350px;
        max-width: 400px;
    }
}


/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .lightbox-close {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .lightbox-caption {
        bottom: -50px;
        font-size: 14px;
    }
}
