/* Custom CSS for TaxTip Advisory */

/* ===========================
   Global Styles
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDelay {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    50% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.animate-fade-in-delay {
    animation: fadeInDelay 1.5s ease-out forwards;
}

/* Blob Animation */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* ===========================
   Navbar Styles
   =========================== */
#navbar {
    transition: all 0.3s ease;
}

#navbar.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.nav-link {
    position: relative;
    padding-bottom: 5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #d4af37;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ===========================
   Hero Section
   =========================== */
#home {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%);
}

/* ===========================
   Service Cards
   =========================== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
}

/* ===========================
   Form Styles
   =========================== */
input:focus,
textarea:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* ===========================
   Button Styles
   =========================== */
button,
a.btn {
    cursor: pointer;
    transition: all 0.3s ease;
}

button:active,
a.btn:active {
    transform: scale(0.98);
}

/* ===========================
   Scroll to Top Button
   =========================== */
#scroll-top {
    transition: all 0.3s ease;
    z-index: 1000;
}

#scroll-top.show {
    opacity: 1;
    pointer-events: all;
}

#scroll-top:hover {
    transform: translateY(-3px);
}

/* ===========================
   Utilities
   =========================== */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.bg-overlay {
    position: relative;
}

.bg-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* ===========================
   Responsive Adjustments
   =========================== */
@media (max-width: 768px) {
    .service-card {
        margin-bottom: 1rem;
    }
    
    .animate-fade-in,
    .animate-fade-in-delay {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ===========================
   Loading Animation
   =========================== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ===========================
   Custom Scrollbar
   =========================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b8941f;
}

/* ===========================
   Focus Visible for Accessibility
   =========================== */
*:focus-visible {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

/* ===========================
   Print Styles
   =========================== */
@media print {
    .no-print,
    nav,
    footer,
    #scroll-top {
        display: none !important;
    }
}

/* ===========================
   Selection Color
   =========================== */
::selection {
    background-color: #d4af37;
    color: #0f172a;
}

::-moz-selection {
    background-color: #d4af37;
    color: #0f172a;
}

/* ===========================
   Smooth Image Loading
   =========================== */
img {
    transition: opacity 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}

img[src] {
    opacity: 1;
}

/* ===========================
   Card Hover Effects
   =========================== */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ===========================
   Gradient Text
   =========================== */
.gradient-text {
    background: linear-gradient(135deg, #1e3a8a 0%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===========================
   Badge Styles
   =========================== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-gold {
    background-color: #f5e6c8;
    color: #d4af37;
}

/* ===========================
   Section Dividers
   =========================== */
.section-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #d4af37, transparent);
    margin: 2rem auto;
    max-width: 300px;
}

/* ===========================
   Icon Animations
   =========================== */
@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.icon-bounce:hover {
    animation: iconBounce 0.6s ease-in-out;
}

/* ===========================
   Link Underline Animation
   =========================== */
.link-underline {
    position: relative;
    text-decoration: none;
}

.link-underline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.link-underline:hover::after {
    width: 100%;
}

/* ===========================
   Skeleton Loading
   =========================== */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background-color: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0, #f0f0f0, #e0e0e0);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* ===========================
   Mobile Menu Animation
   =========================== */
#mobile-menu {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu.show {
    max-height: 500px;
    opacity: 1;
}

/* ===========================
   Responsive Typography
   =========================== */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
        line-height: 2.5rem;
    }
    
    h2 {
        font-size: 1.75rem;
        line-height: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
        line-height: 1.75rem;
    }
}

/* ===========================
   Accessibility Improvements
   =========================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===========================
   Dark Mode Support (Optional)
   =========================== */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* ===========================
   High Contrast Mode
   =========================== */
@media (prefers-contrast: high) {
    .service-card,
    .nav-link {
        border: 2px solid currentColor;
    }
}

/* ===========================
   Reduced Motion Support
   =========================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
