/* SSS IT WORLD - Custom Styles */

/* Bangla Font Detection */
.bangla-text,
*:lang(bn) {
    font-family: 'Noto Sans Bengali', sans-serif;
}

/* Navigation Links */
.nav-link {
    color: #9ca3af;
    transition: color 0.3s;
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #3b82f6, #ef4444);
    transition: width 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Highlighted Nav Link (Certificate) */
.nav-link-highlight {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    background: linear-gradient(to right, #3b82f6, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s;
}

.nav-link-highlight:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
}

.nav-link-highlight i {
    -webkit-text-fill-color: #3b82f6;
}

/* Footer Highlighted Link */
.footer-link-highlight {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(to right, #3b82f6, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s;
}

.footer-link-highlight:hover {
    filter: brightness(1.2);
}

.footer-link-highlight i {
    -webkit-text-fill-color: #3b82f6;
}

/* Mobile Navigation */
.mobile-nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #9ca3af;
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #ffffff;
    background-color: #151b23;
}

/* Full Screen Mobile Navigation */
.mobile-nav-link-full {
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: #9ca3af;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

@media (min-width: 640px) {
    .mobile-nav-link-full {
        font-size: 1.1rem;
        padding: 0.625rem 1rem;
    }
}

.mobile-nav-link-full i {
    font-size: 0.9rem;
}

@media (min-width: 640px) {
    .mobile-nav-link-full i {
        font-size: 1rem;
    }
}

.mobile-nav-link-full:hover {
    color: #ffffff;
    background-color: rgba(59, 130, 246, 0.1);
}

.mobile-nav-link-full.active {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

/* Bottom Sheet Mobile Navigation */
.mobile-nav-link-sheet {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: #9ca3af;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.mobile-nav-link-sheet i:first-child {
    width: 1.25rem;
    text-align: center;
    font-size: 1rem;
}

.mobile-nav-link-sheet:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

.mobile-nav-link-sheet.active {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.mobile-nav-link-sheet.active i:first-child {
    color: #3b82f6;
}

/* Bottom Sheet Animation */
#mobileMenuSheet.open {
    transform: translateY(0);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    background: linear-gradient(to right, #3b82f6, #2563eb);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s;
    transform: translateY(0);
}

.btn-primary:hover {
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.25);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    background-color: #1c2432;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: #243042;
    border-color: rgba(59, 130, 246, 0.5);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    background-color: transparent;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: #3b82f6;
}

/* Cards */
.glass-card {
    background-color: rgba(21, 27, 35, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.5s;
}

.glass-card:hover {
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.05);
}

/* Glow Effects */
.glow-blue {
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.15);
}

.glow-red {
    box-shadow: 0 0 60px rgba(239, 68, 68, 0.15);
}

/* Hero Section */
.hero-gradient {
    background: radial-gradient(ellipse at top, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at bottom right, rgba(239, 68, 68, 0.08) 0%, transparent 50%);
}

/* Section Titles */
.section-title {
    font-size: 2.25rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .section-title {
        font-size: 3rem;
    }
}

.section-subtitle {
    color: #9ca3af;
    font-size: 1.125rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

/* Form Inputs */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #151b23;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: #ffffff;
    transition: all 0.3s;
}

.form-input::placeholder {
    color: #6b7280;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #151b23;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: #ffffff;
    resize: none;
    transition: all 0.3s;
}

.form-textarea::placeholder {
    color: #6b7280;
}

.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Icon Box */
.icon-box {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    background: rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    font-size: 1.25rem;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-blue {
    background-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.badge-red {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.badge-green {
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

/* Price Tag */
.price-tag {
    font-size: 1.875rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    background: linear-gradient(to right, #3b82f6, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-original {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: #6b7280;
    -webkit-text-fill-color: #6b7280;
    text-decoration: line-through;
    margin-bottom: 0.125rem;
}

.price-discount {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #3b82f6, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0e1117;
}

::-webkit-scrollbar-thumb {
    background: #243042;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
}

/* Selection */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}

/* Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Page Header */
.page-header {
    position: relative;
    padding: 10rem 0 7rem;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

/* Stats */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    background: linear-gradient(to right, #3b82f6, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

@media (min-width: 1024px) {
    .stat-number {
        font-size: 3rem;
    }
}

.stat-label {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Course Card */
.course-card {
    background-color: rgba(21, 27, 35, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.5s;
}

.course-card:hover {
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.05);
}

.course-card .course-image {
    position: relative;
    height: 12rem;
    overflow: hidden;
}

.course-card .course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.course-card:hover .course-image img {
    opacity: 0.9;
}

/* Portfolio Card */
.portfolio-card {
    background-color: rgba(21, 27, 35, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s;
}

.portfolio-card:hover {
    border-color: rgba(59, 130, 246, 0.2);
}

.portfolio-card .portfolio-image {
    position: relative;
    height: 16rem;
    overflow: hidden;
}

.portfolio-card .portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0b0f14, rgba(11, 15, 20, 0.5), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    transition: opacity 0.3s;
}

/* Mobile: Always show overlay */
@media (max-width: 1023px) {
    .portfolio-card .portfolio-overlay {
        opacity: 1;
    }
}

/* Desktop: Show overlay only on hover */
@media (min-width: 1024px) {
    .portfolio-card .portfolio-overlay {
        opacity: 0;
    }
    
    .portfolio-card:hover .portfolio-overlay {
        opacity: 1;
    }
}

/* Portfolio Overlay (for glass-card version on portfolio page) */
.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0b0f14, rgba(11, 15, 20, 0.7), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    transition: opacity 0.3s;
}

/* Mobile: Always show overlay */
@media (max-width: 1023px) {
    .glass-card .portfolio-overlay {
        opacity: 1;
    }
}

/* Desktop: Show overlay only on hover */
@media (min-width: 1024px) {
    .glass-card .portfolio-overlay {
        opacity: 0;
    }
    
    .glass-card:hover .portfolio-overlay {
        opacity: 1;
    }
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.alert-warning {
    background-color: rgba(234, 179, 8, 0.2);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #fbbf24;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

/* Font classes */
.font-poppins {
    font-family: 'Poppins', sans-serif;
}

.font-inter {
    font-family: 'Inter', sans-serif;
}

.font-bangla {
    font-family: 'Noto Sans Bengali', sans-serif;
}

/* ============================================
   LAZY LOADING STYLES
   ============================================ */

/* Lazy image placeholder */
img.lazy,
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background: linear-gradient(90deg, #1c2432 25%, #243042 50%, #1c2432 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Loaded image */
img.lazy-loaded,
img:not([data-src]) {
    opacity: 1;
    animation: none;
    background: none;
}

/* Shimmer animation for loading */
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, #1c2432 25%, #243042 50%, #1c2432 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 0.75rem;
}

.skeleton-image {
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.skeleton-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

/* Scroll reveal animations */
.scroll-reveal,
[data-scroll] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.is-visible,
[data-scroll].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays */
.scroll-reveal:nth-child(1) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.3s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.4s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.5s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.6s; }

/* Section loading state */
section[data-lazy]:not(.section-loaded),
.lazy-section:not(.section-loaded) {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

section[data-lazy]:not(.section-loaded)::after,
.lazy-section:not(.section-loaded)::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #1c2432;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Image loading spinner */
.img-loading {
    position: relative;
}

.img-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 2px solid #1c2432;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.img-loading.lazy-loaded::after {
    display: none;
}

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Content placeholder while loading */
.content-placeholder {
    background: #1c2432;
    border-radius: 0.5rem;
    overflow: hidden;
}

.content-placeholder .placeholder-line {
    height: 12px;
    background: linear-gradient(90deg, #243042 25%, #2d3a4f 50%, #243042 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    margin-bottom: 8px;
    border-radius: 4px;
}

.content-placeholder .placeholder-line:last-child {
    width: 70%;
}

/* Optimize images for performance */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent layout shift */
.aspect-video { aspect-ratio: 16/9; }
.aspect-square { aspect-ratio: 1/1; }
.aspect-4-3 { aspect-ratio: 4/3; }

/* Image container with aspect ratio */
.img-container {
    position: relative;
    overflow: hidden;
    background-color: #1c2432;
}

.img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
