/* ============================================
   CHILDREN'S BOOKNEST - CATEGORIES PAGE
   Premium Storybook Library Edition v2
   ============================================ */

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {

    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   GPU LAYER OPTIMIZATIONS
   ============================================ */
.hero,
#categories,
.site-footer {
    contain: layout paint;
}

.hero-bg,
.hero-content,
.hero-title,
.hero-subtitle,
.hero-actions,
.section-header,
.service-card,
.service-image,
.service-image img,
.service-title,
.service-desc,
.link-arrow,
.site-footer::before {
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ============================================
   HERO SECTION — MAGICAL STORYBOOK
   ============================================ */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: var(--space-8) 0 var(--space-6);
    background: linear-gradient(135deg, #FFF8F0 0%, #FFECD2 30%, #FFE4C4 60%, #FFF0E0 100%);
}

/* Layered background */
.hero .hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1519681393784-d120267933ba?w=1920&h=1080&fit=crop');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero .hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 248, 240, 0.75) 0%,
        rgba(255, 235, 205, 0.65) 40%,
        rgba(255, 228, 196, 0.55) 70%,
        rgba(255, 240, 220, 0.6) 100%
    );
    z-index: 1;
}

/* Decorative blurred circles */
.hero .hero-bg::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.12), transparent 70%);
    border-radius: 50%;
    top: -150px;
    right: -100px;
    filter: blur(60px);
    animation: blobFloat 18s ease-in-out infinite;
    z-index: 1;
}

/* Second blob */
.hero::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(183, 142, 255, 0.1), transparent 70%);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
    filter: blur(50px);
    animation: blobFloat 18s ease-in-out infinite 6s;
    z-index: 1;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.08); }
    50% { transform: translate(-20px, 15px) scale(0.95); }
    75% { transform: translate(15px, 25px) scale(1.05); }
}

/* Floating particles / stars */
.hero .hero-container::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background-image:
        radial-gradient(circle, #FFD700 2.5px, transparent 2.5px),
        radial-gradient(circle, #FF6B9D 2px, transparent 2px),
        radial-gradient(circle, #4ECDC4 2.5px, transparent 2.5px),
        radial-gradient(circle, #FFE66D 2px, transparent 2px),
        radial-gradient(circle, #FF8C42 2.5px, transparent 2.5px),
        radial-gradient(circle, #C7F464 2px, transparent 2px),
        radial-gradient(circle, #FF6B6B 2.5px, transparent 2.5px),
        radial-gradient(circle, #4ECDC4 2px, transparent 2px),
        radial-gradient(circle, #FFD93D 2.5px, transparent 2.5px),
        radial-gradient(circle, #FF8C94 2px, transparent 2px),
        radial-gradient(circle, #B78EFF 2px, transparent 2px),
        radial-gradient(circle, #87CEEB 2.5px, transparent 2.5px);
    background-size:
        160px 160px,
        200px 200px,
        140px 140px,
        180px 180px,
        220px 220px,
        170px 170px,
        190px 190px,
        150px 150px,
        210px 210px,
        130px 130px,
        240px 240px,
        165px 165px;
    background-position:
        5% 15%, 85% 10%, 25% 55%, 70% 45%, 15% 80%, 60% 30%,
        40% 5%, 90% 70%, 55% 85%, 10% 40%, 75% 25%, 35% 75%;
    animation: particleDrift 20s linear infinite;
    opacity: 0.6;
}

@keyframes particleDrift {
    0% {
        background-position:
            5% 15%, 85% 10%, 25% 55%, 70% 45%, 15% 80%, 60% 30%,
            40% 5%, 90% 70%, 55% 85%, 10% 40%, 75% 25%, 35% 75%;
    }
    50% {
        background-position:
            8% 18%, 82% 13%, 28% 52%, 67% 48%, 18% 77%, 57% 33%,
            43% 8%, 87% 67%, 58% 82%, 13% 43%, 72% 28%, 38% 72%;
    }
    100% {
        background-position:
            5% 15%, 85% 10%, 25% 55%, 70% 45%, 15% 80%, 60% 30%,
            40% 5%, 90% 70%, 55% 85%, 10% 40%, 75% 25%, 35% 75%;
    }
}

/* Floating clouds */
.hero::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 40px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    top: 20%;
    left: -150px;
    z-index: 2;
    pointer-events: none;
    box-shadow:
        300px 60px 0 rgba(255, 255, 255, 0.3),
        600px -30px 0 rgba(255, 255, 255, 0.25),
        900px 50px 0 rgba(255, 255, 255, 0.2);
    animation: cloudFloat 35s linear infinite;
}

@keyframes cloudFloat {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(100vw + 300px)); }
}

/* Floating decorative elements in hero */
.hero-float {
    position: absolute;
    pointer-events: none;
    z-index: 3;
    animation: floatDrift 12s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.05));
}

.hero-float-1 { top: 15%; left: 8%; font-size: 24px; animation-delay: 0s; }
.hero-float-2 { top: 25%; right: 12%; font-size: 20px; animation-delay: 2s; }
.hero-float-3 { bottom: 20%; left: 15%; font-size: 28px; animation-delay: 4s; }
.hero-float-4 { top: 10%; right: 25%; font-size: 22px; animation-delay: 1s; }
.hero-float-5 { bottom: 30%; right: 8%; font-size: 26px; animation-delay: 3s; }
.hero-float-6 { top: 50%; left: 5%; font-size: 30px; animation-delay: 5s; }

@keyframes floatDrift {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(3deg); }
    50% { transform: translateY(-8px) rotate(-2deg); }
    75% { transform: translateY(-20px) rotate(5deg); }
}

.hero-content {
    position: relative;
    z-index: 4;
    max-width: 700px;
}

/* Hero Badge */
.hero-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-secondary);
    background: rgba(45, 106, 79, 0.1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-3);
    border: 1px solid rgba(45, 106, 79, 0.15);
    animation: fadeInUp 0.6s ease-out both;
}

/* Hero Title */
.hero-title {
    font-family: var(--font-heading);
    font-size: 64px;
    line-height: 1.1;
    color: #1a3c5a;
    margin-bottom: var(--space-3);
    text-shadow: 0 2px 20px rgba(26, 60, 90, 0.08);
    animation: heroTitleReveal 1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    position: relative;
}

@keyframes heroTitleReveal {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
        clip-path: inset(100% 0 0 0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        clip-path: inset(0 0 0 0);
    }
}

.hero-title::after {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -20px;
    font-size: 32px;
    animation: sparkleWiggle 2.5s ease-in-out infinite;
    opacity: 0.8;
}

@keyframes sparkleWiggle {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(15deg) scale(1.2); }
    75% { transform: rotate(-15deg) scale(1.2); }
}

/* Hero Subtitle */
.hero-subtitle {
    font-size: 20px;
    line-height: 1.8;
    color: #1e4d5c;
    max-width: 600px;
    margin-bottom: var(--space-5);
    animation: fadeInUp 0.8s ease-out 0.4s both;
    font-weight: 400;
}

/* Hero Actions */
.hero-actions {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-actions .btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    border: none;
    height: 56px;
    padding: 0 var(--space-5);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 18px;
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 107, 53, 0.1);
    transition: all var(--transition-bounce);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    position: relative;
    overflow: hidden;
}

.hero-actions .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
}

.hero-actions .btn-primary:hover::before {
    left: 150%;
}

.hero-actions .btn-primary:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(255, 107, 53, 0.2);
    background: linear-gradient(135deg, #F7931E 0%, var(--color-primary) 100%);
}

.hero-actions .btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.hero-actions .btn-primary span {
    transition: transform var(--transition-fast);
    display: inline-block;
}

.hero-actions .btn-primary:hover span {
    transform: translateX(6px);
}

/* Scroll indicator */
.hero .hero-container .hero-content::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z' fill='%231a3c5a'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    animation: scrollBounce 2s ease-in-out infinite;
    opacity: 0.5;
    cursor: pointer;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
    50% { transform: translateX(-50%) translateY(10px); opacity: 0.2; }
}

/* ============================================
   SECTION HEADER — CATEGORIES
   ============================================ */
#categories {
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-white) 50%, var(--color-bg) 100%);
    position: relative;
    overflow: hidden;
    padding: var(--space-8) 0;
}

/* Floating decorative elements */
.cat-float {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    animation: floatDrift 14s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.04));
}

.cat-float-1 { top: 5%; right: 6%; font-size: 24px; animation-delay: 0s; }
.cat-float-2 { top: 15%; left: 4%; font-size: 20px; animation-delay: 2s; }
.cat-float-3 { bottom: 25%; left: 8%; font-size: 28px; animation-delay: 4s; }
.cat-float-4 { top: 8%; right: 20%; font-size: 22px; animation-delay: 1s; }
.cat-float-5 { bottom: 15%; right: 10%; font-size: 26px; animation-delay: 3s; }
.cat-float-6 { top: 40%; left: 3%; font-size: 18px; animation-delay: 5s; }
.cat-float-7 { bottom: 35%; right: 5%; font-size: 24px; animation-delay: 1.5s; }
.cat-float-8 { top: 60%; left: 12%; font-size: 20px; animation-delay: 3.5s; }

/* Section badge */
#categories .section-badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-secondary);
    background: rgba(45, 106, 79, 0.08);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-3);
    border: 1px solid rgba(45, 106, 79, 0.12);
    animation: fadeInUp 0.6s ease-out both;
    position: relative;
    z-index: 2;
}

#categories .section-badge::after {
    content: '✦';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--color-primary);
    opacity: 0.4;
    animation: badgeSparkle 3s ease-in-out infinite;
}

@keyframes badgeSparkle {
    0%, 100% { opacity: 0.2; transform: translateY(-50%) scale(0.8); }
    50% { opacity: 0.6; transform: translateY(-50%) scale(1.2); }
}

/* Section title */
#categories .section-title {
    font-size: 48px;
    margin-bottom: var(--space-3);
    color: var(--color-dark);
    animation: fadeInUp 0.7s ease-out 0.1s both;
    position: relative;
    z-index: 2;
}

#categories .section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), #F7931E);
    border-radius: 2px;
    margin: var(--space-3) auto 0;
    position: relative;
    overflow: hidden;
}

#categories .section-desc {
    font-size: 18px;
    color: var(--color-text-light);
    max-width: 550px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    position: relative;
    z-index: 2;
}

/* ============================================
   CATEGORY CARDS — PREMIUM STORYBOOK
   ============================================ */
#categories .grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    position: relative;
    z-index: 2;
}

/* Premium storybook card */
.service-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    /* Scroll reveal initial state */
    opacity: 0;
    transform: translateY(60px) scale(0.95);
}

.service-card.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Gradient border glow */
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(183, 142, 255, 0.1), rgba(45, 106, 79, 0.08));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.service-card:hover::before {
    opacity: 1;
}

/* Shine sweep effect */
.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
    pointer-events: none;
    z-index: 3;
}

.service-card:hover::after {
    left: 150%;
}

/* Card hover lift + shadow expansion */
.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-card-hover);
}

/* ============================================
   CATEGORY IMAGE — PREMIUM PRESENTATION
   ============================================ */
.service-image {
    height: 220px;
    margin-bottom: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.service-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.service-card:hover .service-image::before {
    opacity: 1;
}

/* Image overlay with book count */
.service-image-overlay {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 2;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition-base);
}

.service-card:hover .service-image-overlay {
    opacity: 1;
    transform: translateY(0);
}

.service-image-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-white);
    background: rgba(255, 107, 53, 0.85);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Decorative frame border */
.service-image::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: calc(var(--radius-md) - 4px);
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.service-card:hover .service-image::after {
    opacity: 1;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
    display: block;
}

.service-card:hover .service-image img {
    transform: scale(1.1) rotate(-1deg);
    filter: brightness(1.08);
}

/* ============================================
   CARD CONTENT
   ============================================ */
.service-content {
    padding: var(--space-3) var(--space-3) var(--space-3);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Category icon */
.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(247, 147, 30, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: var(--space-2);
    transition: all var(--transition-bounce);
    border: 1px solid rgba(255, 107, 53, 0.1);
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotate(-8deg);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(247, 147, 30, 0.12));
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.1);
}

.service-card .service-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: var(--space-2);
    color: var(--color-dark);
    transition: color var(--transition-fast);
    position: relative;
    z-index: 2;
}

.service-card:hover .service-title {
    color: var(--color-primary);
}

.service-card .service-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--space-3);
    color: var(--color-text-light);
    position: relative;
    z-index: 2;
    flex-grow: 1;
}

/* Link arrow — premium micro-interactions */
.service-card .link-arrow {
    align-self: flex-start;
    font-weight: 700;
    color: var(--color-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 2;
    transition: all var(--transition-fast);
    font-size: 15px;
}

.service-card .link-arrow::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
    border-radius: 1px;
    transition: width var(--transition-base);
}

.service-card:hover .link-arrow {
    color: var(--color-primary);
    gap: 10px;
}

.service-card:hover .link-arrow::after {
    width: 100%;
}

.service-card .link-arrow span {
    transition: transform var(--transition-bounce);
    display: inline-block;
}

.service-card:hover .link-arrow span {
    transform: translateX(8px);
}

/* Magic particle on hover */
.service-card .magic-particle {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 14px;
    color: var(--color-primary);
    opacity: 0;
    z-index: 4;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.service-card:hover .magic-particle {
    animation: particleAppear 0.6s ease both;
}

@keyframes particleAppear {
    0% { opacity: 0; transform: translateY(10px) scale(0.5); }
    100% { opacity: 0.6; transform: translateY(0) scale(1); }
}

/* ============================================
   STAGGERED ENTRANCE ANIMATIONS
   ============================================ */
.service-card:nth-child(1).is-visible { transition-delay: 0.1s; }
.service-card:nth-child(2).is-visible { transition-delay: 0.2s; }
.service-card:nth-child(3).is-visible { transition-delay: 0.3s; }
.service-card:nth-child(4).is-visible { transition-delay: 0.4s; }
.service-card:nth-child(5).is-visible { transition-delay: 0.5s; }
.service-card:nth-child(6).is-visible { transition-delay: 0.6s; }
.service-card:nth-child(7).is-visible { transition-delay: 0.7s; }
.service-card:nth-child(8).is-visible { transition-delay: 0.8s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    #categories .grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-3);
    }

    .hero-title {
        font-size: 56px;
    }

    #categories .section-title {
        font-size: 42px;
    }

    .service-image {
        height: 200px;
    }
}

@media (max-width: 991.98px) {
    #categories .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .hero {
        min-height: 500px;
        padding: var(--space-6) 0 var(--space-5);
    }

    .hero-title {
        font-size: 48px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-float {
        display: none;
    }

    #categories .section-title {
        font-size: 36px;
    }

    .service-image {
        height: 220px;
    }

    .service-card .service-title {
        font-size: 1.35rem;
    }
}

@media (max-width: 767.98px) {
    #categories .grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
        gap: var(--space-3);
    }

    body {
        padding-top: 70px;
    }

    .hero {
        min-height: 450px;
        padding: var(--space-5) 0 var(--space-4);
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-title::after {
        font-size: 24px;
        right: -10px;
    }

    .hero-subtitle {
        font-size: 17px;
    }

    .hero-actions .btn-primary {
        height: 52px;
        font-size: 16px;
        width: 100%;
        max-width: 280px;
    }

    .hero-badge {
        font-size: 12px;
        letter-spacing: 2px;
    }

    #categories .section-title {
        font-size: 30px;
    }

    .service-image {
        height: 240px;
    }

    .service-card .service-title {
        font-size: 1.4rem;
    }

    .service-card .service-desc {
        font-size: 15px;
    }

    .cat-float {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    #categories .section-title {
        font-size: 26px;
    }

    #categories .section-badge {
        font-size: 12px;
        letter-spacing: 2px;
    }

    .service-image {
        height: 200px;
    }

    .service-card .service-title {
        font-size: 1.3rem;
    }

    .service-card .service-desc {
        font-size: 14px;
    }

    .service-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* ============================================
   ANIMATION KEYFRAMES
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .service-card {
        opacity: 1 !important;
        transform: none !important;
    }

    .hero .hero-bg::after,
    .hero::before,
    .hero::after,
    .hero .hero-container::before,
    .hero-float,
    .cat-float {
        animation: none !important;
    }
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

@media (pointer: coarse) {
    .mobile-toggle,
    .back-to-top,
    .social-links a {
        min-width: 48px;
        min-height: 48px;
    }
}