/* ===== Base & Typography ===== */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: rgba(200, 150, 62, 0.25);
    color: #0B1D3A;
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(11, 29, 58, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #C8963E;
    border-radius: 1px;
    transition: width 0.25s ease;
}

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

#navbar.scrolled .nav-link {
    color: #0F2847;
}

/* ===== Floating Cards ===== */
.floating-card-1 {
    animation: float1 5s ease-in-out infinite;
}

.floating-card-2 {
    animation: float2 6s ease-in-out infinite;
}

.floating-card-3 {
    animation: float3 5.5s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.5deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(-0.5deg); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(0.5deg); }
}

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

/* ===== Gallery ===== */
.gallery-item {
    cursor: pointer;
    transition: transform 0.4s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

/* ===== Testimonials ===== */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }

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

/* ===== Mobile Menu ===== */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

.mobile-link {
    display: block;
    transition: color 0.2s ease;
}

.mobile-link:hover {
    color: #C8963E;
}

/* ===== Menu Icon Animation ===== */
#menu-icon span:nth-child(1) {
    transform-origin: center;
}

#menu-icon span:nth-child(2) {
    transform-origin: center;
}

#menu-icon span:nth-child(3) {
    transform-origin: center;
}

body.menu-open #menu-icon span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

body.menu-open #menu-icon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

body.menu-open #menu-icon span:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* ===== Input Focus ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ===== Smooth Scroll Offset ===== */
section[id] {
    scroll-margin-top: 80px;
}

/* ===== Button Ripple-like hover ===== */
a, button {
    -webkit-tap-highlight-color: transparent;
}

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

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

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

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