/**
 * KasusKnacker Component Styles
 *
 * This file contains shared component styles used across the landing site:
 * - Base typography
 * - Button styles (btn-3d)
 * - Animations (float-animation)
 * - Language dropdown
 * - Mobile menu drawer
 */

/* ==========================================================================
   Base Typography
   ========================================================================== */

body {
    font-family: 'Open Sans', sans-serif;
    color: #4E342E;
}

h1,
h2,
h3,
h4 {
    font-family: 'Quicksand', sans-serif;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.btn-3d {
    transition: all 0.1s;
    transform: translateY(0);
}

.btn-3d:active {
    transform: translateY(4px);
    border-bottom-width: 2px !important;
    margin-top: 4px;
}

/* ==========================================================================
   Animations
   ========================================================================== */

.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* ==========================================================================
   Language Dropdown (Desktop)
   ========================================================================== */

.lang-dropdown {
    position: relative;
}

.lang-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 140px;
    z-index: 50;
    overflow: hidden;
}

/* Hover bridge - invisible area that maintains hover state when moving from button to dropdown */
.lang-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
}

.lang-dropdown:hover .lang-dropdown-content {
    display: block;
}

.lang-dropdown-content a {
    display: block;
    padding: 10px 16px;
    color: #4E342E;
    text-decoration: none;
    font-weight: 500;
}

.lang-dropdown-content a:hover {
    background: #F3D5B5;
}

.lang-dropdown-content a.active {
    background: #C18748;
    color: white;
}

/* ==========================================================================
   Mobile Menu Overlay
   ========================================================================== */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 999;
}

/* ==========================================================================
   Mobile Drawer
   ========================================================================== */

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 85%;
    max-width: 320px;
    background: white;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    padding: 24px;
    overflow-y: auto;
    z-index: 1000;
}

/* Mobile Drawer Animations */
.mobile-drawer.opening {
    animation: slideIn 0.3s ease-out forwards;
}

.mobile-drawer.closing {
    animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(100%);
    }
}

/* ==========================================================================
   Mobile Menu Close Button
   ========================================================================== */

.mobile-menu-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 32px;
    line-height: 1;
    color: #4E342E;
    cursor: pointer;
}

/* ==========================================================================
   Mobile Navigation Links
   ========================================================================== */

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 48px;
}

.mobile-nav a {
    color: #4E342E;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    padding: 12px 0;
    border-bottom: 1px solid #F3D5B5;
    transition: color 0.2s;
}

.mobile-nav a:hover {
    color: #C18748;
}

/* ==========================================================================
   Mobile Language Section
   ========================================================================== */

.mobile-lang-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #F3D5B5;
}

.mobile-lang-section h3 {
    font-size: 14px;
    font-weight: bold;
    color: #4E342E;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-lang-section a {
    display: block;
    color: #4E342E;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 0;
    transition: color 0.2s;
}

.mobile-lang-section a:hover {
    color: #C18748;
}

.mobile-lang-section a.active {
    color: #C18748;
    font-weight: bold;
}

/* ==========================================================================
   Mobile CTA Button
   ========================================================================== */

.mobile-cta {
    display: block;
    margin-top: 24px;
    text-align: center;
    background: #C18748;
    color: white;
    padding: 14px 24px;
    border-radius: 20px;
    border-bottom: 4px solid #8f6232;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.1s;
}

.mobile-cta:active {
    transform: translateY(4px);
    border-bottom-width: 2px;
    margin-top: 28px;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

/* ==========================================================================
   How It Works Section
   ========================================================================== */

/* Mobile: horizontal slider */
.hiw-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hiw-grid::-webkit-scrollbar {
    display: none;
}

.hiw-item {
    flex-shrink: 0;
    width: 200px;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hiw-phone {
    background: white;
    padding: 6px;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    border: 4px solid #f1f5f9;
    width: 100%;
    max-width: 160px;
    aspect-ratio: 9/19;
    overflow: hidden;
}

.hiw-phone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1.25rem;
}

.hiw-item p {
    margin-top: 1.25rem;
}

/* Desktop: 4-column grid */
@media (min-width: 768px) {
    .hiw-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
        overflow: visible;
        padding-bottom: 0;
    }

    .hiw-item {
        width: auto;
    }

    .hiw-phone {
        max-width: 220px;
    }

    .hiw-item p {
        margin-top: 1.5rem;
    }
}
