/* Page: Home specific styles */
.home-hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0c1116 0%, #1a202c 50%, #2d3748 100%);
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 1.50rem 2rem 2rem;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(20, 184, 166, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.home-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.home-hero-text h1 {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 50%, #7c3aed 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.home-hero-text p {
    font-size: 1.5rem;
    color: #a0aec0;
    margin-bottom: 3rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.home-hero-image {
    position: relative;
    display: inline-block;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
}

.home-hero-image img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    border: 2px solid rgba(20, 184, 166, 0.2);
}

.home-hero-image:hover img {
    transform: none;
}

/* Hero Image Overlay */
.hero-overlay {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.home-hero-image:hover .hero-overlay,
.home-hero-image:focus-within .hero-overlay,
.home-hero-image.show-overlay .hero-overlay {
    opacity: 1;
    pointer-events: auto;
}

.home-hero-image.suppress-overlay .hero-overlay {
    opacity: 0 !important;
    pointer-events: none !important;
}

.overlay-box {
    width: clamp(280px, 90%, 520px);
    max-width: 520px;
    max-height: 85%;
    margin: 0;
    overflow: auto;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    border: 1px solid rgba(20, 184, 166, 0.35);
    border-radius: 14px;
    color: #e5f4f2;
    text-align: left;
    padding: 1.25rem 1.25rem 1.4rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    position: relative;
}

.overlay-box p {
    margin: 0;
    line-height: 1.6;
    font-size: 1.06rem;
    color: #ffffffff;
    -webkit-text-stroke: 0.4px rgba(0, 0, 0, 0.85);
    text-shadow:
        0 1px 0 rgba(0, 0, 0, 0.65),
        0 -1px 0 rgba(0, 0, 0, 0.65),
        1px 0 0 rgba(0, 0, 0, 0.65),
        -1px 0 0 rgba(0, 0, 0, 0.65),
        1px 1px 0 rgba(0, 0, 0, 0.6),
        1px -1px 0 rgba(0, 0, 0, 0.6),
        -1px 1px 0 rgba(0, 0, 0, 0.6),
        -1px -1px 0 rgba(0, 0, 0, 0.6);
}

.hero-overlay-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    color: #e2e8f0;
    border: none;
    font-size: 18px;
    cursor: pointer;
    border-radius: 8px;
    padding: 6px;
}

.hero-overlay-close:hover,
.hero-overlay-close:focus-visible {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
    outline: none;
}

.hero-info-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.85);
    color: #e6fffb;
    border: 1px solid rgba(20, 184, 166, 0.4);
    border-radius: 999px;
    padding: 8px 10px;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-info-btn:hover,
.hero-info-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(20, 184, 166, 0.35);
    outline: none;
}

/* Mobile overlay */
@media (max-width: 768px) {
    .overlay-box { padding: 0.875rem 1rem 1rem; }
    .overlay-box p { font-size: 0.96rem; }
}
@media (max-width: 480px) {
    .overlay-box { padding: 0.75rem 0.875rem 0.875rem; }
    .overlay-box p { font-size: 0.94rem; }
}

/* Categories section */
.home-categories {
    padding: 3rem 0 6rem;
    background: rgba(26, 32, 44, 0.3);
    backdrop-filter: blur(10px);
}

.home-categories h2 {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    color: #f7fafc;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.home-category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 3rem;
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

.home-category-card {
    background: linear-gradient(135deg, rgba(26, 32, 44, 0.8) 0%, rgba(45, 55, 72, 0.6) 100%);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    border: 1px solid rgba(20, 184, 166, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.home-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.1), transparent);
    transition: left 0.3s ease;
}

.home-category-card:hover::before {
    left: 100%;
}

.home-category-card:hover {
    transform: translateY(-10px);
    border-color: #14b8a6;
    box-shadow: 0 4px 20px rgba(20, 184, 166, 0.15);
    background: linear-gradient(135deg, rgba(26, 32, 44, 0.9) 0%, rgba(45, 55, 72, 0.8) 100%);
}

.home-category-card i {
    font-size: 4rem;
    color: #14b8a6;
    margin-bottom: 1.5rem;
    display: block;
    transition: color 0.3s ease, transform 0.3s ease;
}

.home-category-card:hover i {
    color: #06b6d4;
    transform: scale(1.1);
}

.home-category-card h3 {
    color: #f7fafc;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.home-category-card p {
    color: #a0aec0;
    font-size: 1.1rem;
    line-height: 1.5;
}

/* CTA button */
.enhanced-cta {
    position: relative;
    background: linear-gradient(135deg, #14b8a6, #0891b2, #7c3aed);
    background-size: 200% 200%;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem auto;
    min-width: 300px;
    justify-content: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 8px 25px rgba(20, 184, 166, 0.3);
    overflow: hidden;
    animation: gradientShift 3s ease infinite;
}

.enhanced-cta:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(20, 184, 166, 0.4);
    animation-play-state: paused;
}

.cta-arrow {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.enhanced-cta:hover .cta-arrow {
    transform: translateX(5px);
}

.cta-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.enhanced-cta:hover .cta-glow {
    left: 100%;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Category cards as links – reset text styling */
a.home-category-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* CTA as link – reset text styling */
a.enhanced-cta {
    text-decoration: none;
    color: white;
}

/* Focus-visible rings (Web Interface Guidelines) */
*:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* Reduced motion preference (Web Interface Guidelines) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsive Design */
@media (max-width: 1366px) and (min-width: 1025px) {
    .home-category-grid { gap: 2.5rem; }
}

@media (max-width: 1200px) {
    .home-category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .home-category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
    }
    .home-hero-text h1 { font-size: 3rem; }
    .home-hero-text p { font-size: 1.3rem; }
    .home-categories h2 { font-size: 2.5rem; }
    .home-category-card { padding: 2.5rem 2rem; }
}

@media (max-width: 768px) {
    .home-category-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    html, body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        height: auto !important;
        min-height: 100vh !important;
    }

    .main-content {
        padding-top: 0 !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        min-height: 100vh !important;
    }

    .home-hero {
        padding: 0.5rem 1.5rem 2rem;
        min-height: 70vh;
        margin-top: 0;
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }

    .home-hero-text h1 { font-size: 2.5rem; margin-top: 0; padding-top: 0; }
    .home-hero-text p { font-size: 1.2rem; margin-bottom: 2rem; }
    .home-categories h2 { font-size: 2rem; }
    .home-category-card { padding: 2rem 1.5rem; }
    .enhanced-cta { min-width: 280px; padding: 1rem 2rem; font-size: 1rem; }
}

@media (max-width: 480px) {
    html, body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        height: auto !important;
        min-height: 100vh !important;
    }

    .main-content {
        padding-top: 0 !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        min-height: 100vh !important;
    }

    .home-hero {
        padding: 0.25rem 1rem 2rem;
        min-height: 60vh;
        margin-top: 0;
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }

    .home-hero-text h1 { font-size: 2rem; margin-top: 0; padding-top: 0; }
    .home-hero-text p { font-size: 1rem; margin-bottom: 1.5rem; }
    .enhanced-cta { min-width: 240px; padding: 0.875rem 1.5rem; font-size: 0.95rem; }
}
