/* ================================================
   ULTRA-MODERN PROJECTS SECTION 2025
   "Our Projects - Real Cases from 2022-2025"
   Bento Grid + Glassmorphism + Modern Cards
   ================================================ */

/* Projects Section Container */
.projects-section-modern {
    position: relative;
    padding: 4rem 0; /* 64px = 1.7cm */
    overflow: hidden;
    background: linear-gradient(180deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 50%, var(--color-bg-primary) 100%);
}

/* Background Effects */
.projects-bg-gradient {
    position: absolute;
    inset: 0;
    background: var(--gradient-mesh);
    opacity: 0.4;
    pointer-events: none;
    animation: mesh-breathe 20s ease-in-out infinite;
}

.projects-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    animation: float-orb 18s ease-in-out infinite;
    pointer-events: none;
}

.projects-orb--1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--color-brand-cyan), transparent);
    top: 20%;
    left: -10%;
    animation-delay: -4s;
}

.projects-orb--2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--color-brand-purple), transparent);
    bottom: 10%;
    right: -5%;
    animation-delay: -12s;
}

/* Section Title - uses .section-heading and .section-heading-gradient */

/* Section Subtitle */
.projects-subtitle-modern {
    text-align: center;
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
    font-weight: 400;
}

/* Category Switcher - Modern Tab Style */
.category-switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 0 auto 4rem auto;
    padding: 0.5rem;
    background: rgba(26, 31, 58, 0.6);
    backdrop-filter: blur(24px) saturate(220%);
    border-radius: var(--radius-2xl);
    border: 1.5px solid rgba(59, 130, 246, 0.2);
    max-width: fit-content;
    position: relative;
    z-index: 10;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-lg);
    color: rgba(226, 232, 240, 0.7);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-family-headings);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.category-tab i {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.category-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(168, 85, 247, 0.15));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-tab:hover:not(.active) {
    color: rgba(226, 232, 240, 0.9);
    background: rgba(59, 130, 246, 0.08);
}

.category-tab:hover:not(.active)::before {
    opacity: 1;
}

.category-tab:hover:not(.active) i {
    transform: scale(1.1);
    color: var(--color-brand-cyan);
}

.category-tab.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(168, 85, 247, 0.25));
    color: #FFFFFF;
    border: 1px solid rgba(59, 130, 246, 0.4);
    box-shadow:
        0 4px 16px rgba(59, 130, 246, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.category-tab.active i {
    color: var(--color-brand-cyan);
    filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.6));
}

/* Projects Category Content Containers */
.projects-category-content {
    position: relative;
    z-index: 2;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.projects-category-content[style*="display: none"] {
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Category Header - Modern Style */
.projects-category-modern {
    margin: 2rem 0;
    position: relative;
    z-index: 2;
    text-align: left;
}

.projects-category {
    margin: 2rem 0;
}

.projects-category-modern > .category-title {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.projects-category-modern > *:not(.category-title) {
    text-align: left;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.bento-card {
    background: rgba(26, 31, 58, 0.85);
    backdrop-filter: blur(24px) saturate(220%);
    border: 1.5px solid rgba(59, 130, 246, 0.35);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr;
    gap: 1.5rem;
    align-items: start;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 0 30px rgba(59, 130, 246, 0.18);
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-brand-cyan), var(--color-brand-purple));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.bento-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(168, 85, 247, 0.15));
    opacity: 0;
    filter: blur(12px);
    transition: opacity 0.4s ease;
    z-index: -1;
}

.bento-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow:
        0 22px 65px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(255, 255, 255, 0.12) inset,
        0 0 45px rgba(59, 130, 246, 0.38);
}

.bento-card:hover::before {
    opacity: 1;
}

.bento-card:hover::after {
    opacity: 1;
}

.bento-card__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(139, 92, 246, 0.9));
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
    color: #FFFFFF;
    grid-column: 1;
    grid-row: 1;
}

.bento-card__icon i {
    width: 28px;
    height: 28px;
}

.bento-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
    font-family: var(--font-family-headings);
    letter-spacing: -0.015em;
    line-height: 1.3;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
}

.bento-card__description {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(226, 232, 240, 0.85);
    margin: 0;
    grid-column: 1 / -1;
    grid-row: 2;
}

.bento-card__list {
    margin: 0;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    grid-column: 1 / -1;
}

.bento-card__list li {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(226, 232, 240, 0.85);
    position: relative;
    padding-left: 1.25rem;
}

.bento-card__list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-brand-cyan);
    font-size: 1rem;
    line-height: 1.7;
    top: 0;
    font-weight: 400;
}

.bento-card__feature {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.bento-card__feature-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
}

.bento-card--large {
    grid-column: span 2;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr;
    gap: 1.5rem;
    align-items: start;
}

.bento-card--medium {
    grid-column: span 1;
}

.bento-card--large .bento-card__icon {
    grid-column: 1;
    grid-row: 1;
}

.bento-card--large .bento-card__title {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin: 0;
}

.bento-card--large .bento-card__features-grid {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 0;
}

.bento-card--large .bento-card__feature {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    position: relative;
}

.bento-card--large .bento-card__feature:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -1rem;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(59, 130, 246, 0.3) 20%,
        rgba(59, 130, 246, 0.3) 80%,
        transparent
    );
}

/* Projects Bento Grid */
.projects-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3.0rem; /* Увеличили вертикальный отступ между карточками */
    position: relative;
    z-index: 2;
}

/* Project Card - Glassmorphism + Modern 2025 */
.project-card-modern {
    background: rgba(26, 31, 58, 0.85);
    backdrop-filter: blur(24px) saturate(220%);
    border: 1.5px solid rgba(59, 130, 246, 0.35);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 0 35px rgba(59, 130, 246, 0.18);
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.project-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-brand-cyan), var(--color-brand-purple));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card-modern::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(168, 85, 247, 0.15));
    opacity: 0;
    filter: blur(12px);
    transition: opacity 0.4s ease;
    z-index: -1;
}

.project-card-modern:hover {
    transform: translateY(-8px) scale(1.01);
    background: rgba(26, 31, 58, 0.96);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.12) inset,
        0 0 60px rgba(59, 130, 246, 0.45);
}

.project-card-modern:hover::before {
    opacity: 1;
}

.project-card-modern:hover::after {
    opacity: 1;
}

/* Project Header */
.project-card-modern__header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

/* Icon for cards with icon on top (bots, integrations, software) */
.project-card-modern__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-brand-cyan), var(--color-brand-purple));
    border-radius: 50%;
    box-shadow:
        0 0 25px rgba(59, 130, 246, 0.45),
        0 6px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
    color: #FFFFFF;
}

.project-card-modern__icon i {
    width: 28px;
    height: 28px;
    stroke-width: 2;
}

.project-card-modern:hover .project-card-modern__icon {
    transform: scale(1.1);
    box-shadow:
        0 0 38px rgba(59, 130, 246, 0.65),
        0 10px 28px rgba(0, 0, 0, 0.45);
}

/* When icon is present, center the header content */
.project-card-modern__header:has(.project-card-modern__icon) {
    align-items: center;
    text-align: center;
}

.project-card-modern__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.3;
    margin: 0;
}

.project-card-modern__subtitle {
    font-size: 1rem;
    color: var(--color-brand-cyan);
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-card-modern__subtitle i {
    width: 18px;
    height: 18px;
    color: var(--color-brand-cyan);
}

/* Project Body */
.project-card-modern__body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1; /* Позволяет телу растягиваться */
}

.project-card-modern__description {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(226, 232, 240, 0.85);
    margin: 0;
}

/* Project Result Badge */
.project-card-modern__result {
    padding: 1rem;
    background: rgba(6, 182, 212, 0.2);
    border: 1.5px solid rgba(6, 182, 212, 0.35);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-primary);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.45),
        0 0 20px rgba(6, 182, 212, 0.15);
}

.project-card-modern__result strong {
    color: var(--color-brand-cyan);
    font-weight: 600;
}

/* Project Features List */
.project-card-modern__features {
    margin: 0;
    padding-left: 1.5rem;
    list-style: none;
}

.project-card-modern__features li {
    position: relative;
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(226, 232, 240, 0.85);
    margin-bottom: 0.75rem;
}

.project-card-modern__features li::before {
    content: '→';
    position: absolute;
    left: -1.5rem;
    color: var(--color-brand-cyan);
    font-weight: 700;
}

/* Project List (for ordered lists like in integrations) */
.project-card-modern__list {
    margin: 1rem 0 0 1.5rem;
    padding: 0;
    text-align: left;
    width: 100%;
}

.project-card-modern__list li {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(226, 232, 240, 0.85);
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
    text-align: left;
}

.project-card-modern__list li::marker {
    color: var(--color-brand-cyan);
    font-weight: 600;
}

/* Project Gallery - Modern Thumbnails */
.project-gallery-modern {
    margin-top: auto; /* Прижимаем галерею к низу карточки */
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-thumbnails-modern {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Стандартное соотношение как у видео */
    margin: 0 auto;
}

/* Gallery Thumbnail - Stacked Card Effect (Modern Clean) */
.gallery-thumb-modern {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(15, 23, 42, 0.5);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
}

/* Первая карточка - передний план (главная, яркая) */
.gallery-thumb-modern:nth-child(1) {
    top: 0;
    left: 0;
    transform: translateY(0) scale(1);
    z-index: 3;
    opacity: 1;
    border-color: rgba(59, 130, 246, 0.2);
}

/* Вторая карточка - средний план */
.gallery-thumb-modern:nth-child(2) {
    top: 0;
    left: 0;
    transform: translateY(3px) translateX(2px) scale(0.985);
    z-index: 2;
    opacity: 0.75;
    filter: brightness(0.95);
}

/* Третья карточка - задний план (едва видимая) */
.gallery-thumb-modern:nth-child(3) {
    top: 0;
    left: 0;
    transform: translateY(6px) translateX(-3px) scale(0.97);
    z-index: 1;
    opacity: 0.5;
    filter: brightness(0.9);
}

/* Скрыть остальные карточки */
.gallery-thumb-modern:nth-child(n+4) {
    display: none;
}

.gallery-thumb-modern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.3s ease;
}

/* Hover эффект - аккуратное раскрытие стопки */
.gallery-thumbnails-modern:hover .gallery-thumb-modern:nth-child(1) {
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow:
        0 16px 48px rgba(59, 130, 246, 0.25),
        0 8px 24px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.gallery-thumbnails-modern:hover .gallery-thumb-modern:nth-child(1) img {
    filter: brightness(1.05) contrast(1.1);
}

.gallery-thumbnails-modern:hover .gallery-thumb-modern:nth-child(2) {
    transform: translateY(5px) translateX(4px) scale(0.985);
    opacity: 0.85;
}

.gallery-thumbnails-modern:hover .gallery-thumb-modern:nth-child(3) {
    transform: translateY(9px) translateX(-6px) scale(0.97);
    opacity: 0.6;
}

/* Zoom Icon Overlay - только на главной карточке */
.gallery-thumb-modern:nth-child(1)::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.7), rgba(59, 130, 246, 0.7));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-thumbnails-modern:hover .gallery-thumb-modern:nth-child(1)::after {
    opacity: 1;
}

/* Gallery Preview Counter Badge (на третьей картинке, если есть ещё) */
.gallery-thumb-modern:nth-child(3)[data-more]::before {
    content: attr(data-more);
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.95), rgba(59, 130, 246, 0.95));
    color: #FFFFFF;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}

/* Video Gallery Section - Separate from Images */
.project-video-gallery-modern {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(168, 85, 247, 0.15);
}

/* Video Thumbnail Wrapper */
.video-thumb-wrapper-modern {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Стандартное соотношение */
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(168, 85, 247, 0.2);
    background: rgba(0, 0, 0, 0.4);
}

.video-thumb-wrapper-modern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    opacity: 0.85; /* Осветлили видео тоже */
    filter: brightness(0.92) contrast(1.08);
}

.video-thumb-wrapper-modern:hover {
    transform: scale(1.05);
    border-color: var(--color-brand-purple);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

.video-thumb-wrapper-modern:hover img {
    transform: scale(1.1);
    opacity: 0.9;
    filter: brightness(0.95) contrast(1.15);
}

/* Video Play Overlay */
.video-play-overlay-modern {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-thumb-wrapper-modern:hover .video-play-overlay-modern {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.6), rgba(236, 72, 153, 0.6));
}

.video-play-overlay-modern i {
    width: 56px;
    height: 56px;
    color: #FFFFFF;
    filter: drop-shadow(0 4px 12px rgba(168, 85, 247, 0.6));
    transition: all 0.3s ease;
}

.video-thumb-wrapper-modern:hover .video-play-overlay-modern i {
    transform: scale(1.15);
    filter: drop-shadow(0 6px 16px rgba(236, 72, 153, 0.8));
}

/* ================================================
   INFRASTRUCTURE CARD STYLES
   ================================================ */

/* Infrastructure card modifier */
.project-card-modern--infrastructure {
    max-width: 100%;
}

/* Infrastructure features grid */
.project-card-modern__features-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.project-card-modern__feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.project-card-modern__feature-item i {
    font-size: 1.5rem;
    color: var(--color-brand-cyan);
    flex-shrink: 0;
    margin-top: 0.25rem;
    width: 24px;
    height: 24px;
}

.project-card-modern__feature-item strong {
    display: block;
    color: var(--color-text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.project-card-modern__feature-item p {
    color: rgba(226, 232, 240, 0.85);
    font-size: 1rem;
    margin: 0;
    line-height: 1.7;
}

/* Tech stack */
.project-card-modern__tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.tech-badge {
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tech-badge:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

/* Infrastructure note */
.project-card-modern__note {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-brand-cyan);
}

.project-card-modern__note p {
    color: rgba(226, 232, 240, 0.85);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.7;
}

.project-card-modern__timeline {
    color: var(--color-brand-cyan) !important;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    margin-top: 1rem !important;
}

/* ================================================
   MOBILE SWIPER STYLES
   ================================================ */

/* Swiper Container for Projects */
.projects-swiper-container {
    position: relative;
    width: 100%;
    margin-bottom: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    -webkit-tap-highlight-color: transparent; /* Remove blue flash on mobile */
    tap-highlight-color: transparent;
    transform: translateZ(0); /* Force GPU acceleration */
    backface-visibility: hidden; /* Prevent flickering */
}

.projects-swiper {
    width: 100%;
    padding-bottom: 3rem; /* Space for pagination - same as testimonials */
    overflow: visible;
    transition: height 0.5s ease; /* Smooth height transition for diagonal effect */
    -webkit-tap-highlight-color: transparent;
}

/* Swiper Wrapper - will be grid on desktop */
.projects-swiper .swiper-wrapper {
    transition: height 0.5s ease; /* Match container transition */
}

/* Swiper Slide */
.projects-swiper .swiper-slide {
    height: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

/* Projects Pagination - Now OUTSIDE swiper, always at bottom */
.projects-pagination {
    position: relative !important;
    bottom: 0 !important;
    margin-top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.projects-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(59, 130, 246, 0.4);
    opacity: 1 !important; /* Force opacity to prevent Swiper defaults */
    transition: all 0.3s ease;
    margin: 0 !important;
    border-radius: 50%;
    cursor: pointer;
}

.projects-pagination .swiper-pagination-bullet:hover {
    background: rgba(59, 130, 246, 0.5);
    transform: scale(1.15);
    border-color: rgba(59, 130, 246, 0.6);
}

.projects-pagination .swiper-pagination-bullet-active {
    background: linear-gradient(135deg, var(--color-brand-cyan), var(--color-brand-purple));
    width: 28px;
    border-radius: 5px;
    border-color: var(--color-brand-cyan);
    box-shadow:
        0 0 12px rgba(6, 182, 212, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Dynamic bullets for long lists */
.projects-pagination .swiper-pagination-bullet-active-main {
    background: linear-gradient(135deg, var(--color-brand-cyan), var(--color-brand-purple));
}

.projects-pagination .swiper-pagination-bullet-active-prev,
.projects-pagination .swiper-pagination-bullet-active-next {
    opacity: 0.7;
}

.projects-pagination .swiper-pagination-bullet-active-prev-prev,
.projects-pagination .swiper-pagination-bullet-active-next-next {
    opacity: 0.4;
    transform: scale(0.85);
}

/* Desktop: Disable swiper, show grid */
@media (min-width: 769px) {
    .projects-swiper-container {
        margin-bottom: 0;
    }

    .projects-swiper {
        padding-bottom: 0;
    }

    /* Grid layout on desktop */
    .projects-swiper .swiper-wrapper {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 3rem;
    }

    .projects-swiper .swiper-slide {
        width: 100% !important;
        margin: 0 !important;
    }

    /* Hide pagination on desktop */
    .projects-pagination {
        display: none !important;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .projects-bg-gradient {
        display: none; /* Completely hide mesh gradient on mobile to prevent flashing */
    }

    .projects-section-modern {
        padding: 2.5rem 0; /* 40px on mobile */
        background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%); /* Simplified static gradient */
    }

    .projects-subtitle-modern {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    /* Optimize swiper container for mobile */
    .projects-swiper-container {
        isolation: isolate; /* Create stacking context to prevent compositing issues */
    }

    .projects-swiper {
        will-change: auto; /* Remove will-change to prevent GPU layer issues */
    }

    /* Disable hover transform on mobile/touch devices */
    .project-card-modern:hover {
        transform: none;
    }

    /* Optimize cards for mobile rendering */
    .project-card-modern {
        backdrop-filter: none; /* Remove blur effect - causes flashing on Android */
        -webkit-backdrop-filter: none;
        background: rgba(26, 31, 58, 0.95); /* Slightly more opaque without blur */
        transform: translateZ(0); /* Force GPU acceleration */
        backface-visibility: hidden; /* Prevent flickering */
        -webkit-backface-visibility: hidden;
    }

    /* Remove glowing pseudo-elements on mobile */
    .project-card-modern::after {
        display: none; /* Remove blur glow effect */
    }

    .tech-badge:hover {
        transform: none;
    }

    /* Category Switcher Mobile Responsive */
    .category-switcher {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem;
        margin-bottom: 2.5rem;
        max-width: 100%;
        backdrop-filter: none; /* Remove blur effect on mobile */
        -webkit-backdrop-filter: none;
        background: rgba(26, 31, 58, 0.9); /* More opaque without blur */
    }

    .category-tab {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .category-tab i {
        width: 18px;
        height: 18px;
    }

    .category-tab span {
        display: inline;
    }

    .projects-category-modern {
        margin: 1.25rem 0;
    }

    .projects-grid-modern {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card-modern {
        padding: 1.5rem;
        gap: 1.25rem;
    }

    .project-card-modern__title {
        font-size: 1.25rem;
    }

    .project-card-modern__subtitle {
        font-size: 0.9rem;
    }

    .project-card-modern__description {
        font-size: 0.95rem;
    }

    .project-card-modern__result {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .gallery-thumbnails-modern {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 0.5rem;
    }

    .gallery-thumb-modern img {
        object-fit: cover;
        object-position: center;
        width: 100%;
        height: 100%;
    }

    .video-thumb-wrapper-modern img {
        object-fit: cover;
        object-position: center;
        width: 100%;
        height: 100%;
    }

    .projects-orb {
        display: none; /* Completely hide orbs on mobile to prevent flashing */
    }

    .bento-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .bento-card {
        padding: 1.5rem;
        backdrop-filter: none; /* Remove blur effect on mobile */
        -webkit-backdrop-filter: none;
        background: rgba(26, 31, 58, 0.95); /* More opaque without blur */
    }

    .bento-card::after {
        display: none; /* Remove blur glow effect */
    }

    .bento-card__icon {
        width: 48px;
        height: 48px;
    }

    .bento-card__icon i {
        width: 24px;
        height: 24px;
    }

    .bento-card__title {
        font-size: 1.25rem;
    }

    .bento-card__description {
        font-size: 0.95rem;
    }

    .bento-card__list li {
        font-size: 0.95rem;
    }

    .bento-card__feature-title {
        font-size: 1rem;
    }

    .bento-card--large {
        grid-column: span 1;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .bento-card--large .bento-card__icon {
        grid-row: 1;
    }

    .bento-card--large .bento-card__title {
        grid-row: 2;
    }

    .bento-card--large .bento-card__features-grid {
        grid-row: 3;
        grid-template-columns: 1fr;
        gap: 0;
    }

    .bento-card--large .bento-card__feature {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    }

    .bento-card--large .bento-card__feature:first-child {
        padding-top: 0;
    }

    .bento-card--large .bento-card__feature:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }

    .bento-card--large .bento-card__feature::after {
        display: none;
    }
}


/* ================================================
   FOUNDER'S DISCLAIMER / QUOTE BLOCK
   Modern card with avatar - Professional 2025 style
   ================================================ */

.founder-disclaimer {
    max-width: 900px;
    margin: 0 auto 4rem;
    padding: 2.5rem;
    background: rgba(26, 31, 58, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-2xl);
    border-left: 4px solid var(--color-brand-cyan);
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
}

/* Subtle glow effect on hover */
.founder-disclaimer:hover {
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 8px 32px rgba(6, 182, 212, 0.15);
    transform: translateY(-2px);
}

/* Avatar container */
.founder-disclaimer__avatar {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-brand-cyan);
    box-shadow: 0 0 24px rgba(6, 182, 212, 0.3);
    position: relative;
}

.founder-disclaimer__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Content area */
.founder-disclaimer__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Quote container */
.founder-disclaimer__quote {
    margin: 0;
    padding: 0;
    position: relative;
}

/* Quote text */
.founder-disclaimer__text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: rgba(226, 232, 240, 0.85);
    margin: 0;
    font-weight: 400;
    font-style: italic;
}

.founder-disclaimer__text:last-of-type {
    margin-bottom: 0;
}

/* Author info */

/* ================================================
   RESPONSIVE DESIGN - MOBILE OPTIMIZATION
   ================================================ */

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

    .bento-card--large {
        grid-column: span 1;
    }

    .bento-card--large {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .bento-card--large .bento-card__icon {
        grid-column: 1;
        grid-row: 1;
        margin-bottom: 0.5rem;
    }

    .bento-card--large .bento-card__title {
        grid-column: 1;
        grid-row: 2;
        margin-bottom: 1rem;
    }

    .bento-card--large .bento-card__features-grid {
        grid-column: 1;
        grid-row: 3;
        grid-template-columns: 1fr;
        gap: 0;
    }

    .bento-card--large .bento-card__feature {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    }

    .bento-card--large .bento-card__feature:first-child {
        padding-top: 0;
    }

    .bento-card--large .bento-card__feature:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }

    .bento-card--large .bento-card__feature::after {
        display: none;
    }

    /* Compact founder disclaimer on mobile */
    .founder-disclaimer {
        flex-direction: column;
        padding: 1.5rem;
        margin-bottom: 2.5rem;
        gap: 1.25rem;
        align-items: center;
        text-align: center;
        backdrop-filter: none; /* Remove blur effect on mobile */
        -webkit-backdrop-filter: none;
        background: rgba(26, 31, 58, 0.9); /* More opaque without blur */
    }

    .founder-disclaimer__avatar {
        width: 64px;
        height: 64px;
        border-width: 2px;
    }

    .founder-disclaimer__text {
        font-size: 1rem;
        text-align: center;
    }

    /* Mobile adjustments for icon cards */
    .project-card-modern__icon {
        width: 48px;
        height: 48px;
        margin-bottom: 1rem;
    }

    .project-card-modern__icon i {
        width: 24px;
        height: 24px;
    }

    .project-card-modern__title {
        font-size: 1.125rem;
    }
}
