/* webdocument.css - Стили для страницы просмотра документа */

/* Hero секция документа */
.document-hero {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    color: white;
    padding: 3rem 0 4rem 0;
    position: relative;
    overflow: hidden;
}

.document-hero::before {
    content: '';
    position: absolute;
    top: 45px;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff" opacity="0.1"><polygon points="0,100 100,0 200,50 300,0 400,80 500,20 600,60 700,0 800,40 900,0 1000,30 1000,100"/></svg>') repeat-x;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateX(0px); }
    50% { transform: translateX(-50px); }
}

.document-hero-content {
    position: relative;
    z-index: 2;
}

/* Хлебные крошки */
.document-hero-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.breadcrumb-link {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb-link:hover {
    color: #dbeafe;
    text-decoration: underline;
}

.breadcrumb-current {
    color: #dbeafe;
    font-weight: 500;
}

.document-hero-breadcrumbs i {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Основная информация о документе */
.document-hero-main {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.document-hero-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    flex-shrink: 0;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.document-hero-info {
    flex: 1;
    min-width: 0;
}

.document-hero-type {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.document-hero-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.document-hero-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.document-hero-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.document-hero-date i {
    color: #dbeafe;
}

/* Кнопки действий */
.document-hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.document-hero-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    border: 2px solid transparent;
}

.document-hero-btn.primary {
    background: white;
    color: #1e40af;
    border-color: white;
}

.document-hero-btn.primary:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.document-hero-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.document-hero-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Основной контент */
.document-content {
    padding: 4rem 0;
    background: #f9fafb;
}

/* Сообщение об ошибке */
.error-message {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid #fee2e2;
}

.error-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    color: white;
    font-size: 2rem;
}

.error-text h3 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.error-text p {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
}

/* Просмотрщик документов */
.document-viewer {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.1);
    margin-bottom: 3rem;
}

.document-viewer-header {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

.document-viewer-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.document-viewer-controls {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border: 2px solid transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9rem;
}

.control-btn:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.document-viewer-content {
    position: relative;
    min-height: 600px;
}

/* PDF просмотр */
.pdf-container {
    width: 100%;
    height: 80vh;
    min-height: 600px;
    position: relative;
}

.pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #f9fafb;
}

/* Изображения */
.document-image-container {
    padding: 2rem;
    text-align: center;
    background: #f9fafb;
}

.document-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.document-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Неподдерживаемые файлы */
.unsupported-file {
    padding: 4rem 2rem;
    text-align: center;
    color: #6b7280;
}

.unsupported-file-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #6b7280, #4b5563);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem auto;
    color: white;
    font-size: 3rem;
}

.unsupported-file h3 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 1rem;
    font-weight: 600;
}

.unsupported-file p {
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.download-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Информационная секция */
.document-info-section {
    margin-top: 2rem;
}

.document-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.info-card:hover::before {
    opacity: 1;
}

.info-card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.info-card:hover .info-card-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.info-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.info-card p {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* Анимации появления */
.document-hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.document-hero-breadcrumbs {
    animation-delay: 0.1s;
}

.document-hero-main {
    animation-delay: 0.3s;
}

.document-hero-actions {
    animation-delay: 0.5s;
}

.document-viewer {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.7s;
}

.info-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.info-card:nth-child(1) { animation-delay: 0.9s; }
.info-card:nth-child(2) { animation-delay: 1.1s; }
.info-card:nth-child(3) { animation-delay: 1.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивный дизайн */
@media (max-width: 1024px) {
    .document-hero-title {
        font-size: 1.875rem;
    }
    
    .document-hero-main {
        gap: 1.5rem;
    }
    
    .document-hero-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .document-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .document-hero {
        padding: 2rem 0 3rem 0;
    }
    
    .document-hero-title {
        font-size: 1.5rem;
    }
    
    .document-hero-main {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .document-hero-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin: 0 auto;
    }
    
    .document-hero-actions {
        justify-content: center;
        flex-direction: column;
    }
    
    .document-hero-btn {
        width: 100%;
        justify-content: center;
    }
    
    .document-viewer-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .document-viewer-controls {
        justify-content: center;
    }
    
    .pdf-container {
        height: 60vh;
        min-height: 400px;
    }
    
    .info-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .document-content {
        padding: 2rem 0;
    }
    
    .document-hero-breadcrumbs {
        font-size: 0.8rem;
        flex-wrap: wrap;
    }
    
    .document-hero-type {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
    
    .document-image-container {
        padding: 1rem;
    }
    
    .unsupported-file {
        padding: 2rem 1rem;
    }
    
    .unsupported-file-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
}