/*============================================================================================*/
/* Your custom styles below */
/*============================================================================================*/

/* Form Validation Styles */


.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.alert {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.popup-overlay.show {
    display: flex;
}

.popup-box {
    background: white;
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
    animation: slideUp 0.3s ease;
}

.popup-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.popup-icon.success {
    color: #28a745;
}

.popup-icon.error {
    color: #dc3545;
}

.popup-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.popup-message {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.popup-button {
    background-color: #8ac757;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.popup-button:hover {
    background-color: #7ab647;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*============================================================================================*/
/* Gallery Carousel Fixes - Responsiveness & Performance */
/*============================================================================================*/

/* Fix Image Aspect Ratio Consistency */
.carousel_item_centered .item {
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
}

/* Blurred background effect */
.carousel_item_centered .item::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: inherit;
    filter: blur(20px);
    transform: scale(1.1);
    z-index: 0;
}

.carousel_item_centered .item img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    z-index: 1;
}

/* Performance Optimizations */
.carousel_item_centered .owl-item {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    will-change: transform, opacity;
}

/* Only apply kenburns animation to center/active item */
.carousel_item_centered .owl-item .item img {
    animation: none;
}

.carousel_item_centered .owl-item.active.center .item img {
    animation: kenburns 15s linear 0s infinite;
}

/* Responsive Gallery Heights */
@media (max-width: 767px) {
    .carousel_item_centered .item {
        aspect-ratio: 16/9;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .carousel_item_centered .item {
        aspect-ratio: 4/3;
    }
}

@media (min-width: 1200px) {
    .carousel_item_centered .item {
        aspect-ratio: 3/2;
    }
}