/* Middleton Marine - Parts | Additional custom styles */

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Selection color */
::selection {
    background: rgba(201, 162, 39, 0.3);
    color: #F5F5F5;
}

/* Focus visible styles */
*:focus-visible {
    outline: 2px solid #C9A227;
    outline-offset: 2px;
}

/* Subtle grain texture overlay on body */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.02;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Ensure all anchor links have consistent appearance */
a {
    text-decoration: none;
}

/* Prevent images from overflowing containers */
img {
    max-width: 100%;
    height: auto;
}

/* Reduced motion - ensure content is visible even without JS */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    .hero-animate,
    .hero-animate-delay,
    .hero-animate-delay2 {
        animation: none;
        opacity: 1;
    }
}

/* Print styles */
@media print {
    nav, .mobile-menu, #menuOverlay, .wave-divider {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
    .hero-bg {
        background: #1A1A1A !important;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .service-card {
        padding: 1.5rem;
    }

    /* Stack the about section image accent */
    #about .relative > .absolute {
        display: none;
    }
}

/* Large screen optimizations */
@media (min-width: 1280px) {
    .service-card {
        padding: 2rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover {
        transform: none;
        border-color: rgba(201, 162, 39, 0.15);
    }
    .btn-gold:hover,
    .btn-coral:hover {
        transform: none;
    }
    .relative.group:hover .group-hover\:scale-110 {
        transform: none;
    }
}
