.medical-items-section .container-fluid {
    max-width: 1320px; /* Matches compact form width */
}

.medical-items-section .section-header {
    text-align: center;
    margin-bottom: 30px;
}

.medical-items-section .section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #212529;
    position: relative;
    padding-bottom: 10px;
}

/* Medical item card */
.medical-item-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 15px;
    margin-bottom: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid transparent;
}

.medical-item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: #007bff; /* Accent color on hover */
}

.medical-item-card p {
    font-size: 14px;
    color: #737d8b; /* Matches site text color */
    margin: 0;
    line-height: 1.5;
    overflow-wrap: break-word; /* Prevent text overflow */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .medical-items-section {
        padding: 30px 0;
    }

    .medical-items-section .section-header h2 {
        font-size: 1.8rem;
    }

    .medical-item-card {
        padding: 12px;
        margin-bottom: 12px;
    }

    .medical-item-card p {
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .medical-items-section {
        padding: 20px 0;
    }

    .medical-items-section .section-header h2 {
        font-size: 1.6rem;
    }

    .medical-item-card {
        padding: 10px;
        margin-bottom: 10px;
    }

    .medical-item-card p {
        font-size: 12px;
    }
}

.slider-button {
    margin-top:30px;
    z-index: 3;
    padding: 12px 30px;
    background-color: #007bff;
    color: #fff;
    border: none;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 25px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.slider-button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.slider-button:focus {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* Required asterisk */
.required-asterisk {
    color: #dc3545; /* Red for required fields */
    font-weight: bold;
}

/* Form styles */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.contact-form-app .form-control {
    height: 50px;
    border: 1px solid #f0f0f0;
    border-radius: 0;
    box-shadow: none;
    padding-left: 25px;
    margin-bottom: 0;
    font-size: 14px;
    color: #737d8b;
}

.contact-form-app .form-group {
    margin-bottom:20px;
}

.contact-form-app .form-text {
    margin-bottom: 0px;
}

.form-text {
    margin-bottom: 30px;
}

.contact-form-app .form-control:focus {
    border-color: #007bff;
    outline: none;
}

/* Style select */
.contact-form-app select.form-control {
    height: 50px;
    padding: 0 25px;
    font-size: 14px;
    color: #737d8b;
    border: 1px solid #f0f0f0;
    border-radius: 0;
    background-color: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="#737d8b" d="M1.5 3.5l4.5 5 4.5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

/* Custom file input */
.custom-file-upload {
    position: relative;
    height: 50px;
    border: 1px solid #f0f0f0;
    background-color: #fff;
    border-radius: 0;

    display: flex;
    align-items: center;
    padding-left: 25px;
    font-size: 14px;
    color: #737d8b;
}

.custom-file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.custom-file-upload .file-upload-text {
    font-size: 14px;
    color: #737d8b;
    line-height: 1.5;
}

.custom-file-upload:hover .file-upload-text,
.custom-file-upload input[type="file"]:focus + .file-upload-text {
    color: #007bff;
}

.custom-file-upload input[type="file"]:valid + .file-upload-text::after {
    content: ' (' attr(data-file-count) ' файлов выбрано)';
}

/* Modal styles */
.modal-dialog {
    max-width: 600px;
    margin: 1.75rem auto;
}

.modal-content {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background-color: #007bff;
    color: #fff;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom: 0;
}

.modal-title {
    font-weight: 600;
    color: #fff;
}

.btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 20px;
}

.form-label {
    font-weight: 500;
    color: #212529;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Form messages */
.form-messages {
    margin-top: 30px;
    margin-bottom: 30px;
    font-size: 23px;
    text-align: center;
}

.form-messages.success {
    color: #28a745;
}

.form-messages.error {
    color: #dc3545;
}

/* Image Gallery */
.image-gallery {
    margin-top: 20px;
}

.gallery-image {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-image:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.gallery-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
}

/* Image Modal */
#imageModal .modal-content {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#imageModal .modal-header {
    background-color: #007bff;
    color: #fff;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

#imageModal .modal-body img {
    max-height: 60vh;
    width: auto;
    margin: 0 auto;
}

/* Image modal */
#imageModal .modal-dialog {
    max-width: 800px; /* Larger modal for full-size images */
}

#imageModal .modal-content {
    border-radius: 15px;
}

#imageModal .modal-header {
    background-color: #007bff;
    color: #fff;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

#imageModal .modal-body {
    padding: 0;
}

#imageModal img {
    border-radius: 0 0 10px 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-image {
        margin-bottom: 15px;
    }

    #imageModal .modal-body img {
        max-height: 50vh;
    }
}

@media (max-width: 576px) {
    .gallery-image {
        margin-bottom: 10px;
    }

    #imageModal .modal-body img {
        max-height: 40vh;
    }
}

.med-nic {
    padding-left: 0;
    padding-right: 0;
}

/* Custom file input (already in provided CSS) */
.custom-file-upload {
    position: relative;
    height: 50px;
    border: 1px solid #f0f0f0;
    background-color: #fff;
    border-radius: 0;
    display: flex;
    align-items: center;
    padding-left: 25px;
    font-size: 14px;
    color: #737d8b;
}

.custom-file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.custom-file-upload .file-upload-text {
    font-size: 14px;
    color: #737d8b;
    line-height: 1.5;
}

.custom-file-upload:hover .file-upload-text,
.custom-file-upload input[type="file"]:focus + .file-upload-text {
    color: #007bff;
}

.custom-file-upload input[type="file"]:valid + .file-upload-text::after {
    content: ' (' attr(data-file-count) ' файлов выбрано)';
}

.contact-form-app .form-text {
    margin-bottom: 0px;
    font-size: 12px;
    color: #737d8b;
}