/* ============================================
   G&G Marine Electronics — Custom Styles
   ============================================ */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(15, 76, 92, 0.2);
    color: #0f4c5c;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* --- Section Labels --- */
.section-label {
    position: relative;
    display: inline-block;
}

.section-label::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: #0f4c5c;
    border-radius: 50%;
    opacity: 0.4;
}

/* --- Section Titles --- */
.section-title {
    position: relative;
}

/* --- Section Underline --- */
.section-underline {
    position: relative;
}

.section-underline::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0f4c5c, #4db8c8);
    transition: width 0.6s ease;
}

/* --- Scroll Animations --- */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Hero Animations --- */
.hero-anim {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-anim.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Section Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* --- Scroll Down Animation --- */
@keyframes scrollDown {
    0% {
        top: 0;
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

.animate-scroll-down {
    animation: scrollDown 1.5s ease-in-out infinite;
}

/* --- Navbar Transition --- */
#navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

#navbar.scrolled .nav-logo-text {
    color: #ffffff;
}

/* --- Mobile Menu --- */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }

/* --- Mobile Menu Button Active State --- */
#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}
#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section-label::before {
        display: none;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
}

/* --- Focus Styles --- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #146374;
    outline-offset: 2px;
}

/* --- Print Styles --- */
@media print {
    header, footer, #contact-form, .section-underline {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
