:root {
    --primary: #4CAF50;
    --primary-dark: #3e8e41;
    --dark: #1a1a1a;
    --darker: #111;
    --light: #fff;
    --gray: #2a2a2a;
    --shadow: 0 4px 8px rgba(0,0,0,0.2);
    --shadow-lg: 0 6px 12px rgba(0,0,0,0.25);
    --transition: all 0.3s ease;
}

/* Optimized Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeUp {
    from { 
        opacity: 0;
        transform: translateY(25px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@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 scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-on-scroll {
    opacity: 0;
    transition: all 0.6s ease-out;
    will-change: opacity, transform;
}

.animate-fadeIn {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animate-right {
    animation: slideInRight 0.6s ease-out forwards;
}

.animate-scale {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-fadeUp {
    animation: fadeUp 0.8s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s infinite ease-in-out;
}

/* Hero section */
.hero-section {
    position: relative;
    height: 85vh;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('photo/background/backgroundArorya.jpg') no-repeat center center/cover;
    background-attachment: scroll;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 20%, var(--dark) 70%);
    opacity: 0.6;
    z-index: 1;
}

.logo img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid var(--light);
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.6);
    transition: transform 0.5s, box-shadow 0.5s;
    animation: pulse 4s infinite ease-in-out;
    will-change: transform, box-shadow;
}

.title {
    background: linear-gradient(to right, var(--primary), #8BC34A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.5rem;
    margin: 20px 0;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
    animation: fadeUp 1s ease-in-out 0.2s both;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--primary);
    position: relative;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.section-title::after {
    content: '';
    width: 70px;
    height: 3px;
    background: var(--primary);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -15px;
    border-radius: 2px;
    box-shadow: 0 2px 5px rgba(76, 175, 80, 0.5);
}

/* About sections */
.about-section {
    padding: 40px 20px;
    margin: 20px 0;
    border-radius: 15px;
    background: rgba(30, 30, 30, 0.7);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.about-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    color: var(--primary);
    font-size: 1.8rem;
}

.about-title i {
    font-size: 2rem;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-text {
    font-size: 1rem;
    line-height: 1.7;
    text-align: justify;
    overflow-wrap: break-word;
}

.about-media {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-media img, 
.about-media video {
    width: 100%;
    height: auto;
    display: block;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.value-card {
    background: rgba(40, 40, 40, 0.8);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
    border-color: var(--primary);
}

.value-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.value-title {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 100%;
    margin: 40px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    padding: 15px 30px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-content {
    padding: 20px;
    background-color: rgba(40, 40, 40, 0.8);
    position: relative;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--light);
    border: 4px solid var(--primary);
    top: calc(50% - 10px);
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    right: -10px;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-year {
    font-weight: bold;
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

/* Navigation circles */
.circle {
    width: 70px;
    height: 70px;
    background: var(--light);
    color: #000;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    will-change: transform;
    -webkit-tap-highlight-color: transparent;
}

.circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.circle:active {
    transform: translateY(-5px) scale(0.95);
    box-shadow: 0 15px 25px rgba(0,0,0,0.4);
}

.circle:active::before {
    opacity: 0.2;
}

.circle i {
    font-size: 20px;
    color: var(--primary);
    transition: transform 0.3s;
}

.circle:active i {
    transform: scale(1.2);
}

.circle span {
    font-size: 10px;
    margin-top: 6px;
    color: #000;
    font-weight: 600;
    transition: transform 0.3s;
}

.circle:active span {
    transform: translateY(3px);
}

/* Reviews section styles */
.reviews-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 15px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--dark);
    -webkit-overflow-scrolling: touch;
}

.reviews-container::-webkit-scrollbar {
    height: 8px;
}

.reviews-container::-webkit-scrollbar-track {
    background: var(--dark);
    border-radius: 4px;
}

.reviews-container::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 4px;
}

.review-item {
    flex: 0 0 auto;
    width: 250px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.review-item video,
.review-item img {
    width: 100%;
    height: auto;
    display: block;
}

.review-item video {
    background: #000;
    aspect-ratio: 16 / 9;
    min-height: 180px;
}

/* Gallery styles */
.gallery-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 8px;
}

.gallery-item {
    flex: 1;
    min-width: 0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item video {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    background: #000;
    aspect-ratio: 16 / 9;
    min-height: 180px;
}

.media-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 8px;
    font-size: 12px;
    opacity: 0.9;
}

/* Modal styles */
.zoom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.zoom-content {
    max-width: 95%;
    max-height: 95%;
    position: relative;
}

/* Ensure the video modal always has visible dimensions, even before playback starts */
#videoModal .zoom-content {
    width: min(1100px, 95vw);
    max-height: 90vh;
}

#videoModal #modalVideo {
    width: 100%;
    height: auto;
    max-height: 90vh;
    aspect-ratio: 16 / 9;
    background: #000;
    object-fit: contain;
    display: block;
}

.close-zoom {
    position: absolute;
    top: 15px;
    right: 15px;
    color: white;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
}

.close-zoom:hover {
    color: var(--primary);
}

/* Video modal controls */
.video-modal-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.video-control-btn {
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 20px;
    transition: all 0.3s ease;
}

.video-control-btn:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

/* Staff card animations */
.staff-card, .shift-card {
    opacity: 0;
    transform: translateY(25px);
    animation: fadeUp 0.8s ease-in-out forwards;
    transition: all 0.3s ease;
}

.staff-card:hover, .shift-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Новые стили для раздела "Ընթացք" */
.process-section .about-title {
    font-size: 1.6rem;
}

.process-section .about-text {
    font-size: 0.95rem;
}

.process-section .review-item {
    height: 300px;
}

.process-section .review-item img,
.process-section .review-item video {
    height: 100%;
    object-fit: cover;
}

.process-section .section-subtitle {
    font-size: 1.4rem;
    color: #8BC34A;
    margin: 20px 0 15px;
    text-align: center;
}

/* НОВЫЕ СТИЛИ ДЛЯ КНОПКИ НАЗАД */
.back-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    border: 2px solid var(--primary);
    color: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.back-button:hover {
    transform: scale(1.1);
    background: var(--primary);
    box-shadow: 0 0 20px var(--primary);
}
.lang-switch {
    display: flex;
    gap: 6px;
    padding: 4px 6px;
    background: rgba(0,0,0,0.7);
    border: 2px solid var(--primary);
    border-radius: 999px;
}
.lang-btn {
    border: none;
    background: transparent;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    transition: var(--transition);
}
.lang-btn.active {
    background: var(--primary);
    color: #0b1324;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .hero-section {
        height: 70vh;
        background-attachment: scroll;
    }
    
    .logo img {
        width: 120px;
        height: 120px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .circle {
        width: 60px;
        height: 60px;
    }
    
    .circle i {
        font-size: 18px;
    }
    
    .circle span {
        font-size: 9px;
    }
    
    .about-section {
        padding: 25px 15px;
        margin: 15px 0;
    }
    
    .about-title {
        font-size: 1.5rem;
    }
    
    .about-text {
        font-size: 0.9rem;
    }
    
    .review-item {
        width: 220px;
    }
    
    .review-item video,
    .gallery-item video {
        min-height: 160px;
    }
    
    .process-section .review-item {
        height: 250px;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        left: 0 !important;
    }
    
    .timeline-item::after {
        left: 21px !important;
    }
    
    .timeline-item:nth-child(even)::after {
        left: 21px !important;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 60vh;
    }
    
    .logo img {
        width: 100px;
        height: 100px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .circle {
        width: 55px;
        height: 55px;
    }
    
    .review-item {
        width: 200px;
    }
    
    .process-section .review-item {
        height: 200px;
    }
    
    .review-item video,
    .gallery-item video {
        min-height: 140px;
    }
}

/* Performance optimizations */
img, video {
    max-width: 100%;
    height: auto;
}

/* Touch device optimizations */
@media (hover: none) {
    .circle:hover {
        transform: none;
    }
    
    .circle:active {
        transform: translateY(-5px) scale(0.95);
    }
    
    .value-card:hover {
        transform: none;
    }
    
    .gallery-item:hover {
        transform: none;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
