﻿/* Страница собаки */
.dog-page {
    max-width: 1200px;
    margin: 2rem auto;
}

/* Заголовок */
.dog-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 200;
    letter-spacing: 0.05em;
    color: var(--text-rich);
    margin-bottom: 1rem;
    text-align: center;
}

/* Родители */
.dog-parents {
    text-align: center;
    margin-bottom: 2rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 200;
    color: var(--text-soft);
}

.parents-line {
    display: inline-block;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 1rem;
}

.parent-link {
    color: var(--text-rich);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

    .parent-link:hover {
        border-color: var(--text-rich);
    }

.parent-separator {
    margin: 0 1rem;
    color: var(--text-light);
}

/* Пометы */
.dog-litters {
    margin-bottom: 2rem;
    text-align: center;
}

.litters-toggle {
    background: none;
    border: 1px solid #e5e5e5;
    padding: 0.8rem 2rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 200;
    letter-spacing: 0.1em;
    color: var(--text-soft);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

    .litters-toggle:hover {
        background: #f5f5f5;
    }

.toggle-icon {
    font-size: 0.8rem;
}

.litters-list {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.litter-item {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--text-soft);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: background 0.2s;
}

    .litter-item:hover {
        background: #f5f5f5;
    }
.litter-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

    .litter-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.no-image-small {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-light);
}

.litter-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 200;
}

.litters-bottom-line {
    width: 100%;
    height: 1px;
    background-color: #e5e5e5;
    margin-top: 1rem;
}

/* Основной блок с фото и описанием */
.dog-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.dog-photo {
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

    .dog-photo img {
        width: 100%;
        height: auto;
        display: block;
    }

.no-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-light);
}

.dog-info {
    font-family: 'Montserrat', sans-serif;
    font-weight: 200;
    color: var(--text-soft);
    line-height: 1.8;
}

.info-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.info-label {
    font-weight: 300;
    color: var(--text-light);
    margin-right: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-rich);
}

.info-description {
    white-space: pre-line;
}

/* Галерея */
.dog-gallery {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e5e5;
}

.gallery-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 200;
    margin-bottom: 2rem;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s;
}

    .gallery-item:hover {
        transform: scale(1.02);
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.video-thumb {
    position: relative;
    width: 100%;
    height: 100%;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.no-gallery {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-light);
    padding: 2rem;
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image,
.modal-video {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: -40px;
    color: white;
    font-size: 2.5rem;
    font-weight: 200;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10001;
    opacity: 0.9;
    text-shadow: 0 0 8px rgba(0,0,0,0.8), 0 0 2px black;
    transition: opacity 0.2s;
}

    .modal-close:hover {
        opacity: 1;
        transform: scale(1.1);
    }

/* Навигация в модальном окне - вынесена за фото */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 3rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10002;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
    opacity: 0.8;
    text-shadow: 0 0 8px rgba(0,0,0,0.5);
}

    .modal-nav:hover {
        background: rgba(0, 0, 0, 0.8);
        transform: translateY(-50%) scale(1.1);
        opacity: 1;
    }

.modal-prev {
    left: -80px; /* выносим влево за пределы фото */
}

.modal-next {
    right: -80px; /* выносим вправо за пределы фото */
}

/* Адаптивность */
@media (max-width: 768px) {
    .modal-prev {
        left: -40px;
    }

    .modal-next {
        right: -40px;
    }

    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }

    .modal-close {
        top: -30px;
        right: -10px;
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .modal-prev {
        left: -20px;
    }

    .modal-next {
        right: -20px;
    }

    .modal-nav {
        width: 35px;
        height: 35px;
        font-size: 1.8rem;
    }
}


/* Загрузка */
.loading {
    text-align: center;
    padding: 4rem;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-light);
}

/* Адаптивность */
@media (max-width: 768px) {
    .dog-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .dog-title {
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }

    .modal-prev {
        left: 10px;
    }

    .modal-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .parents-line {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .parent-separator {
        display: none;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.video-placeholder {
    width: 100%;
    height: 100%;
    background: #333;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

/* Общие стили для кнопок действий */
.dog-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 3rem 0;
}

.action-button {
    background: none;
    border: none;
    padding: 0.5rem 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 200;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-soft);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

    .action-button::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0;
        height: 1px;
        background-color: var(--text-rich);
        transition: width 0.3s ease;
    }

    .action-button:hover {
        color: var(--text-rich);
    }

        .action-button:hover::after {
            width: 100%;
        }

        .action-button:hover .button-icon {
            transform: translateX(3px);
        }

.button-icon {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.action-button:hover .button-icon {
    opacity: 1;
}

@media (max-width: 600px) {
    .dog-buttons {
        gap: 1.5rem;
        flex-direction: column;
        align-items: center;
    }

    .action-button {
        font-size: 0.8rem;
    }
}

/* Контейнер родословной */
.pedigree-container {
    margin-top: 2rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

/* Сетка 6 колонок */
.pedigree-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(200px, 1fr));
    gap: 1px;
    background: #e5e5e5;
    border: 1px solid #e5e5e5;
    min-width: 1200px;
}

/* Колонка */
.pedigree-column {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #e5e5e5;
}

/* Ячейка */
.pedigree-cell {
    background: white;
    padding: 0.8rem;
    min-height: 100px;
}

/* Ссылка */
.pedigree-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.2s;
}

    .pedigree-link:hover {
        opacity: 0.7;
    }

/* Изображение */
.pedigree-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #f0f0f0;
}

.pedigree-no-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f5f5f5;
    margin: 0 auto;
}

/* Имя */
.pedigree-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 200;
    text-align: center;
    color: var(--text-soft);
    line-height: 1.3;
}

/* Пустая ячейка */
.pedigree-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

    .pedigree-empty .pedigree-name {
        color: var(--text-light);
        font-style: italic;
    }

.pedigree-bottom-line {
    width: 100%;
    height: 1px;
    background-color: #e5e5e5;
    margin-top: 1rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .pedigree-container {
        margin: 1rem -1rem;
        width: calc(100% + 2rem);
    }
}
.button-separator {
    color: var(--text-light);
    opacity: 0.3;
    font-size: 1.2rem;
    font-weight: 200;
    display: inline-flex;
    align-items: center;
}

/* Модальное окно для договора */
.contract-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    backdrop-filter: blur(5px);
}

.contract-modal-content {
    background: var(--pure-white);
    max-width: 500px;
    width: 90%;
    border-radius: 1.5rem;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.contract-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s;
}

    .contract-modal-close:hover {
        color: var(--text-rich);
    }

.contract-modal-body {
    padding: 3rem 2rem;
    text-align: center;
}

.contract-modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 200;
    color: var(--text-rich);
    margin-bottom: 1.5rem;
}

.contract-modal-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 200;
    line-height: 1.6;
    color: var(--text-soft);
    margin-bottom: 1rem;
}

.contract-modal-signature {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 200;
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.contract-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.contract-modal-btn {
    padding: 0.8rem 2rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 200;
    letter-spacing: 0.1em;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--text-rich);
    color: white;
}

    .btn-primary:hover {
        background: var(--text-soft);
    }

.btn-secondary {
    background: #f0f0f0;
    color: var(--text-soft);
}

    .btn-secondary:hover {
        background: #e0e0e0;
    }
.contract-section {
    display: flex;
    justify-content: center;
    margin-top: 0; /* убрали отступ сверху */
    padding-top: 0;
}

.contract-loader {
    text-align: center;
    padding: 2rem;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--text-rich);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.contract-form {
    margin: 1.5rem 0;
    text-align: left;
}

.form-group {
    margin-bottom: 1rem;
}

    .form-group label {
        display: block;
        font-family: 'Montserrat', sans-serif;
        font-size: 0.8rem;
        font-weight: 200;
        color: var(--text-light);
        margin-bottom: 0.3rem;
        letter-spacing: 0.05em;
    }

.form-control {
    width: 100%;
    padding: 0.6rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 200;
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

    .form-control:focus {
        outline: none;
        border-color: var(--text-soft);
        box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
    }

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-group.has-error input {
    border-color: #f5222d;
    background-color: #fff2f0;
}

.field-error {
    display: block;
    color: #f5222d;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    margin-top: 0.2rem;
    padding-left: 0.5rem;
}

.contract-modal-btn.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

    .contract-modal-btn.btn-primary:disabled:hover {
        background-color: #4CAF50;
    }
.error-text {
    color: #dc3545;
    text-align: center;
    margin: 20px 0;
}

/* Разрешаем тексту быть жирным внутри инфо-блока собаки */
.info-description strong, .info-description b {
    font-weight: 700 !important;
}