/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: -60px;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.35);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.scroll-to-top.visible {
    bottom: 2rem;
}

.scroll-to-top:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 10px 30px rgba(201, 169, 97, 0.45);
}

.scroll-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

/* Enhanced Logo Styling */
.logo-img {
    height: 50px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(1) drop-shadow(0 2px 8px rgba(0,0,0,0.1));
}

.logo a:hover .logo-img {
    filter: brightness(1.1) drop-shadow(0 4px 12px rgba(201, 169, 97, 0.3));
}

/* Enhanced Mobile Menu Button */
.mobile-menu-toggle {
    background: transparent;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(201, 169, 97, 0.15);
    transform: scale(1.1);
}

.mobile-menu-toggle:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Smooth Body Scroll */
body {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Enhanced Focus States for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Improved Link Hover States */
.main-nav a:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: -2px;
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Apply animations to elements */
.hero-content h2 {
    animation: fadeInUp 0.8s ease-out;
}

.hero-content p {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.btn {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Enhanced Button States */
.btn:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

/* Improved Card Shadows */
.category-card,
.project-card,
.project-item {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.category-card:hover,
.project-card:hover,
.project-item:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(201, 169, 97, 0.15);
}

/* Improved Text Selection */
::selection {
    background: var(--secondary-color);
    color: var(--white);
}

::-moz-selection {
    background: var(--secondary-color);
    color: var(--white);
}

/* Smooth Transitions for All Interactive Elements */
button,
a,
input,
textarea,
select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Responsive Typography */
@media (max-width: 768px) {
    .scroll-to-top {
        width: 45px;
        height: 45px;
        right: 1.5rem;
        bottom: -55px;
        font-size: 1.1rem;
    }
    
    .scroll-to-top.visible {
        bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        width: 40px;
        height: 40px;
        right: 1rem;
        font-size: 1rem;
    }
    
    .scroll-to-top.visible {
        bottom: 1rem;
    }
}

/* Print Styles */
@media print {
    .scroll-to-top,
    .mobile-menu-toggle {
        display: none !important;
    }
}
