/* =========================
   Общие стили
   ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #222;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style-position: inside;
}

/* =========================
   Header
   ========================= */
header {
    background-color: #0b1d3a;
    color: white;
    text-align: center;
    padding: 15px 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    letter-spacing: 1px;
    font-weight: 600;
}

header p {
    margin: 5px 0;
    font-size: 0.95rem;
}

/* =========================
   Navigation
   ========================= */
nav {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

nav a {
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    font-weight: 500;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover,
nav a.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* =========================
   Main Content
   ========================= */
main {
    background-color: #fff;
    max-width: 900px;
    margin: 30px auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
}

h2 {
    color: #0b1d3a;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

h3 {
    color: #0b1d3a;
    margin: 20px 0 10px;
    font-size: 1.2rem;
}

/* =========================
   Buttons
   ========================= */
.button-container {
    text-align: center;
    margin: 20px 0;
}

.btn {
    padding: 12px 24px;
    margin: 0 5px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-primary {
    background: #0d1b4c;
    color: white;
}

.btn-secondary {
    background: #1a2b70;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #222;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

/* =========================
   Cards & Boxes
   ========================= */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.info-box {
    background-color: #e8f4ff;
    padding: 20px;
    border-radius: 12px;
    margin-top: 30px;
    border-left: 4px solid #0b1d3a;
}

.warning-box {
    background-color: #fff3cd;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #ffc107;
}

.warehouse-info {
    background-color: #e8f4ff;
    padding: 25px;
    border-radius: 12px;
    margin-top: 40px;
    text-align: center;
}

.warehouse-info h2 {
    color: #0b1d3a;
    margin-bottom: 15px;
}

.warehouse-info p {
    line-height: 1.8;
    font-size: 1rem;
}

/* =========================
   Lists
   ========================= */
ul {
    line-height: 1.8;
    padding-left: 20px;
}

ul li {
    margin-bottom: 10px;
}

/* =========================
   Footer
   ========================= */
footer {
    background-color: #0b1d3a;
    color: white;
    text-align: center;
    padding: 20px 10px;
    margin-top: 50px;
}

footer p {
    margin: 5px 0;
    font-size: 0.9rem;
}

.instagram-link {
    color: #ffd700;
    text-decoration: none;
    font-weight: 500;
}

.instagram-link:hover {
    text-decoration: underline;
}

/* =========================
   Forms
   ========================= */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #0b1d3a;
    box-shadow: 0 0 0 3px rgba(11, 29, 58, 0.1);
}

/* =========================
   Alerts
   ========================= */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {
    main {
        margin: 20px 10px;
        padding: 20px;
    }

    header h1 {
        font-size: 1.4rem;
    }

    nav {
        flex-direction: column;
        align-items: center;
    }

    nav a {
        display: block;
        width: 80%;
        text-align: center;
    }

    .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}

/* =========================
   Modal Windows (Bootstrap styles)
   ========================= */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1055;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal.fade .modal-dialog {
    transition: transform .3s ease-out;
    transform: translate(0,-50px);
}

.modal.show .modal-dialog {
    transform: none;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.modal-backdrop.fade {
    opacity: 0;
}

.modal-backdrop.show {
    opacity: 0.5;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    pointer-events: none;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.2);
    border-radius: 0.3rem;
    outline: 0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: calc(0.3rem - 1px);
    border-top-right-radius: calc(0.3rem - 1px);
}

.modal-header .modal-title {
    margin-bottom: 0;
    line-height: 1.5;
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

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

.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em 0.25em;
    color: #000;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: 0.25rem;
    opacity: 0.5;
    cursor: pointer;
}

.btn-close:hover {
    opacity: 0.75;
}

.btn-close-sm {
    width: 0.8em;
    height: 0.8em;
    padding: 0.2em;
}

/* Review specific modal styles */
.review-photo-modal .modal-content {
    border: none;
    background: transparent;
    box-shadow: none;
}

.review-photo-modal .modal-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: none;
    border-radius: 0.3rem 0.3rem 0 0;
}

.review-photo-modal .modal-body {
    padding: 0;
    background: transparent;
}

.review-photo-modal .modal-body img {
    border-radius: 0.3rem;
    max-height: 80vh;
    object-fit: contain;
}

/* =========================
   Review Cards
   ========================= */
.review-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1) !important;
}

.review-content {
    line-height: 1.4;
    color: #495057;
}

.review-photo {
    transition: transform 0.3s ease;
    border-radius: 6px;
}

.review-photo:hover {
    transform: scale(1.02);
}

.rating .small {
    font-size: 0.7rem;
}

.avatar {
    font-weight: 600;
}

/* =========================
   Responsive Modal
   ========================= */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-header {
        padding: 0.75rem;
    }

    .modal-body {
        padding: 0.75rem;
    }

    .review-photo-modal .modal-body img {
        max-height: 70vh;
    }
}

@media (min-width: 576px) {
    .modal-dialog {
        max-width: 500px;
        margin: 1.75rem auto;
    }
}

@media (min-width: 992px) {
    .modal-lg {
        max-width: 800px;
    }

    .modal-lg .modal-body img {
        max-height: 85vh;
    }
}

/* Ensure modal is above everything */
.modal {
    z-index: 9999;
}

.modal-backdrop {
    z-index: 9998;
}
