/* Базовые стили */
:root {
    --color-sand: #f5e9d6;
    --color-bronze: #cd7f32;
    --color-gold: #d4a017;
    --color-sand-light: #faf6f0;
    --color-stone: #666;
    --color-stone-dark: #5a5248;
    --color-stone-darker: #262626;
    --color-patina: #3a9b94;
    --color-patina-dark: #2a776f;
    --color-light: #ffffff;
    --color-dark: #2c2c2c;
    --color-gray-dark: #666;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--color-dark);
    line-height: 1.6;
    min-height: 100vh;
}


h2 {
    font-weight: 600;
    font-size: 36px;
    color: var(--color-dark);
    text-transform: uppercase;
    position: relative;
    margin-top: 10px;
    margin-bottom: 15px;
    padding-bottom: 20px;
    text-align: center;
}

h2::after {
    position: absolute;
    content: "";
    background: var(--color-patina);
    height: 2px;
    width: 70px;
    bottom: 0;
    margin-left: -35px;
    left: 50%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
.header {
    background: #262626; 
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    width: 100%;
}

.header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(58, 155, 148, 0.2) 20%, 
        rgba(58, 155, 148, 0.4) 50%, 
        rgba(58, 155, 148, 0.2) 80%, 
        transparent 100%
    );
}

.header-content {
    display: flex;
    flex-direction: column;
    padding: 0;
    align-items: center;
}

/* Верхняя часть шапки - название */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    min-height: 60px;
    width: 100%;
    max-width: 1200px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 20px;
    flex-shrink: 0;
}

.logo-text h1 {
    font-family: 'Marck Script', cursive;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--color-light);
    line-height: 1.2;
    letter-spacing: 0.5px;
}

/* Скрываем заголовок на мобильных устройствах */
@media (max-width: 768px) {
    .logo-text h1 {
        display: none;
    }
    
    .logo {
        gap: 0;
    }
    
    .logo-icon {
        margin-right: 0;
    }
}

/* Нижняя часть шапки - меню */
.header-bottom {
    background: rgba(255, 255, 255, 0.85);
    width: 100%;
    max-width: 1200px;
    padding: 0;
    border-radius: 4px 4px 0 0;
}

.main-nav {
    width: 100%;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.main-nav li {
    flex: 1;
    text-align: center;
    position: relative;
}

.main-nav li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 30px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(138, 127, 112, 0.3) 50%, 
        transparent 100%
    );
}

.main-nav li:first-child::before {
    display: none;
}

.main-nav a {
    text-decoration: none;
    color: var(--color-stone-dark);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 18px 10px;
    transition: var(--transition);
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
}

.main-nav a:hover {
    color: var(--color-patina);
    background: rgba(58, 155, 148, 0.05);
}

.main-nav a.active {
    color: var(--color-patina);
    font-weight: 600;
    background: rgba(58, 155, 148, 0.08);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-patina), var(--color-patina-dark));
    border-radius: 3px 3px 0 0;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    flex-shrink: 0;
}

/* Герой-секция */
.hero-section {
    padding: 60px 0 0 0;
    position: relative;
}

.hero-content {
    display: block;
}

.hero-text h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.1;
}



/* Основное содержимое */
.main-content {
    padding: 0 0 60px 0;
}

/* Сетка моделей */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.graves-item {
    background: var(--color-light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(138, 127, 112, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.graves-item:hover {
   /* transform: translateY(-5px);*/
    box-shadow: var(--shadow-lg);
    border-color: rgba(58, 155, 148, 0.2);
}

.sketchfab-embed-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.view-3d-btn {
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    display: block;
}

.view-3d-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.view-3d-btn:hover .view-3d-preview {
    transform: scale(1.05);
}

.view-3d-btn-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    text-align: center;
}

.view-3d-btn:hover .view-3d-btn-content {
    opacity: 1;
}

.view-3d-btn-content i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);/*var(--color-patina);*/

}

.view-3d-btn-content span {
    font-weight: 500;
    font-size: 1rem;
}

.model-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.model-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-stone-darker);
    margin-bottom: 15px;
    line-height: 1.3;
    text-align: center;
    min-height: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    padding-top: 15px;
    margin-bottom: 15px;
    border-top: 1px solid rgba(138, 127, 112, 0.1);
}

.model-period, .model-location {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--color-gray-dark);
    line-height: 1.4;
}

.model-period i, .model-location i {
    color: var(--color-stone);
    font-size: 0.9rem;
    margin-top: 2px;
    min-width: 20px;
    text-align: left;
    flex-shrink: 0;
}

.model-period span, .model-location span {
    flex: 1;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Кнопка 3D просмотр в карточке */
.model-3d-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 15px;
    background: linear-gradient(135deg, var(--color-patina), var(--color-patina-dark));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.model-3d-btn:hover {
    background: linear-gradient(135deg, var(--color-patina-dark), var(--color-patina));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(58, 155, 148, 0.3);
}

.model-3d-btn i {
    font-size: 1.1rem;
}

/* Модальное окно */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: var(--color-light);
    border-radius: var(--radius);
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(138, 127, 112, 0.1);
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--color-stone-darker);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-stone);
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--color-patina);
    transform: rotate(90deg);
}

.modal-content {
    display: block;
    overflow: hidden;
}

.model-viewer-container {
    position: relative;
    background: #000;
    min-height: 600px;
}

.model-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    background: #000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--color-patina);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.model-iframe {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border: none;
}

/* Подвал */
.footer {
    background: var(--color-stone-darker);
    color: white;
    padding: 60px 0 30px;
    margin-top: 0;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--color-patina) 0%, 
        var(--color-patina-dark) 50%, 
        var(--color-patina) 100%
    );
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section p {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--color-light);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 1.1rem;
    transition: var(--transition);
}



.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .header-top, .header-bottom {
        max-width: calc(100% - 40px);
       
    }
}

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .models-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 900px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .header-bottom {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        max-width: 100%;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }
    
    .header-bottom.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav li::before {
        display: none;
    }
    
    .main-nav a {
        padding: 15px 20px;
        text-align: left;
        border-bottom: 1px solid rgba(138, 127, 112, 0.1);
    }
    
    .main-nav a.active::after {
        left: 0;
        width: 4px;
        height: 100%;
    }
    
    .hero-text h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .models-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .hero-text h2 {
        font-size: 2rem;
    }
    
    /* Скрываем заголовок в логотипе при ширине меньше 768px */
    .logo-text h1 {
        display: none;
    }
}

@media (max-width: 480px) {
    .models-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-text h2 {
        font-size: 1.8rem;
    }
    
    .model-title {
        font-size: 1.1rem;
    }
}
.model-description {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--color-patina);
    line-height: 1.4;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(58, 155, 148, 0.1);
  /*  font-style: italic;*/
}

.model-description i {
    color: var(--color-patina);
    font-size: 0.9rem;
    margin-top: 2px;
    min-width: 20px;
    text-align: left;
    flex-shrink: 0;
}

.model-description span {
    flex: 1;
    word-break: break-word;
    overflow-wrap: break-word;
}
