/* Gepsis Real Estate Sharing System - Custom Styles */

/* Color Variables */
:root {
    --primary-color: #004aad;
    --accent-color: #fe5757;
    --light-gray: #f8f9fa;
    --dark-gray: #6c757d;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--light-gray);
}

/* Header and Navigation */
.navbar {
    background-color: var(--primary-color) !important;
    box-shadow: var(--shadow);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--white) !important;
    padding: 0.5rem 0;
}

.navbar-brand img {
    transition: transform 0.3s ease;
    width: 60px !important;
    height: 40px !important;
    object-fit: cover;
    border-radius: 8px;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    color: var(--white) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #b3d9ff !important;
}

.navbar-toggler {
    border-color: var(--white);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #003d91;
    border-color: #003d91;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-accent {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--white);
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-accent:hover {
    background-color: #e54949;
    border-color: #e54949;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(0, 74, 173, 0.8), rgba(0, 86, 204, 0.8)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-logo {
    margin-bottom: 2rem;
}

.hero-logo-img {
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.hero-logo-img:hover {
    transform: scale(1.05);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    margin: 0.5rem;
    min-width: 200px;
    white-space: nowrap;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
        padding: 3rem 0;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
        margin: 0.5rem 0;
    }
    
    .hero-logo-img {
        width: 140px;
        height: 95px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* Cards */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-header {
    background-color: var(--primary-color);
    color: var(--white);
    border-bottom: none;
    padding: 1.5rem;
}

.card-body {
    padding: 2rem;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
}

.flash-message {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease;
}

.flash-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.flash-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #b8daff;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Features Section */
.features-section {
    padding: 5rem 0;
    background-color: var(--white);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--dark-gray);
    line-height: 1.8;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer h5 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer p, .footer li {
    color: #bdc3c7;
    margin-bottom: 0.5rem;
}

.footer a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 2rem;
    margin-top: 2rem;
    text-align: center;
}

/* Animation Classes */
.animate-ready {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar scroll effect */
.navbar.scrolled {
    background-color: rgba(0, 74, 173, 0.95) !important;
    backdrop-filter: blur(10px);
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.bounce-in {
    animation: bounceIn 0.6s ease forwards;
}

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* Hover effects */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Form enhancements */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 74, 173, 0.25);
}

.is-invalid {
    border-color: var(--accent-color) !important;
}

/* Checkbox validation styles */
.form-check-input.is-invalid {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(254, 87, 87, 0.25);
}

.form-check-input.is-invalid:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.form-check-input.is-invalid + .form-check-label {
    color: var(--accent-color);
}

/* Agreement section styling */
.form-check {
    padding-left: 1.5rem;
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.1em;
}

.form-check-label {
    font-size: 0.95rem;
    line-height: 1.4;
}

.form-check-label a {
    color: var(--primary-color);
    font-weight: 500;
}

.form-check-label a:hover {
    color: var(--accent-color);
    text-decoration: underline !important;
}

/* Lazy loading images */
.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

/* Enhanced dropdown */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow);
    border-radius: 0.5rem;
}

.dropdown-item {
    padding: 0.7rem 1.5rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

/* Toast enhancements */
.toast {
    border-radius: 0.5rem;
}

/* Custom toast background colors */
.bg-error {
    background-color: #dc3545 !important;
}

/* Progress indicators */
.progress-bar {
    background-color: var(--primary-color);
}

/* File upload styling */
.file-upload-area {
    border: 2px dashed var(--primary-color);
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    background-color: rgba(0, 74, 173, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    background-color: rgba(0, 74, 173, 0.1);
}

.file-upload-area.dragover {
    background-color: rgba(0, 74, 173, 0.15);
    border-color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .btn-primary, .btn-accent, .btn-outline-primary {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .flash-messages {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.text-accent {
    color: var(--accent-color) !important;
}

.bg-accent {
    background-color: var(--accent-color) !important;
}

.shadow-custom {
    box-shadow: var(--shadow) !important;
}

.shadow-hover:hover {
    box-shadow: var(--shadow-hover) !important;
}

/* Smooth Transitions */
* {
    transition: all 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #003d91;
}

/* Back to top button styling */
.btn-primary.position-fixed {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-primary.position-fixed:hover {
    background-color: #003d91 !important;
    border-color: #003d91 !important;
    transform: translateY(-2px);
}

.btn-primary.position-fixed i {
    font-size: 1.2rem;
    line-height: 1;
}

/* Listing Pages Styles */
.property-card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.property-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.property-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.detail-item i {
    width: 20px;
    font-size: 0.9rem;
}

.property-main-image {
    border-radius: 15px;
    max-height: 400px;
    object-fit: cover;
    width: 100%;
}

/* Carousel Indicators Style */
.carousel-indicators {
    margin-bottom: 1rem;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 4px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--primary-color);
    opacity: 0.7;
}

.carousel-indicators .active {
    background-color: var(--primary-color);
    opacity: 1;
}

.property-details-card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 2rem;
}

.property-details-card .card-header {
    background-color: var(--primary-color);
    border-bottom: none;
    border-radius: 15px 15px 0 0;
}

.property-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--white);
    margin-bottom: 0;
}

.property-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #28a745;
}

.property-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background-color: var(--light-gray);
    border-radius: 10px;
}

.info-item i {
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
}

.info-item div {
    display: flex;
    flex-direction: column;
}

.info-item strong {
    font-size: 0.85rem;
    color: var(--dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
}

.contact-section {
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.publisher-info {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    border-left: 4px solid var(--primary-color);
}

.contact-info a {
    text-decoration: none;
}

.property-description {
    line-height: 1.8;
    color: #555;
    white-space: pre-line;
}

.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    background-color: var(--light-gray);
    border-radius: 15px;
    color: var(--dark-gray);
}

.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--dark-gray);
}

/* Form Section Styles */
.form-card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.form-card .card-header {
    background-color: var(--primary-color);
    border-bottom: none;
    border-radius: 15px 15px 0 0;
    color: var(--white);
}

.form-title {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.section-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 74, 173, 0.25);
}

.invalid-feedback {
    display: block;
    font-size: 0.875rem;
    color: #dc3545;
    margin-top: 0.25rem;
}

.form-text {
    font-size: 0.875rem;
    color: var(--dark-gray);
    margin-top: 0.25rem;
}

/* Delete Warning Styles */
.delete-warning {
    padding: 2rem;
}

.delete-warning i {
    opacity: 0.7;
}

/* Empty State Styles */
.empty-state {
    padding: 3rem 1rem;
}

.empty-state i {
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Responsive adjustments for listings */
@media (max-width: 768px) {
    .property-card {
        margin-bottom: 1rem;
    }
    
    .property-main-image {
        max-height: 250px;
    }
    
    .property-details-card {
        position: static;
        margin-top: 2rem;
    }
    
    .property-title {
        font-size: 1.4rem;
    }
    
    .property-price {
        font-size: 1.2rem;
    }
    
    .info-item {
        padding: 0.5rem;
    }
    
    .info-item i {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
}

/* Search Filter Styles */
.search-filters {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.search-filters .card-header {
    background: linear-gradient(135deg, var(--primary-color), #0056d3);
    border-radius: 12px 12px 0 0;
    color: var(--white);
    border: none;
}

.search-filters .card-header h5 {
    margin: 0;
    font-weight: 600;
}

.search-filters .form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.search-filters .form-control,
.search-filters .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.search-filters .form-control:focus,
.search-filters .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 74, 173, 0.25);
}

.search-filters .btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.search-filters .btn-primary:hover {
    background: #003c8f;
    border-color: #003c8f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 74, 173, 0.3);
}

.search-filters .btn-outline-secondary {
    border: 2px solid var(--dark-gray);
    color: var(--dark-gray);
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.search-filters .btn-outline-secondary:hover {
    background: var(--dark-gray);
    border-color: var(--dark-gray);
    transform: translateY(-2px);
}

/* Property Card Enhanced Styles for Search Results */
.property-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow);
    border-radius: 12px;
    overflow: hidden;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.property-card .card-body {
    padding: 1.5rem;
}

.property-card .card-title {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.property-card .badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.property-details .detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    color: #666;
}

.property-details .detail-item i {
    width: 20px;
    color: var(--primary-color);
}

.property-details .fw-bold {
    color: var(--accent-color) !important;
    font-size: 1.1rem;
}

/* Empty State Enhanced */
.empty-state {
    padding: 3rem 2rem;
}

.empty-state i {
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #6c757d;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #6c757d;
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

/* Alert Styles for Search Results */
.alert-info {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: none;
    border-radius: 8px;
    color: var(--primary-color);
    font-weight: 600;
}

/* Responsive Enhancements for Search */
@media (max-width: 768px) {
    .search-filters .row > div {
        margin-bottom: 1rem;
    }
    
    .search-filters .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .property-card {
        margin-bottom: 1.5rem;
    }
}

/* Image Preview Cards for Primary Selection */
.image-preview-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.image-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.image-preview-card.border-primary {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.1rem rgba(0, 74, 173, 0.25);
}

.image-preview-card .card-img-top {
    transition: transform 0.3s ease;
}

.image-preview-card:hover .card-img-top {
    transform: scale(1.05);
}

.image-preview-card .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.image-preview-card .form-check-label {
    font-weight: 600;
    color: var(--primary-color);
}

.image-preview-card .form-check {
    margin: 0;
}

/* Primary Image Selection Section */
#primary-image-selection {
    background-color: var(--white);
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-top: 1rem;
}

#new-primary-image-selection {
    background-color: var(--white);
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-top: 1rem;
}

/* Image Modal Styles */
.clickable-image {
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.clickable-image:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

#imageModal .modal-content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#imageModal .modal-dialog {
    max-width: 95vw;
    max-height: 95vh;
    margin: 2.5vh auto;
}

#imageModal .modal-body {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    overflow: hidden;
}

.modal-image {
    max-height: 90vh;
    object-fit: contain;
    background: #000;
}

#imageModal .carousel-control-prev,
#imageModal .carousel-control-next {
    width: 8%;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

#imageModal .carousel-control-prev:hover,
#imageModal .carousel-control-next:hover {
    opacity: 1;
}

#imageModal .carousel-control-prev-icon,
#imageModal .carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-size: 100%;
}

.image-counter {
    font-size: 1rem;
    font-weight: 500;
}

#imageModal .btn-close {
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    opacity: 1 !important;
    transition: all 0.3s ease;
    border: 2px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
}

#imageModal .btn-close::before {
    content: '×';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: #000;
    line-height: 1;
}

#imageModal .btn-close:hover {
    background: rgba(255, 255, 255, 1) !important;
    opacity: 1 !important;
    transform: scale(1.1);
    border-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Mobile Responsive for Image Modal */
@media (max-width: 768px) {
    #imageModal .modal-dialog {
        max-width: 100vw;
        max-height: 100vh;
        margin: 0;
    }
    
    #imageModal .modal-body {
        border-radius: 0;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .modal-image {
        max-height: 100vh;
        width: 100%;
        height: auto;
    }
    
    #imageModal .carousel-control-prev,
    #imageModal .carousel-control-next {
        width: 15%;
    }
    
    #imageModal .carousel-control-prev-icon,
    #imageModal .carousel-control-next-icon {
        width: 2rem;
        height: 2rem;
    }
    
    #imageModal .btn-close {
        width: 2.5rem;
        height: 2.5rem;
        background: rgba(255, 255, 255, 0.9) !important;
        border: 2px solid rgba(0, 0, 0, 0.2);
    }
    
    #imageModal .btn-close::before {
        font-size: 1.2rem;
    }
    
    .image-counter {
        bottom: 10px !important;
        font-size: 0.9rem;
    }
}

/* Touch gestures for mobile */
@media (max-width: 768px) and (pointer: coarse) {
    #imageModal .carousel-inner {
        touch-action: pan-x;
    }
}
