/* ==========================================================================
   Home Page Custom Component Styles (public-home.css)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hero Slider Section Styles
   -------------------------------------------------------------------------- */
.hero-section-wrapper {
    position: relative;
    height: 100vh;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0b0f19;
}

.hero-slide-item {
    padding: 6rem 2rem;
    width: 100%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 100vh;
    min-height: 100vh;
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.hero-slide-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    pointer-events: auto;
}

.hero-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide-item.active .hero-slide-bg {
    opacity: 1;
}

/* Continuous Ken Burns Alternating Zoom Animation Effect */
.slider-effect-zoom .hero-slide-bg {
    transform: scale(1);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-effect-zoom .hero-slide-item:nth-child(odd).active .hero-slide-bg {
    animation: kenburnsZoomIn 10s ease-out forwards;
}

.slider-effect-zoom .hero-slide-item:nth-child(even).active .hero-slide-bg {
    animation: kenburnsZoomOut 10s ease-out forwards;
}

/* Continuous Slide Motion Effect */
.slider-effect-slide .hero-slide-bg {
    transform: scale(1.05) translateX(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s ease-out;
}

.slider-effect-slide .hero-slide-item.active .hero-slide-bg {
    transform: scale(1) translateX(0);
}

@keyframes kenburnsZoomIn {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.14);
    }
}

@keyframes kenburnsZoomOut {
    0% {
        transform: scale(1.14);
    }

    100% {
        transform: scale(1);
    }
}

.hero-slide-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-slide-inner {
    max-width: 850px;
}

.hero-slide-label {
    padding: 0.45rem 1.1rem;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.hero-slide-title {
    font-size: 3.25rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.hero-slide-subtitle {
    font-size: 1.2rem;
    max-width: 750px;
    line-height: 1.6;
}

.hero-slide-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-btn-link {
    padding: 0.85rem 2rem;
    font-size: 1.05rem;
    text-decoration: none;
}

.hero-slider-nav-btn {
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: all 0.2s ease;
}

.hero-slider-nav-btn:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.05);
}

.hero-slider-dots-container {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    gap: 0.5rem;
}

.hero-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

/* Fallback Hero Section */
.hero-fallback-section {
    position: relative;
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: radial-gradient(circle at top, var(--accent-light) 0%, transparent 70%);
}

.hero-fallback-container {
    max-width: 950px;
    margin: 0 auto;
    width: 100%;
}

.hero-fallback-title {
    font-size: 3.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.hero-fallback-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-fallback-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-nav-bottom-right {
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    z-index: 100;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.hero-nav-prev-sides {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.hero-nav-next-sides {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

/* --------------------------------------------------------------------------
   2. Certificates Section Styles
   -------------------------------------------------------------------------- */
.certificates-section {
    padding: 3rem 1rem;
    position: relative;
    background: linear-gradient(180deg, var(--bg-hover) 0%, var(--bg-secondary) 100%);
    border-top: 1px solid var(--border-color);
    overflow: hidden;
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.6rem;
}

.premium-cert-card {
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.25rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-cert-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.2);
}

.cert-img-wrapper {
    width: 100%;
    height: 140px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    position: relative;
    transition: border-color 0.3s ease;
}

.premium-cert-card:hover .cert-img-wrapper {
    border-color: rgba(99, 102, 241, 0.3);
}

.cert-full-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 11px;
    transition: transform 0.4s ease;
}

.premium-cert-card:hover .cert-full-img {
    transform: scale(1.06);
}

.cert-placeholder-icon {
    font-size: 2.2rem;
    color: var(--accent-primary);
    opacity: 0.8;
}

.cert-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    width: 100%;
}

.cert-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cert-card-authority {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    display: block;
    line-height: 1.3;
}

.cert-card-desc {
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.5;
    margin: 0.35rem 0 0 0;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   3. Categories Section Styles
   -------------------------------------------------------------------------- */
.categories-section {
    padding: 5rem 1.5rem;
    position: relative;
    background: var(--bg-surface, #ffffff);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.section-ambient-glow {
    position: absolute;
    top: 0;
    right: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.section-container {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-badge {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 30px;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.85rem;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.section-desc {
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.08rem;
    line-height: 1.65;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.75rem;
}

.premium-category-card {
    background: var(--bg-hover, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
}

.premium-category-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 35px -10px rgba(99, 102, 241, 0.18);
    background: var(--bg-surface, #ffffff);
}

.cat-image-container {
    width: 100%;
    height: 180px;
    background: var(--bg-surface, #0f172a);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.cat-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-category-card:hover .cat-card-img {
    transform: scale(1.08);
}

.cat-placeholder-box {
    font-size: 3rem;
    color: var(--accent-primary);
    opacity: 0.75;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
}

.cat-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.4) 0%, transparent 60%);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.premium-category-card:hover .cat-card-overlay {
    opacity: 0.2;
}

.cat-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cat-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.premium-category-card:hover .cat-card-title {
    color: var(--accent-primary);
}

.cat-card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.premium-category-card:hover .cat-card-action {
    color: var(--accent-primary);
}

.arrow-icon {
    transition: transform 0.3s ease;
}

.premium-category-card:hover .arrow-icon {
    transform: translateX(5px);
}

/* --------------------------------------------------------------------------
   4. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {

    .certificates-grid,
    .categories-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.25rem;
    }

    .cert-img-wrapper {
        height: 115px;
    }

    .cat-image-container {
        height: 150px;
    }
}

@media (max-width: 640px) {

    .certificates-section,
    .categories-section {
        padding: 3.5rem 1rem !important;
    }

    .certificates-grid,
    .categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .premium-cert-card,
    .premium-category-card {
        padding: 0.85rem;
        border-radius: 14px;
        gap: 0.75rem;
    }

    .cert-img-wrapper {
        height: 105px;
        padding: 0;
        border-radius: 9px;
    }

    .cat-image-container {
        height: 120px;
        border-radius: 10px;
    }

    .cert-full-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .cert-card-title,
    .cat-card-title {
        font-size: 0.95rem;
    }

    .cert-card-title {
        -webkit-line-clamp: 2;
    }

    .cert-card-authority {
        font-size: 0.74rem;
    }

    .cert-card-desc {
        font-size: 0.76rem;
        padding-top: 0.45rem;
        line-height: 1.4;
        -webkit-line-clamp: 2;
    }

    .cat-card-action {
        font-size: 0.78rem;
    }
}