/**
 * MBM Kurye - Optimized Styles
 * This file combines and optimizes styles from multiple CSS files
 */

/* ===== RESPONSIVE FIXES ===== */
/* Fix for nested elements in services and regions pages */
.service-card,
.region-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.service-card:hover,
.region-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-content,
.region-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.service-actions,
.region-actions {
    margin-top: auto;
}

/* Fix for mobile slider issues */
@media (max-width: 767px) {
    .slick-slide {
        height: auto !important;
    }
    
    .slick-track {
        height: auto !important;
    }
    
    .slick-slide > div {
        display: block !important;
        height: auto !important;
    }
    
    /* Fix for nested content in sliders */
    .slick-slide .content-inner {
        position: relative !important;
        top: auto !important;
        transform: none !important;
    }
    
    /* Ensure proper spacing */
    .row {
        margin-left: -15px;
        margin-right: -15px;
    }
    
    .col-xs-12,
    .col-sm-6,
    .col-md-4,
    .col-lg-3 {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* ===== LAYOUT IMPROVEMENTS ===== */
/* Consistent spacing */
.section-full {
    padding: 80px 0 50px;
}

@media (max-width: 991px) {
    .section-full {
        padding: 60px 0 40px;
    }
}

@media (max-width: 767px) {
    .section-full {
        padding: 40px 0 30px;
    }
}

/* Improved grid layout */
.row {
    display: flex;
    flex-wrap: wrap;
}

.h-100 {
    height: 100%;
}

/* ===== HEADER & NAVIGATION ===== */
/* Consistent header across all pages */
.header-style-1 {
    position: relative;
    z-index: 999;
}

.is-fixed .header-style-1 {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Mobile menu improvements */
@media (max-width: 991px) {
    .mobile-nav {
        position: fixed;
        width: 280px;
        height: 100%;
        top: 0;
        left: -280px;
        background: #fff;
        overflow-y: auto;
        transition: all 0.3s ease;
        z-index: 9999;
    }
    
    .mobile-nav.show {
        left: 0;
    }
    
    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 999;
        display: none;
    }
    
    .mobile-nav-overlay.show {
        display: block;
    }
}

/* ===== CARDS & CONTENT BOXES ===== */
/* Service and region cards */
.service-image,
.region-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.service-image img,
.region-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-image img,
.region-card:hover .region-image img {
    transform: scale(1.05);
}

.service-title,
.region-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.service-excerpt,
.region-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ===== BUTTONS & INTERACTIVE ELEMENTS ===== */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: #ff5e14;
    border-color: #ff5e14;
}

.btn-primary:hover {
    background-color: #e54a0f;
    border-color: #e54a0f;
}

.btn-success {
    color: #fff;
    background-color: #25d366;
    border-color: #25d366;
}

.btn-success:hover {
    background-color: #128c7e;
    border-color: #128c7e;
}

.btn-outline-primary {
    color: #ff5e14;
    background-color: transparent;
    border-color: #ff5e14;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #ff5e14;
    border-color: #ff5e14;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.w-100 {
    width: 100%;
}

/* ===== UTILITY CLASSES ===== */
.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.g-2 {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
}

.g-2 > * {
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    margin-top: var(--bs-gutter-y);
}

.text-center {
    text-align: center;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

/* ===== RESPONSIVE MEDIA QUERIES ===== */
/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    .service-image,
    .region-image {
        height: 200px;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }
    
    .service-image,
    .region-image {
        height: 180px;
    }
    
    .service-title,
    .region-title {
        font-size: 16px;
    }
    
    .service-excerpt,
    .region-description {
        font-size: 13px;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        width: 100%;
        padding-right: 15px;
        padding-left: 15px;
        margin-right: auto;
        margin-left: auto;
    }
    
    .service-image,
    .region-image {
        height: 160px;
    }
}

/* ===== WHATSAPP WIDGET ===== */
.whatsapp-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.whatsapp-icon {
    width: 35px;
    height: 35px;
    fill: #fff;
}

/* ===== ADMIN PANEL IMPROVEMENTS ===== */
.img-card-content {
    position: relative;
}

.img-card-content .card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.img-card-content .card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.img-card-content .card-img-top {
    object-fit: cover;
}

.img-card-content .remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    background-color: rgba(255, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.img-card-content:hover .remove-file {
    opacity: 1;
}

.img-card-content .remove-icon {
    color: #fff;
    font-size: 14px;
}

.img-card-content .card-body {
    padding: 10px;
}

.img-card-content .card-title {
    font-size: 12px;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
