/* Additional improvements for better UX/UI */

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

/* Focus styles for better accessibility */
a:focus,
button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Improved button hover effects */
.btn-primary,
.btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Enhanced card hover effects */
.box-hover {
    transition: all 0.3s ease;
}

.box-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Improved social icons */
.home-icons {
    transition: all 0.3s ease;
    cursor: pointer;
}

.home-icons:hover {
    transform: scale(1.2) rotate(5deg);
}

/* Better image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Enhanced navigation */
nav a {
    position: relative;
    transition: all 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #3b82f6;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav a:hover::after {
    width: 100%;
}

/* Improved section spacing */
section {
    scroll-margin-top: 80px;
}

/* Better responsive design */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
        margin: 0.5rem auto;
    }
}

/* Enhanced contact buttons */
.btn-contact {
    transition: all 0.3s ease;
    border-radius: 12px;
}

.btn-contact:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Improved typography */
h1,
h2,
h3 {
    line-height: 1.2;
}

p {
    line-height: 1.6;
}

/* Better color contrast */
.primary-text {
    color: #1e40af;
}

/* Enhanced animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Improved loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Better mobile navigation */
@media (max-width: 640px) {
    nav {
        padding: 0.5rem 1rem;
    }

    .home-icons {
        font-size: 2rem;
    }
}

/* Enhanced accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Improved focus indicators for keyboard navigation */
*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Better print styles */
@media print {

    .btn-primary,
    .btn-secondary,
    .btn-contact {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .bg-slate-100 {
        background: white;
    }
}

/* Slower hover for hover-text elements */
.hover-title {
    transition: color 0.6s ease;
}

/* Animation for blue and black color cycling */
@keyframes blueBlackPulse {
    0% {
        color: #000000;
        /* Blue */
    }

    25% {
        color: #000000;
        /* Black */
    }

    50% {
        color: #1354bd;
        /* Blue */
    }

    75% {
        color: #1354bd;
        /* Black */
    }

    100% {
        color: #1D4ED8;
        /* Blue - final color */
    }
}

/* Logo spinning animation - backup in case Tailwind doesn't load */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.circle-logo img {
    animation: spin 3s linear infinite;
}

/* Ensure the logo is visible and spinning */
.circle-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

.circle-logo img {
    transition: transform 0.3s ease;
}

.circle-logo img:hover {
    transform: scale(1.1);
}

/* Apply the animation to hover-text elements */
.hover-title {
    animation: blueBlackPulse 3s ease-in-out forwards;
    transition: color 0.8s ease;
}

/* Optional: Pause animation on hover for better UX */
title.hover-title:hover {
    animation-play-state: paused;
}