/* ========================================
   Juan A Lara Saddlery — Custom Styles
   ======================================== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: #7B2D3B;
    color: #fefcfb;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #d47a8a;
    outline-offset: 2px;
}

/* Nav styles */
.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
    background-color: transparent;
}

.nav-fixed.scrolled {
    background-color: rgba(254, 252, 251, 0.97);
    box-shadow: 0 1px 12px rgba(123, 45, 59, 0.08);
    backdrop-filter: blur(8px);
}

/* Mobile nav toggle animation */
.nav-toggle svg line:nth-child(1) {
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}
.nav-toggle svg line:nth-child(2) {
    transition: opacity 0.3s ease;
    opacity: 1;
}
.nav-toggle svg line:nth-child(3) {
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}
.nav-toggle.active svg line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.nav-toggle.active svg line:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active svg line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile nav open state */
#mobile-menu.open {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Image hover effects */
.group img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Button ripple-like effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Subtle grain texture on cream backgrounds */
.bg-cream-50::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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)' opacity='0.02'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* Ensure sections with relative backgrounds have content above pseudo */
section[aria-label] > div {
    position: relative;
    z-index: 1;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf6f2;
}
::-webkit-scrollbar-thumb {
    background: #d4c0a0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b55266;
}

/* Print styles */
@media print {
    .nav-fixed, .nav-toggle, #mobile-menu { display: none !important; }
    body { background: white !important; color: black !important; }
    section { page-break-inside: avoid; }
}
