/* ======================================
   Uğurlu Metal - Custom Styles
   ====================================== */

/* ---- Horizontal Timeline (Zigzag) ---- */
.htl-wrapper {
    position: relative;
    overflow: visible;
}

/* Container holding items in a row */
.htl-scroll {
    display: flex;
    justify-content: center;
    align-items: stretch;
    position: relative;
    padding: 0 40px;
    height: calc(100vh - 200px);
    min-height: 380px;
}

/* The horizontal connecting line — centered vertically */
.htl-line {
    position: absolute;
    top: 50%;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #E2E4E6;
    transform: translateY(-50%);
    z-index: 0;
}
.htl-line-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #98001b;
    transition: width 2s ease-out;
}
.htl-wrapper.animated .htl-line-fill {
    width: 100%;
}

/* Each timeline item — takes equal width */
.htl-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    height: 100%;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* UP items: content above the line */
.htl-item.up {
    transform: translateY(-20px);
}
.htl-item.up .htl-content {
    order: 1;
    margin-bottom: 8px;
}
.htl-item.up .htl-spacer {
    order: 2;
    flex: 1;
}

/* DOWN items: content below the line */
.htl-item.down {
    transform: translateY(20px);
}
.htl-item.down .htl-spacer {
    order: 1;
    flex: 1;
}
.htl-item.down .htl-content {
    order: 2;
    margin-top: 8px;
}

/* Spacer fills half */
.htl-spacer { display: block; }

/* Visible state */
.htl-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays */
.htl-item:nth-child(1) { transition-delay: 0.15s; }
.htl-item:nth-child(2) { transition-delay: 0.3s; }
.htl-item:nth-child(3) { transition-delay: 0.45s; }
.htl-item:nth-child(4) { transition-delay: 0.6s; }
.htl-item:nth-child(5) { transition-delay: 0.75s; }
.htl-item:nth-child(6) { transition-delay: 0.9s; }
.htl-item:nth-child(7) { transition-delay: 1.05s; }
.htl-item:nth-child(8) { transition-delay: 1.2s; }

/* Content block (image + year + text) */
.htl-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Circular image */
.htl-img {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    border: 3px solid #E2E4E6;
    background-size: cover;
    background-position: center;
    margin-bottom: 6px;
    flex-shrink: 0;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.htl-item:hover .htl-img {
    border-color: #98001b;
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(152, 0, 27, 0.2);
}

/* Dot on the line */
.htl-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #98001b;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: background 0.3s ease, transform 0.3s ease;
}
.htl-item:hover .htl-dot {
    background: #98001b;
    transform: translate(-50%, -50%) scale(1.15);
}

/* Year label */
.htl-year {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: #98001b;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

/* Description text */
.htl-desc {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 1.45;
    color: #5F6266;
    text-align: center;
    padding: 0 4px;
    max-width: 155px;
}

/* Spacer fills the other half */
.htl-spacer {
    min-height: 10px;
}

/* Clickable images */
.htl-img {
    cursor: pointer;
}

/* Image Lightbox Modal */
.htl-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
}
.htl-lightbox.active {
    opacity: 1;
    visibility: visible;
}
.htl-lightbox-img {
    max-width: 80vw;
    max-height: 80vh;
    border-radius: 4px;
    border: 4px solid #ffffff;
    object-fit: cover;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.htl-lightbox.active .htl-lightbox-img {
    transform: scale(1);
}
.htl-lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    color: #ffffff;
    font-size: 36px;
    cursor: pointer;
    background: none;
    border: none;
    transition: transform 0.2s ease;
    z-index: 10000;
}
.htl-lightbox-close:hover {
    transform: scale(1.2);
}
.htl-lightbox-year {
    position: absolute;
    bottom: 10%;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

/* No scroll arrows needed — fits on screen */
.htl-arrow { display: none; }

/* Mobile: horizontal scroll with all items on same side */
@media (max-width: 768px) {
    .htl-scroll {
        justify-content: flex-start;
        overflow-x: auto;
        scroll-behavior: smooth;
        -ms-overflow-style: none;
        scrollbar-width: none;
        padding: 0 20px;
        min-height: 320px;
    }
    .htl-scroll::-webkit-scrollbar { display: none; }
    .htl-line {
        left: 20px;
        right: 20px;
    }
    .htl-item {
        flex: 0 0 140px;
        height: 320px;
    }
    /* On mobile, all items go below the line */
    .htl-item.up .htl-content { order: 3; margin-bottom: 0; margin-top: 12px; }
    .htl-item.up .htl-spacer { order: 1; }
    .htl-item.up .htl-dot { order: 2; }
    .htl-img {
        width: 60px;
        height: 60px;
    }
    .htl-desc {
        font-size: 11px;
        max-width: 130px;
    }
    .htl-arrow {
        display: flex;
        width: 32px;
        height: 32px;
    }
    .htl-arrow.left { left: 4px; }
    .htl-arrow.right { right: 4px; }
}

/* ---- Hero Slider ---- */
.hero-slider {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 500px;
    max-height: 900px;
    overflow: hidden;
}

/* Slide background images */
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

/* Ken Burns subtle zoom effect on active slide */
.hero-slide.active {
    animation: kenBurns 8s ease-in-out forwards;
}
@keyframes kenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.06); }
}

/* Semi-transparent red overlay */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(152, 0, 27, 0.82) 0%,
        rgba(26, 28, 30, 0.75) 100%
    );
    z-index: 2;
}

/* Content area on top of overlay */
.hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Animated text - each slide has its own text */
.hero-slide-text {
    display: none;
    opacity: 0;
}
.hero-slide-text.active {
    display: block;
    animation: slideTextIn 0.8s ease-out forwards;
}

@keyframes slideTextIn {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation for child elements */
.hero-slide-text.active .hero-anim-1 {
    animation: slideTextIn 0.7s ease-out 0.1s both;
}
.hero-slide-text.active .hero-anim-2 {
    animation: slideTextIn 0.7s ease-out 0.25s both;
}
.hero-slide-text.active .hero-anim-3 {
    animation: slideTextIn 0.7s ease-out 0.4s both;
}

/* Slide navigation dots */
.hero-dots {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: 12px;
}
.hero-dot {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.6);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}
.hero-dot.active {
    background: #ffffff;
    border-color: #ffffff;
}
.hero-dot:hover {
    border-color: #ffffff;
}

/* Progress bar */
.hero-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #BE1E2D;
    z-index: 5;
    width: 0%;
    transition: none;
}
.hero-progress.running {
    width: 100%;
    transition: width linear;
}

/* CTA buttons in hero - always visible */
.hero-cta {
    position: relative;
    z-index: 4;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
@media (prefers-reduced-motion: no-preference) {
    .js-ready .reveal:not(.active) {
        opacity: 0;
        transform: translateY(30px);
    }
    .js-ready .reveal.active {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Timeline Vertical Line */
.timeline-line::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: #E2E4E6;
    z-index: 0;
}
@media (max-width: 768px) {
    .timeline-line::before {
        left: 24px;
        transform: none;
    }
}

/* Material Symbols */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.material-symbols-outlined.fill {
    font-variation-settings: 'FILL' 1;
}

/* Mobile Menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}
.mobile-menu.open {
    transform: translateX(0);
}
.mobile-menu-overlay {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.15);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 2px 2px 15px rgba(0,0,0,0.25);
}
.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: #fff;
}

/* Active Navigation Link */
.nav-active {
    color: #98001b !important;
    border-bottom: 3px solid #98001b;
    padding-bottom: 4px;
}

/* Form Success/Error Messages */
.form-message {
    display: none;
    padding: 16px;
    margin-top: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}
.form-message.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.form-message.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 44px;
    height: 44px;
    background-color: #191c1d;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
    border: none;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background-color: #98001b;
}
