/* Custom styles for Kennedy's Bail Bonds */

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

/* Navbar transition */
#navbar {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
    background-color: rgba(139, 54, 36, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Mobile menu animations */
.mobile-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.75rem;
}

.mobile-link:last-of-type {
    border-bottom: none;
}

/* Geometric background shapes */
.geo-shape {
    position: absolute;
    opacity: 0.15;
    pointer-events: none;
}

.geo-circle-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(228, 143, 98, 0.5) 0%, transparent 70%);
    top: -100px;
    right: -150px;
    border-radius: 50%;
}

.geo-circle-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(252, 203, 150, 0.4) 0%, transparent 70%);
    bottom: 10%;
    left: -100px;
    border-radius: 50%;
}

.geo-circle-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(252, 180, 140, 0.3) 0%, transparent 70%);
    bottom: -200px;
    right: -100px;
    border-radius: 50%;
}

.geo-circle-4 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(252, 203, 150, 0.25) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    border-radius: 50%;
}

.geo-square-1 {
    width: 120px;
    height: 120px;
    border: 3px solid rgba(252, 203, 150, 0.3);
    top: 20%;
    left: 5%;
    transform: rotate(45deg);
    border-radius: 8px;
}

.geo-square-2 {
    width: 80px;
    height: 80px;
    background: rgba(252, 180, 140, 0.3);
    bottom: 15%;
    right: 10%;
    transform: rotate(30deg);
    border-radius: 12px;
}

.geo-square-3 {
    width: 100px;
    height: 100px;
    border: 3px solid rgba(252, 203, 150, 0.2);
    top: 10%;
    right: 20%;
    transform: rotate(20deg);
    border-radius: 8px;
}

.geo-triangle {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 100px solid rgba(228, 143, 98, 0.2);
    top: 60%;
    right: 5%;
    transform: rotate(-15deg);
}

.geo-dots {
    background-image: radial-gradient(circle, rgba(252, 203, 150, 0.4) 1px, transparent 1px);
    background-size: 20px 20px;
    width: 200px;
    height: 200px;
    top: 40%;
    left: 2%;
    border-radius: 50%;
}

.geo-line-accent {
    width: 200px;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(252, 203, 150, 0.4), transparent);
    top: 75%;
    left: 0;
    transform: rotate(-5deg);
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

#back-to-top {
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #C0523A;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #FDF9F3;
}

::-webkit-scrollbar-thumb {
    background: #C0523A;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #A8432E;
}

/* Selection color */
::selection {
    background: #F5B4A0;
    color: #5C2418;
}

/* Mobile menu active state */
#mobile-menu.open {
    display: block;
    animation: slideDown 0.3s ease;
}

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

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

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

#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}
