﻿.carousel-wrapper {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    background-color: midnightblue;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease;
    gap: 15px;
}

.carousel-slide {
    flex: 0 0 auto;
    min-width: 200px;
}

.image-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

    .image-card:hover {
        transform: translateY(-5px);
    }

    .image-card img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        display: block;
    }

.image-info {
    padding: 15px;
}

    .image-info h6 {
        margin: 0 0 5px 0;
        font-weight: 600;
        color: #333;
    }

    .image-info small {
        color: #666;
    }

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

    .nav-btn:hover {
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    }

.nav-prev {
    left: 10px;
}

.nav-next {
    right: 10px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .dot.active {
        background: #007bff;
        transform: scale(1.2);
    }

.carousel-info {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
}

.banner-image {
    width: 100%;
    max-width: 1200px;
    height: auto;
    margin: 0 auto 30px auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.banner-container {
    margin-bottom: 30px;
}

@media (max-width: 767.98px) {
    .banner-container {
        display: none;
    }
}

.mobile-underlay {
    display: none;
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: block;
}

.mobile-underlay-container {
    display: none;
    text-align: center;
    margin: 30px 0;
    z-index: 1;
    position: relative;
    width: 100%;
}

@media (max-width: 767.98px) {
    .mobile-underlay {
        display: block !important;
    }

    .mobile-underlay-container {
        display: block !important;
    }
}

.submit-info {
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

    .submit-info h4 {
        margin-bottom: 15px;
        font-weight: 600;
        color: white;
    }

    .submit-info p {
        margin-bottom: 20px;
        font-size: 16px;
        line-height: 1.5;
    }

.submit-methods {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 1px;
}

.submit-method {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    min-width: 160px;
}

    .submit-method:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: translateY(-2px);
    }

    .submit-method i {
        font-size: 24px;
        margin-bottom: 8px;
        display: inline-block;
    }

    .submit-method .method-title {
        font-weight: 600;
        font-size: 14px;
        margin-bottom: 4px;
        display: inline-block;
    }

    .submit-method .method-handle {
        font-size: 13px;
        opacity: 0.9;
        display: inline-block;
    }

@media (max-width: 768px) {
    .submit-methods {
        flex-direction: column;
        align-items: center;
    }

    .submit-method {
        width: 100%;
        max-width: 90%;
    }

    .submit-info {
        padding: 20px 15px;
    }
}

/* Responsive slides visible */
@media (max-width: 576px) {
    .carousel-slide {
        min-width: calc(100% - 30px);
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .carousel-slide {
        min-width: calc(50% - 20px);
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .carousel-slide {
        min-width: calc(33.333% - 15px);
    }
}

@media (min-width: 993px) and (max-width: 1200px) {
    .carousel-slide {
        min-width: calc(25% - 12px);
    }
}

@media (min-width: 1201px) {
    .carousel-slide {
        min-width: calc(25% - 10px);
    }
}

.search-container-fg {
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
}

.search-input {
    border-radius: 25px;
    border: 2px solid #e9ecef;
    padding: 12px 20px 12px 45px;
    font-size: 16px;
    width: 100%;
    transition: all 0.3s ease;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 20px;
}

    .search-input:focus {
        border-color: #007bff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
        outline: none;
    }

.search-results {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    text-align: center;
}

.carousel-wrapper {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    background-color: midnightblue;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease;
    gap: 15px;
}

.carousel-slide {
    flex: 0 0 auto;
    min-width: 200px;
}

.image-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

    .image-card:hover {
        transform: translateY(-5px);
    }

    .image-card img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        display: block;
    }

.image-info {
    padding: 15px;
}

    .image-info h6 {
        margin: 0 0 5px 0;
        font-weight: 600;
        color: #333;
    }

    .image-info small {
        color: #666;
    }

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

    .nav-btn:hover {
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    }

.nav-prev {
    left: 10px;
}

.nav-next {
    right: 10px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .dot.active {
        background: #007bff;
        transform: scale(1.2);
    }

.carousel-info {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
}

.banner-image {
    width: 100%;
    max-width: 1200px;
    height: auto;
    margin: 0 auto 30px auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.banner-container {
    margin-bottom: 30px;
}

@media (max-width: 767.98px) {
    .banner-container {
        display: none;
    }
}

.mobile-underlay {
    display: none;
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: block;
}

.mobile-underlay-container {
    display: none;
    text-align: center;
    margin: 30px 0;
    z-index: 1;
    position: relative;
    width: 100%;
}

@media (max-width: 767.98px) {
    .mobile-underlay {
        display: block !important;
    }

    .mobile-underlay-container {
        display: block !important;
    }
}

.submit-info {
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

    .submit-info h4 {
        margin-bottom: 15px;
        font-weight: 600;
        color: white;
    }

    .submit-info p {
        margin-bottom: 20px;
        font-size: 16px;
        line-height: 1.5;
    }

.submit-methods {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 1px;
}

.submit-method {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    min-width: 160px;
}

    .submit-method:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: translateY(-2px);
    }

    .submit-method i {
        font-size: 24px;
        margin-bottom: 8px;
        display: inline-block;
    }

    .submit-method .method-title {
        font-weight: 600;
        font-size: 14px;
        margin-bottom: 4px;
        display: inline-block;
    }

    .submit-method .method-handle {
        font-size: 13px;
        opacity: 0.9;
        display: inline-block;
    }

@media (max-width: 768px) {
    .submit-methods {
        flex-direction: column;
        align-items: center;
    }

    .submit-method {
        width: 100%;
        max-width: 90%;
    }

    .submit-info {
        padding: 20px 15px;
    }
}

/* Responsive slides visible */
@media (max-width: 576px) {
    .carousel-slide {
        min-width: calc(100% - 30px);
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .carousel-slide {
        min-width: calc(50% - 20px);
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .carousel-slide {
        min-width: calc(33.333% - 15px);
    }
}

@media (min-width: 993px) and (max-width: 1200px) {
    .carousel-slide {
        min-width: calc(25% - 12px);
    }
}

@media (min-width: 1201px) {
    .carousel-slide {
        min-width: calc(25% - 10px);
    }
}

.search-container-fg {
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
}

.search-input {
    border-radius: 25px;
    border: 2px solid #e9ecef;
    padding: 12px 20px 12px 45px;
    font-size: 16px;
    width: 100%;
    transition: all 0.3s ease;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 20px;
}

    .search-input:focus {
        border-color: #007bff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
        outline: none;
    }

.search-results {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    text-align: center;
}

/* ============================================ */
/* CRITICAL FIXES FOR PORTRAIT IMAGE DISPLAY */
/* ============================================ */

/* Force full width and proper grid layout */
FoalDisplay {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    align-items: start !important;
    padding: 20px !important;
    width: 100% !important;
}

/* Override any nested containers */
#FoalDisplay .row,
#FoalDisplay .container,
#FoalDisplay > div {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    align-items: start !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

/* Override Bootstrap columns */
#FoalDisplay [class*="col-"] {
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

    /* Override Bootstrap column classes */
    #FoalDisplay .col-lg-4,
    #FoalDisplay .col-md-6,
    #FoalDisplay .col-sm-12,
    #FoalDisplay [class*="col-"] {
        width: auto !important;
        flex: none !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

/* Gallery item styling */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    margin-bottom: 0 !important;
    background: white;
    display: flex;
    flex-direction: column;
    height: auto;
}

    .gallery-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

    /* MAIN FIX: Flexible image sizing for portraits */
    .gallery-item img {
        width: 100%;
        height: 200px; /* Keep your existing height */
        object-fit: cover;
        display: block;
    }
    /* Reduced hover scale to prevent overflow */
    .gallery-item:hover img {
        transform: scale(1.02);
    }

    /* Orientation-specific handling */
    .gallery-item.portrait img {
        max-height: 450px !important;
        object-fit: contain !important;
    }

    .gallery-item.landscape img {
        max-height: 350px !important;
        object-fit: cover !important;
    }

    .gallery-item.portrait-tall img {
        max-height: 380px !important;
        object-fit: contain !important;
        object-position: top;
    }

    .gallery-item.square img {
        max-height: 400px !important;
        object-fit: contain !important;
    }

/* Overlay styling */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 2rem;
}

/* Title overlay */
.gallery-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px 15px 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-title {
    transform: translateY(0);
}

/* Caption styling */
.gallery-caption {
    background: white;
    padding: 15px;
    border-radius: 0 0 8px 8px;
    margin-top: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
}

    .gallery-caption h6 {
        margin: 0 0 8px 0;
        font-weight: 600;
        color: #333;
        font-size: 16px;
        line-height: 1.3;
    }

    .gallery-caption p {
        margin: 0 0 8px 0;
        color: #666;
        font-size: 0.9rem;
        line-height: 1.4;
    }

/* Enhanced modal for portraits */
.modal {
    z-index:1000000000;
}
.modal-img {
    max-width: 90vw !important;
    max-height: 85vh !important;
    object-fit: contain !important;
    width: auto !important;
    height: auto !important;
}

.modal-dialog.modal-portrait {
    max-width: 600px !important;
}

.modal-body {
    padding: 10px;
    background-color: #0b0461;
}

.image-info-modal {
    background-color: #fff;
}
/* Filter buttons */
.filter-buttons {
    margin-bottom: 30px;
}

.filter-btn {
    margin: 0 5px 10px 0;
    border-radius: 25px;
    padding: 8px 20px;
    border: 2px solid #007bff;
    background: transparent;
    color: #007bff;
    transition: all 0.3s ease;
}

    .filter-btn:hover,
    .filter-btn.active {
        background: #007bff;
        color: white;
    }

.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
}

/* Animation classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }

/* Loading animation */
.gallery-item.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    min-height: 200px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Responsive grid breakpoints */
@media (max-width: 1200px) {
    #FoalDisplay,
    #FoalDisplay .row,
    #FoalDisplay > div {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
        gap: 18px !important;
    }
}

@media (max-width: 768px) {
    #FoalDisplay,
    #FoalDisplay .row,
    #FoalDisplay > div {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
        gap: 15px !important;
    }

    .gallery-item img {
        max-height: 320px !important;
    }

    .gallery-item.portrait img {
        object-position: center 15% !important; /* Show more of the foal's body */
    }

    .gallery-item.portrait-tall img {
        object-position: center 25% !important; /* Focus on upper portion */
    }
}

@media (max-width: 576px) {
    #FoalDisplay,
    #FoalDisplay .row,
    #FoalDisplay > div {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .gallery-item img {
        max-height: 300px !important;
    }

    .gallery-item.portrait img {
        max-height: 360px !important;
    }
}

/* Add to end of your CSS file for equal heights */
#FoalDisplay {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

.gallery-item {
    flex: 1 1 calc(33.333% - 15px) !important;
    display: flex !important;
    flex-direction: column !important;
/*    min-height: 400px !important;
*/}

.gallery-caption {
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
}

@media (max-width: 768px) {
    .gallery-item {
        flex: 1 1 calc(50% - 10px) !important;
    }
}

@media (max-width: 576px) {
    .gallery-item {
        flex: 1 1 100% !important;
    }
}

#FoalDisplay .gallery-item[style*="display: none"] {
    display: none !important;
}