/* ============================================
   South Texas Roofing — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #c8a45e;
    color: #0a1628;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    transition: background-color 0.5s ease, padding 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(10, 22, 40, 0.97);
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #c8a45e;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Navbar logo colors */
#navbar .nav-logo-color {
    stroke: rgba(255, 255, 255, 0.7);
    transition: stroke 0.3s ease;
}

#navbar .nav-logo-fill {
    fill: rgba(255, 255, 255, 0.7);
    transition: fill 0.3s ease;
}

#navbar .nav-logo-text {
    color: rgba(255, 255, 255, 0.9);
}

#navbar .nav-logo-sub {
    color: rgba(255, 255, 255, 0.5);
}

#navbar.scrolled .nav-logo-color {
    stroke: rgba(255, 255, 255, 0.8);
}

#navbar.scrolled .nav-logo-fill {
    fill: #c8a45e;
}

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

#navbar.scrolled .nav-logo-sub {
    color: rgba(255, 255, 255, 0.5);
}

/* Mobile menu states */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu .mobile-link {
    transform: translateY(0);
    opacity: 1;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Hamburger animation */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 6px;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

.service-icon-stroke {
    stroke: #c8a45e;
    transition: stroke 0.3s ease;
}

.service-icon-fill {
    fill: none;
    stroke: #c8a45e;
    transition: fill 0.3s ease;
}

.service-card:hover .service-icon-fill {
    fill: rgba(200, 164, 94, 0.15);
}

/* ============================================
   Gallery
   ============================================ */
.gallery-item {
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    transition: border-color 0.4s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    border-color: rgba(200, 164, 94, 0.4);
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ============================================
   Form Styles
   ============================================ */
select option {
    background-color: #0a1628;
    color: #ffffff;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.2;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
