
/* ===== ОСНОВНЫЕ СТИЛИ ===== */
:root {
    --thumb-width: 100%; /* 300px */
     --thumb-ratio: 4/2; /* 1/1 — 4/3 —  16/9 — 3/4 */
    --nav-btn-size: 3.125rem; /* 50px */
}



.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
background:transparent;
 border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
}
.favorite-btn.active,
.favorite-btn.active i {
    color: red;
}
/* ===== ОБНОВЛЕННАЯ КАРТОЧКА ===== */
.gallery-card {
    border-radius: 0.7rem;
    overflow: hidden;
   box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1) !important;
}


.gallery-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.text-accent {
    color: var( --accent-color);
    font-size: 0.9rem;
}


/* Стиль для бейджа материала */
.badge {
    font-size: 0.8rem;
 color: var( --accent-color);
}


.gallery-thumb {
 width: var(--thumb-width);
    height: auto; /* Высота вычисляется автоматически */
    aspect-ratio: var(--thumb-ratio); /* Вот это ключевое свойство! */
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
}






.modal-image {
    max-height: 100vh;
    max-width: 100vw;
    object-fit: contain;
}

/* ===== КНОПКА ЗАКРЫТИЯ МОДАЛКИ ===== */
.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    width: 3rem;
    height: 3rem;
    border: 2px solid rgba(255, 255, 255, 0.7); /* Белая обводка */
    background: transparent; /* Прозрачный фон */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}


/* Для иконок внутри кнопок модалки добавляем обводку */
.modal-nav-btn i {
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: all 0.3s ease;
}

.modal-nav-btn:hover i {
    border-color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}
