/* 
   Wersi Web - Shared Components Styles 
   This file handles the premium glassmorphism header, search bar, and mobile navigation.
*/

:root {
    --wersi-orange: #f37021;
    --wersi-gray: #808285;
    --wersi-dark: #4d4d4f;
    --font-main: 'Roboto', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: #333;
    line-height: 1.6;
    background-color: #fff;
    overflow-x: hidden;
    animation: pageFadeIn 0.4s ease-in-out;
}

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

/* Header & Navigation */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    gap: 20px;
}

.logo-box {
    flex: 1;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: 0.3s;
    flex-shrink: 0;
}

.logo-box:hover {
    opacity: 0.8;
}

.logo-box img {
    height: 28px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
    margin: 0;
    padding: 0;
    justify-content: center;
    flex: 2;
    /* Take more space but center content */
}

.nav-menu a {
    color: #111;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    position: relative;
    padding: 10px 0;
    transition: 0.3s;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--wersi-orange);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--wersi-orange);
}

.right-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    justify-content: flex-end;
}

/* --- SEARCH SYSTEM --- */
.search-wrapper {
    position: relative;
    max-width: 100%;
    display: flex;
    justify-content: flex-end;
}

.search-container {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 30px;
    padding: 5px 15px;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 180px;
    max-width: 100%;
}

.search-container:focus-within {
    background: #fff;
    border-color: var(--wersi-orange);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    width: 260px;
    max-width: 100%;
}

.search-container input {
    background: none;
    border: none;
    color: #111;
    padding: 8px 5px;
    flex: 1;
    width: 100%;
    outline: none;
    font-size: 16px; /* Critical: Prevent iOS auto-zoom */
    font-family: var(--font-main);
}

/* On desktop, we can scale it down visually if needed, but 16px is generally fine */
@media (min-width: 1025px) {
    .search-container input {
        font-size: 13px;
    }
}


.search-btn {
    background: none;
    border: none;
    color: var(--wersi-orange);
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.search-btn:hover {
    transform: scale(1.1);
    opacity: 0.8;
}


.search-suggestions {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 300px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 5000;
}

.search-suggestions.active {
    display: flex;
}

.search-item {
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f5f5f5;
    transition: 0.2s;
}

.search-item:hover {
    background: rgba(243, 112, 33, 0.05);
    color: var(--wersi-orange);
}

.search-item span {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: #111;
    transition: 0.3s;
}

.menu-toggle:hover {
    color: var(--wersi-orange);
}

/* Mobile Nav Drawer Enhancements */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(25px);
    z-index: 5000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-menu {
    list-style: none;
    text-align: center;
    padding: 0;
}

.mobile-nav-menu li {
    margin: 25px 0;
    opacity: 0;
    transform: translateY(30px);
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-overlay.active .mobile-nav-menu li {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 32px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    transition: 0.3s;
    display: block;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a.active {
    color: var(--wersi-orange);
}

.close-menu {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotate(-90deg);
}

.mobile-nav-overlay.active .close-menu {
    transform: rotate(0);
}

/* Standard Footer Styles - Comprehensive 4-Column Layout */
footer {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #777;
    padding: 80px 5% 40px;
    font-size: 11px;
    text-align: left;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.f-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.f-col h4 {
    color: white;
    font-size: 12px;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: 1.5px;
}

.f-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.f-col li {
    margin-bottom: 12px;
}

.f-col a {
    color: #888;
    text-decoration: none;
    transition: 0.3s;
}

.f-col a:hover {
    color: var(--wersi-orange);
}

.f-bottom {
    padding-top: 40px;
    border-top: 1px solid #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.f-bottom span {
    opacity: 0.8;
}

@media (max-width: 1024px) {
    header { padding: 0 20px; }
    .nav-menu { display: none; }
    .menu-toggle { display: block; }
    
    .logo-box { flex: 0 0 auto; }
    .right-nav { flex: 1; justify-content: flex-end; }
}

@media (max-width: 480px) {
    .search-container { width: 140px; }
    .search-container:focus-within { width: 180px; }
    .logo-box img { height: 22px; }
}

@media (max-width: 768px) {
    .f-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .f-col[style*="grid-column: span 1"] {
        grid-column: span 2 !important;
        margin-bottom: 20px;
    }

    .f-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 60px 20px 40px;
    }
    .f-top {
        grid-template-columns: 1fr;
    }
    .f-col[style*="grid-column: span 1"] {
        grid-column: span 1 !important;
    }
}

/* --- TOP PROGRESS BAR --- */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--wersi-orange);
    z-index: 10000;
    transition: width 0.4s ease, opacity 0.4s;
    box-shadow: 0 0 10px rgba(243, 112, 33, 0.5);
}

#progress-bar.finished {
    width: 100% !important;
    opacity: 0;
}

/* --- 404 PAGE --- */
.error-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #000;
    color: white;
    padding: 20px;
}

.error-page h1 {
    font-family: var(--font-heading);
    font-size: 120px;
    font-weight: 900;
    margin: 0;
    background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.1;
}

.error-content {
    margin-top: -40px;
}

.error-content h2 {
    font-family: var(--font-heading);
    font-size: 32px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.error-content p {
    color: #888;
    margin-bottom: 30px;
}


/* --- BUTTONS --- */
.btn-manual {
    display: inline-flex;
    align-items: center;
    padding: 18px 55px;
    border: 1px solid var(--wersi-orange);
    color: var(--wersi-orange);
    background: transparent;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 4px;
    font-size: 13px;
    transition: all 0.3s ease;
    margin-top: 30px;
}

.btn-manual:hover {
    background: var(--wersi-orange);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(243, 112, 33, 0.2);
}

/* --- GALLERY --- */
.image-gallery {
    padding: 80px 5%;
    background: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.gallery-grid img {
    width: 100%;
    height: 400px;
    object-fit: contain;
    background: #fcfcfc;
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 20px;
    transition: all 0.3s ease;
}

.gallery-grid img:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    border-color: var(--wersi-orange);
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-grid img {
        height: 250px;
        padding: 10px;
    }
}

/* --- REVEAL ANIMATIONS --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Delay Helpers */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Parallax Background Orb */
.bg-orb {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(243, 112, 33, 0.05) 0%, rgba(243, 112, 33, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    filter: blur(50px);
    transition: transform 0.2s ease-out;
}

/* Ken Burns & Hero Effects */
.hero-img {
    animation: kenBurns 20s infinite alternate ease-in-out;
}

@keyframes kenBurns {
    from { transform: scale(1) translate(0, 0); }
    to { transform: scale(1.1) translate(-1%, -1%); }
}

.text-reveal {
    overflow: hidden;
    display: block;
}

.text-reveal span {
    display: block;
    animation: textSlideUp 1s cubic-bezier(0.2, 1, 0.3, 1) forwards;
    transform: translateY(100%);
}

@keyframes textSlideUp {
    to { transform: translateY(0); }
}

/* Footer Link Underline Effect */
.f-col a {
    position: relative;
    padding-bottom: 2px;
}

.f-col a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--wersi-orange);
    transition: width 0.3s ease;
}

.f-col a:hover::after {
    width: 100%;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s;
    z-index: 2000;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--wersi-orange);
    transform: translateY(-5px);
}