/* hero.css */

/* Герой секция во весь экран */
.hero-section {
    padding-top: 0;
    padding: 0px 0 60px !important;
    padding: calc(0px + var(--safe-area-inset-top, 0px)) 0 calc(60px + var(--safe-area-inset-bottom, 0px)) !important;
    min-height: calc(100vh - var(--safe-area-inset-top, 0px)) !important;
    min-height: calc(100dvh - var(--safe-area-inset-top, 0px)) !important;
    background: linear-gradient(135deg, 
        rgba(29, 29, 29, 0.95) 0%, 
        rgba(59, 59, 59, 0.85) 50%, 
        rgba(29, 29, 29, 0.95) 100%);
    position: relative;
}

.hero-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, rgba(29, 29, 29, 0.9) 0%, transparent 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}

.hero-content {
    animation: slideInLeft 1s ease-out;
}

.hero-certificates {
    animation: slideInRight 1s ease-out;
}

.hero-title {
    color: var(--color-text-gold);
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    margin-bottom: 1.5rem;
}

.hero-text {
    color: var(--color-text-secondary);
    font-size: 1.3rem;
    font-weight: 300;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
    margin-bottom: 2rem;
}

/* Пульсирующие точки */
.hero-bg-dots {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(238,147,147,0.4) 2px, transparent 3px),
        radial-gradient(circle at 75% 75%, rgba(187,13,13,0.3) 2px, transparent 3px),
        radial-gradient(circle at 50% 10%, rgba(225,218,207,0.2) 2px, transparent 3px);
    background-size: 100px 100px;
    animation: dotsPulse 4s ease-in-out infinite;
}

/* Стили для сертификатов */
.sertif-grid {
    perspective: 1000px;
}

.certificate-card {
    background: none;
    border: none;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.certificate-inner {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 
        var(--shadow-hover),
        0 0 0 1px var(--color-border);
    transition: all 0.4s ease;
}

.certificate-card:hover .certificate-inner {
    transform: translateY(-10px) scale(1.05);
}

.sertif-img {
    width: 180px;
    height: 220px;
    object-fit: cover;
    border-radius: var(--border-radius);
    transition: all 0.4s ease;
}

.certificate-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(175, 175, 175, 0.6) 0%, 
        rgba(240, 237, 237, 0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
}

.certificate-card:hover .certificate-overlay {
    opacity: 1;
}

.view-text {
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
}

/* Кнопки */
.hero-btn {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    justify-items: center;
    background: linear-gradient(135deg, var(--color-black), var(--color-black));
    border: none;
}

.btn-primary:hover {
    box-shadow: 0 10px 25px rgba(163, 163, 163, 0.4);
}

.btn-outline-light {
    border-color: var(--color-border-light);
    color: var(--color-text);
}

.btn-outline-light:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: var(--color-border-light);
    color: var(--color-text);
}

/* Анимации фона */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-bg-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(238, 147, 147, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(187, 13, 13, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(225, 218, 207, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 60% 60%, rgba(147, 196, 238, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 30% 30%, rgba(147, 238, 169, 0.06) 0%, transparent 50%);
    animation: float 8s ease-in-out infinite;
}

.hero-bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(2px 2px at 10% 20%, rgba(255,255,255,0.3) 50%, transparent),
        radial-gradient(2px 2px at 90% 70%, rgba(238,147,147,0.4) 50%, transparent),
        radial-gradient(3px 3px at 30% 80%, rgba(187,13,13,0.3) 50%, transparent),
        radial-gradient(2px 2px at 70% 10%, rgba(255,255,255,0.2) 50%, transparent),
        radial-gradient(3px 3px at 50% 50%, rgba(225,218,207,0.3) 50%, transparent),
        radial-gradient(2px 2px at 80% 90%, rgba(238,147,147,0.4) 50%, transparent);
    background-size: 100% 100%;
    animation: particlesMove 20s linear infinite;
}

.hero-bg-grid {
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 40s linear infinite;
    top: -50%;
    left: -50%;
}

.hero-bg-shine {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        125deg,
        transparent 0%,
        rgba(255,255,255,0.02) 30%,
        rgba(238,147,147,0.03) 50%,
        rgba(255,255,255,0.02) 70%,
        transparent 100%
    );
    animation: shineSweep 15s ease-in-out infinite;
    transform: translateX(-100%);
}

/* Анимации */
@keyframes dotsPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

@keyframes particlesMove {
    0% {
        transform: translateY(0px) translateX(0px);
    }
    25% {
        transform: translateY(-20px) translateX(10px);
    }
    50% {
        transform: translateY(-10px) translateX(20px);
    }
    75% {
        transform: translateY(-15px) translateX(5px);
    }
    100% {
        transform: translateY(0px) translateX(0px);
    }
}

@keyframes gridMove {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    50% {
        transform: translateX(-25px) translateY(-25px) rotate(0.5deg);
    }
    100% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
}

@keyframes shineSweep {
    0%, 100% {
        transform: translateX(-100%) skewX(-15deg);
    }
    50% {
        transform: translateX(100%) skewX(-15deg);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.3;
        filter: blur(20px);
    }
    50% {
        opacity: 0.6;
        filter: blur(30px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
        filter: hue-rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(1deg) scale(1.05);
        filter: hue-rotate(90deg);
    }
    66% {
        transform: translateY(10px) rotate(-0.5deg) scale(0.95);
        filter: hue-rotate(180deg);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Анимация появления элементов с задержкой */
.hero-title {
    animation-delay: 0.2s;
}

.hero-text {
    animation-delay: 0.4s;
}

.hero-buttons {
    animation-delay: 0.6s;
}

.certificate-card:nth-child(1) { animation-delay: 0.3s; }
.certificate-card:nth-child(2) { animation-delay: 0.5s; }
.certificate-card:nth-child(3) { animation-delay: 0.7s; }

/* Медиа-запросы для героя */
@media (max-width: 1200px) {
    .hero-section {
        padding: 140px 0 80px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-text {
        font-size: 1.2rem;
    }
    
    .sertif-img {
        width: 130px;
        max-height: 180px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 70px;
        padding: 120px 0 60px !important;
        padding: calc(120px + var(--safe-area-inset-top, 0px)) 0 calc(60px + var(--safe-area-inset-bottom, 0px)) !important;
        min-height: calc(100vh - var(--safe-area-inset-top, 0px)) !important;
        min-height: calc(100dvh - var(--safe-area-inset-top, 0px)) !important;
        height: auto;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
        text-align: center;
    }
    
    .hero-text {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .sertif-grid {
        justify-content: center !important;
        margin-top: 2rem;
    }
    
    .sertif-img {
        width: 140px;
        height: 180px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 100px 0 50px;
        min-height: calc(100vh - 70px) !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
        margin-top: 15px !important;
    }
    
    .hero-text {
        font-size: 1rem;
    }
    
    .sertif-img {
        width: 120px;
        height: 160px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 100px 0 50px;
    }
    
    .hero-title {
        font-size: 1.3rem;
    }
    
    .hero-text {
        font-size: 1rem;
    }
    
    .sertif-img {
        width: 100px;
        max-height: 120px;
    }
}

@media (max-width: 360px) {
    .hero-section {
        padding: 70px 0 30px !important;
        min-height: calc(100vh - 70px) !important;
    }
    
    .hero-title {
        font-size: 1.4rem !important;
        margin-top: 10px !important;
    }
    
    .hero-text {
        font-size: 0.85rem !important;
    }
    
    .sertif-img {
        width: 90px !important;
        height: 120px !important;
    }
}