/* ============================================
   HOMEPAGE STYLES
   ============================================ */

/* Homepage Mission Section */
.homepage-mission-section {
    width: 100%;
    max-width: 100%;
    background: transparent;
    padding: 3rem 0;
    margin-bottom: 0;
    box-sizing: border-box;
}

.homepage-mission-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
}

.homepage-mission-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 0 0 2.5rem 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 1rem;
}

/* Gradient text effect - only apply if supported */
@supports (-webkit-background-clip: text) or (background-clip: text) {
    .homepage-mission-title {
        background: linear-gradient(135deg, var(--text-color) 0%, var(--text-color-light) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        color: transparent;
    }
}

.homepage-mission-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color-1), var(--accent-color-2));
    border-radius: 2px;
}

.homepage-mission-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.homepage-mission-paragraph {
    font-size: 1.2rem;
    color: var(--text-color);
    line-height: 1.8;
    margin: 0 0 1.5rem 0;
    opacity: 0.9;
}

.homepage-mission-paragraph:last-child {
    margin-bottom: 0;
}

.homepage-mission-paragraph:first-of-type {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent-color-1);
    margin-bottom: 2rem;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border-left: none;
}

.homepage-mission-paragraph--highlight,
.homepage-mission-paragraph.homepage-mission-paragraph--highlight,
.homepage-mission-text .homepage-mission-paragraph--highlight {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--accent-color-1) !important;
    margin-top: 2rem !important;
    margin-bottom: 0 !important;
    line-height: 2 !important;
    text-align: center !important;
    opacity: 1 !important;
    letter-spacing: 0.01em !important;
}

/* Homepage Hero Section */
.homepage-hero-section {
    width: 100%;
    max-width: 100%;
    background: transparent;
    padding: 3rem 0;
    margin-bottom: 0;
    box-sizing: border-box;
}

/* First hero section (before carousel) - proper spacing */
.homepage-hero-section--before-carousel {
    padding-bottom: 2rem;
    padding-top: 3rem;
}

.homepage-hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
}

.homepage-hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 1rem;
}

/* Gradient text effect - only apply if supported */
@supports (-webkit-background-clip: text) or (background-clip: text) {
    .homepage-hero-title {
        background: linear-gradient(135deg, var(--text-color) 0%, var(--text-color-light) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        color: transparent;
    }
}

.homepage-hero-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color-1), var(--accent-color-2));
    border-radius: 2px;
}

.homepage-hero-description {
    font-size: 1.25rem;
    color: var(--text-color);
    line-height: 1.8;
    margin: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    opacity: 0.9;
}

/* Proper spacing between description and carousel */
.homepage-hero-section--before-carousel .homepage-hero-content {
    margin-bottom: 0;
    padding-bottom: 0;
}

.homepage-hero-actions {
    display: flex;
    display: -webkit-flex; /* Safari/Opera support */
    gap: 1rem;
    /* Fallback for older Safari */
    margin-right: 1rem;
    justify-content: center;
    -webkit-justify-content: center; /* Safari/Opera support */
    flex-wrap: wrap;
    -webkit-flex-wrap: wrap; /* Safari/Opera support */
    margin-top: 2rem;
    align-items: center;
    -webkit-align-items: center; /* Safari/Opera support */
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

@supports (gap: 1rem) {
    .homepage-hero-actions {
        margin-right: 0;
    }
}

.btn-hero {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    display: -webkit-inline-flex; /* Safari/Opera support */
    align-items: center;
    -webkit-align-items: center; /* Safari/Opera support */
    gap: 0.75rem;
    /* Fallback for older Safari */
    margin-right: 0.75rem;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease; /* Safari/Opera support */
    white-space: nowrap;
    /* Ensure visibility in Safari/Opera */
    visibility: visible !important;
    opacity: 1 !important;
    /* Fix button rendering in Safari/Opera */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Prevent text selection issues */
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    flex: 0 1 auto;
}

@supports (gap: 0.75rem) {
    .btn-hero {
        margin-right: 0;
    }
}

.btn-hero.btn-primary {
    background: var(--accent-color-1);
    color: white;
    border: 2px solid var(--accent-color-1);
}

.btn-hero.btn-primary:hover {
    background: var(--accent-color-2);
    border-color: var(--accent-color-2);
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px); /* Safari/Opera support */
    box-shadow: 0 4px 12px rgba(106, 84, 46, 0.3);
}

.btn-hero.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--text-color);
}

.btn-hero.btn-secondary:hover {
    background: var(--text-color);
    color: var(--bg-color);
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px); /* Safari/Opera support */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 968px) {
    .homepage-mission-section {
        padding: 2.5rem 0;
    }
    
    .homepage-mission-title {
        font-size: 2rem;
        margin-bottom: 2rem;
        padding-bottom: 1rem;
    }
    
    .homepage-mission-title::after {
        width: 70px;
        height: 3px;
    }
    
    .homepage-mission-paragraph {
        font-size: 1.1rem;
        line-height: 1.7;
        margin-bottom: 1.25rem;
    }
    
    .homepage-mission-paragraph:first-of-type {
        font-size: 1.25rem;
        margin-bottom: 1.75rem;
        padding: 0;
    }
    
    .homepage-mission-paragraph--highlight,
    .homepage-mission-paragraph.homepage-mission-paragraph--highlight,
    .homepage-mission-text .homepage-mission-paragraph--highlight {
        font-size: 1.3rem !important;
        margin-top: 1.5rem !important;
    }
    
    .homepage-hero-section {
        padding: 2.5rem 0 0.75rem 0;
        margin-bottom: 0;
    }
    
    .homepage-guru-carousel-section + .homepage-hero-section {
        padding: 2.5rem 0;
    }
    
    .homepage-hero-title {
        font-size: 2.25rem;
        margin-bottom: 1.25rem;
    }
    
    .homepage-hero-title::after {
        width: 70px;
        height: 3px;
    }
    
    .homepage-hero-description {
        font-size: 1.1rem;
        line-height: 1.7;
        margin-bottom: 0;
    }
    
    .homepage-hero-section--before-carousel {
        padding-bottom: 0;
        padding-top: 2.5rem;
    }
    
    .homepage-hero-description {
        margin-bottom: 0;
    }
    
    .homepage-guru-carousel-section {
        padding: 0.25rem 0 1.5rem 0;
        margin-top: 0;
    }
    
    .homepage-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-hero {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .homepage-mission-section {
        padding: 2rem 0;
    }
    
    .homepage-mission-content {
        padding: 0 15px;
    }
    
    .homepage-mission-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
        padding-bottom: 1rem;
    }
    
    .homepage-mission-title::after {
        width: 70px;
        height: 3px;
    }
    
    .homepage-mission-paragraph {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
    
    .homepage-mission-paragraph:first-of-type {
        font-size: 1.15rem;
        margin-bottom: 1.5rem;
        padding: 0;
    }
    
    .homepage-mission-paragraph--highlight,
    .homepage-mission-paragraph.homepage-mission-paragraph--highlight,
    .homepage-mission-text .homepage-mission-paragraph--highlight {
        font-size: 1.2rem !important;
        margin-top: 1.25rem !important;
    }
    
    .homepage-hero-section {
        padding: 2rem 0;
        margin-bottom: 1.5rem;
    }
    
    .homepage-hero-content {
        padding: 0 15px;
    }
    
    .homepage-hero-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .homepage-hero-description {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .homepage-hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .btn-hero {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .homepage-mission-section {
        padding: 1.5rem 0;
    }
    
    .homepage-mission-content {
        padding: 0 10px;
    }
    
    .homepage-mission-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.875rem;
    }
    
    .homepage-mission-title::after {
        width: 60px;
        height: 3px;
    }
    
    .homepage-mission-paragraph {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 0.875rem;
    }
    
    .homepage-mission-paragraph:first-of-type {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
        padding: 0;
    }
    
    .homepage-mission-paragraph--highlight,
    .homepage-mission-paragraph.homepage-mission-paragraph--highlight,
    .homepage-mission-text .homepage-mission-paragraph--highlight {
        font-size: 1.15rem !important;
        margin-top: 1rem !important;
    }
    
    .homepage-hero-section {
        padding: 1.5rem 0 0.5rem 0;
        margin-bottom: 0;
    }
    
    .homepage-guru-carousel-section + .homepage-hero-section {
        padding: 1.5rem 0;
    }
    
    .homepage-hero-content {
        padding: 0 10px;
    }
    
    .homepage-hero-title {
        font-size: 1.75rem;
        margin-bottom: 0.875rem;
    }
    
    .homepage-hero-title::after {
        width: 60px;
        height: 3px;
    }
    
    .homepage-hero-description {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 0;
    }
    
    .homepage-hero-section--before-carousel {
        padding-bottom: 0;
        padding-top: 1.5rem;
    }
    
    .homepage-hero-description {
        margin-bottom: 0;
    }
    
    .homepage-guru-carousel-section {
        padding: 0.25rem 0 1rem 0;
        margin-top: 0;
    }
    
    .btn-hero {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        white-space: normal;
        line-height: 1.4;
    }
}

/* Guru Carousel Section - Full Width */
.homepage-guru-carousel-section {
    width: 100%;
    max-width: 100%;
    padding: 1.5rem 0;
    margin: 0;
    margin-top: 0;
    background: transparent;
    overflow: visible;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.homepage-guru-carousel-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    padding: 0;
    margin: 0;
}


.homepage-guru-carousel {
    width: 100%;
    overflow: visible;
}

.homepage-guru-carousel .swiper-wrapper {
    display: flex;
    align-items: center;
    transition-timing-function: linear !important;
    will-change: transform;
}

.homepage-guru-carousel .swiper-slide {
    width: auto !important;
    height: auto;
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.guru-carousel-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
    gap: 0.75rem;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.guru-carousel-link:active {
    opacity: 1;
}

.guru-carousel-link:hover {
    opacity: 1;
}

.guru-carousel-image-wrapper {
    width: 150px;
    height: 150px;
    overflow: hidden;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease, background 0.3s ease;
    background: linear-gradient(135deg, var(--accent-color-1), var(--accent-color-2));
    flex-shrink: 0;
    padding: 4px;
    box-sizing: border-box;
    position: relative;
}

/* Red border for scammer profiles */
.guru-carousel-link--scammer .guru-carousel-image-wrapper {
    background: #dc3545;
    border: 4px solid #dc3545;
    padding: 0;
}

.guru-carousel-link--scammer:hover .guru-carousel-image-wrapper {
    background: #c82333;
    border-color: #c82333;
}

.guru-carousel-link:hover .guru-carousel-image-wrapper {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, var(--accent-color-2), var(--accent-color-1));
}

.guru-carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    background: var(--bg-color);
}

.guru-carousel-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.guru-carousel-link:hover .guru-carousel-name {
    color: var(--accent-color-1);
}

@media (max-width: 968px) {
    .guru-carousel-image-wrapper {
        width: 120px;
        height: 120px;
        padding: 3px;
    }
    
    .guru-carousel-name {
        font-size: 0.8rem;
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .homepage-guru-carousel-section {
        padding: 0.5rem 0 1rem 0;
        margin: 0;
        margin-top: -0.5rem;
    }
    
    .guru-carousel-image-wrapper {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        padding: 3px;
    }
    
    .guru-carousel-name {
        font-size: 0.75rem;
        max-width: 100px;
    }
}

/* Homepage Carousel */
.homepage-carousel-wrapper {
    width: 100%;
    max-width: 100%;
    margin-top: 2rem;
    margin-bottom: 3rem;
    position: relative;
    display: block;
    visibility: visible;
    background: transparent;
    box-sizing: border-box;
}

.carousel-title-section {
    text-align: center;
    margin-bottom: 2rem;
    padding-top: 0;
    width: 100%;
    background: transparent;
}

.carousel-title-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.homepage-carousel {
    width: 100%;
    position: relative;
    padding: 0;
    display: block;
    visibility: visible;
    background: transparent;
}

.homepage-carousel .container {
    max-width: 100%;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.carousel-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.carousel-main-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color-1), var(--accent-color-2));
    border-radius: 2px;
}

@media (max-width: 968px) {
    .carousel-main-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .carousel-title-section {
        padding-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .carousel-main-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .carousel-title-section {
        padding-top: 1rem;
        margin-bottom: 1rem;
    }
    
    .carousel-main-title {
        font-size: 1.5rem;
        letter-spacing: 0.5px;
    }
    
    .carousel-main-title::after {
        width: 80px;
        height: 3px;
    }
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0 50px; /* Space for navigation buttons */
    box-sizing: border-box;
    /* Safari/Opera fixes */
    -webkit-transform: translateZ(0); /* Force hardware acceleration */
    transform: translateZ(0);
}

/* Swiper container fixes for Safari/Opera */
.homepage-carousel-swiper,
.swiper {
    width: 100%;
    height: 100%;
    /* Safari/Opera compatibility */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    position: relative;
    overflow: hidden;
}

.swiper-wrapper {
    display: flex;
    display: -webkit-flex; /* Safari/Opera support */
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition-property: transform;
    -webkit-transition-property: -webkit-transform; /* Safari/Opera */
    box-sizing: content-box;
}

.swiper-slide {
    flex-shrink: 0;
    -webkit-flex-shrink: 0; /* Safari/Opera support */
    width: 100%;
    height: 100%;
    position: relative;
    transition-property: transform;
    -webkit-transition-property: -webkit-transform; /* Safari/Opera */
}

.carousel-slider {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    transition: transform 0.5s ease-in-out;
    overflow: hidden;
}

/* Desktop: 4 per row (default, >968px) */
.carousel-slide {
    min-width: calc(25% - 0.75rem) !important;
    width: calc(25% - 0.75rem) !important;
    max-width: calc(25% - 0.75rem) !important;
    height: 100%;
    position: relative;
    flex-shrink: 0;
    margin-right: 1rem;
    box-sizing: border-box;
}

.carousel-slide:nth-child(4n) {
    margin-right: 0;
}

/* Ensure 4 slides fit properly on desktop */
@media (min-width: 969px) {
    .carousel-slider {
        width: 100%;
    }
    
    .carousel-slide {
        flex: 0 0 calc(25% - 0.75rem) !important;
    }
}

.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    overflow: hidden;
    border-radius: 6px;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    -webkit-transition: transform 0.5s ease; /* Safari/Opera support */
    border-radius: 6px;
}

.carousel-link:hover .carousel-image {
    transform: scale(1.05);
    -webkit-transform: scale(1.05); /* Safari/Opera support */
}

.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    padding: 2rem;
    z-index: 2;
}

.carousel-content {
    max-width: 1200px;
    margin: 0 auto;
}

.carousel-title {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    -webkit-transform: translateY(-50%); /* Safari/Opera support */
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    display: -webkit-flex; /* Safari/Opera support */
    align-items: center;
    -webkit-align-items: center; /* Safari/Opera support */
    justify-content: center;
    -webkit-justify-content: center; /* Safari/Opera support */
    z-index: 10;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease; /* Safari/Opera support */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    /* Ensure visibility in Safari/Opera */
    visibility: visible !important;
    opacity: 1 !important;
    /* Fix button rendering */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.carousel-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    -webkit-transform: translateY(-50%) scale(1.1); /* Safari/Opera support */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
    -webkit-transform: translateY(-50%) scale(0.95); /* Safari/Opera support */
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

.carousel-nav i {
    font-size: 1.25rem;
    color: var(--accent-color-1);
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%); /* Safari/Opera support */
    display: flex;
    display: -webkit-flex; /* Safari/Opera support */
    gap: 0.75rem;
    /* Fallback for older Safari */
    margin-right: 0.75rem;
    z-index: 10;
    /* Ensure visibility in Safari/Opera */
    visibility: visible !important;
    opacity: 1 !important;
}

@supports (gap: 0.75rem) {
    .carousel-indicators {
        margin-right: 0;
    }
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease; /* Safari/Opera support */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    /* Ensure visibility */
    visibility: visible !important;
    opacity: 1 !important;
    display: block;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
    -webkit-transform: scale(1.2); /* Safari/Opera support */
}

.carousel-indicator.active {
    background: white;
    transform: scale(1.3);
    -webkit-transform: scale(1.3); /* Safari/Opera support */
}

/* Swiper container fixes for Safari/Opera */
.homepage-carousel-swiper,
.swiper {
    width: 100%;
    height: 100%;
    /* Safari/Opera compatibility */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    position: relative;
    overflow: hidden;
}

.swiper-wrapper {
    display: flex;
    display: -webkit-flex; /* Safari/Opera support */
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition-property: transform;
    -webkit-transition-property: -webkit-transform; /* Safari/Opera */
    box-sizing: content-box;
}

.swiper-slide {
    flex-shrink: 0;
    -webkit-flex-shrink: 0; /* Safari/Opera support */
    width: 100%;
    height: 100%;
    position: relative;
    transition-property: transform;
    -webkit-transition-property: -webkit-transform; /* Safari/Opera */
}

/* Swiper pagination fixes for Safari/Opera */
.swiper-pagination,
.swiper-pagination-bullets {
    position: absolute !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    -webkit-transform: translateX(-50%) !important; /* Safari/Opera support */
    display: flex !important;
    display: -webkit-flex !important; /* Safari/Opera support */
    gap: 0.75rem !important;
    z-index: 10 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.swiper-pagination-bullet {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    border: 2px solid white !important;
    background: transparent !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: all 0.3s ease !important;
    -webkit-transition: all 0.3s ease !important; /* Safari/Opera support */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    display: block !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.swiper-pagination-bullet-active {
    background: white !important;
    transform: scale(1.3) !important;
    -webkit-transform: scale(1.3) !important; /* Safari/Opera support */
}

/* Tablet: 2 per row (769px - 968px) */
@media (max-width: 968px) and (min-width: 769px) {
    .carousel-slide {
        min-width: calc(50% - 0.5rem) !important;
        width: calc(50% - 0.5rem) !important;
        max-width: calc(50% - 0.5rem) !important;
        margin-right: 1rem;
    }
    
    .carousel-slide:nth-child(2n) {
        margin-right: 0;
    }
    
    .carousel-slider {
        height: 350px;
    }
    
    .carousel-container {
        padding: 0 40px;
    }
    
    .carousel-prev {
        left: 0;
    }
    
    .carousel-next {
        right: 0;
    }
    
    .carousel-slide {
        flex: 0 0 calc(50% - 0.5rem) !important;
    }
}

/* Mobile: 2 per row (≤768px) */
@media (max-width: 768px) {
    .carousel-slide {
        min-width: calc(50% - 0.5rem) !important;
        width: calc(50% - 0.5rem) !important;
        max-width: calc(50% - 0.5rem) !important;
        margin-right: 1rem;
    }
    
    .carousel-slide:nth-child(2n) {
        margin-right: 0;
    }
    
    .carousel-slider {
        height: 300px;
    }
    
    .carousel-title {
        font-size: 1.5rem;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
    }
    
    .carousel-container {
        padding: 0 35px;
    }
    
    .carousel-prev {
        left: 0;
    }
    
    .carousel-next {
        right: 0;
    }
    
    .carousel-overlay {
        padding: 1.5rem;
    }
    
    .carousel-slide {
        flex: 0 0 calc(50% - 0.5rem) !important;
    }
}

@media (max-width: 480px) {
    .carousel-slider {
        height: 250px;
    }
    
    .carousel-title {
        font-size: 1.25rem;
    }
    
    .carousel-nav {
        width: 35px;
        height: 35px;
    }
    
    .carousel-nav i {
        font-size: 1rem;
    }
    
    .carousel-slide {
        margin-right: 0.5rem;
        padding: 0 0.25rem;
    }
    
    .carousel-container {
        padding: 0 30px;
    }
}

/* Forum Homepage Styles */
.forum-homepage {
    padding: 0;
    width: 100%;
    min-height: 100vh;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
}

.forum-homepage .container {
    max-width: 1200px;
    margin-left: 0;
    margin-right: auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Mobile: Fix homepage alignment */
@media (max-width: 968px) {
    /* Homepage sections - ensure full width */
    .homepage-hero-section,
    .homepage-mission-section,
    .homepage-carousel-wrapper,
    .forum-homepage {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Containers inside homepage - proper padding */
    .homepage-hero-section .container,
    .homepage-mission-section .container,
    .carousel-title-section .container,
    .forum-homepage .container {
        padding-left: 15px;
        padding-right: 15px;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100%;
    }
    
    /* Carousel container - no padding */
    .homepage-carousel .container {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Desktop: Optimized full-width layout */
@media (min-width: 969px) {
    .main-content-wrapper {
        overflow-x: hidden;
    }
    
    .homepage-hero-section,
    .homepage-mission-section,
    .homepage-carousel-wrapper,
    .forum-homepage {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
        overflow-x: hidden;
    }
    
    .homepage-hero-section .container,
    .homepage-mission-section .container,
    .homepage-carousel-wrapper .container,
    .forum-homepage .container {
        width: 100%;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
    }
    
    .homepage-mission-content {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    
    .homepage-hero-content {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    
    .homepage-hero-actions {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        flex-wrap: wrap;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }
    
    .homepage-carousel .container {
        width: 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
        box-sizing: border-box;
    }
    
    .carousel-title-section .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
        box-sizing: border-box;
    }
}

.forum-header {
    background: linear-gradient(135deg, var(--accent-color-1) 0%, var(--accent-color-2) 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
}

.forum-main-title {
    font-size: 2.5rem;
    margin: 0 0 0.5rem;
    color: white;
    font-weight: 700;
}

.forum-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* Forum Layout - Full Width */
.forum-layout {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 2rem;
}

.forum-homepage .container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Categories Menu */
.categories-menu {
    margin: 0;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    margin: 0;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.category-link:hover {
    background: var(--hover-bg);
    color: var(--accent-color-1);
}

.category-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: var(--accent-color-1);
}

.category-name {
    flex: 1;
}

.category-count {
    background: var(--accent-color-1);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.category-description {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
    padding-left: 2.75rem;
}

.category-item--all .category-link {
    font-weight: 700;
    background: var(--hover-bg);
}

.category-item--all .category-link:hover {
    background: var(--accent-color-1);
    color: white;
}

.category-item--all .category-link i {
    color: var(--accent-color-1);
}

.category-item--all .category-link:hover i {
    color: white;
}

/* Forum Stats */
.forum-stats .stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--hover-bg);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    transition: background 0.2s ease;
}

.stat-item:hover {
    background: var(--accent-color-1);
    color: white;
}

.stat-item:hover .stat-label,
.stat-item:hover .stat-value {
    color: white;
}

.stat-label {
    font-weight: 500;
    color: var(--text-color);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color-1);
}

.forum-main {
    min-width: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
}

/* Mobile: Fix alignment for homepage sections */
@media (max-width: 968px) {
    /* Ensure parent elements allow sticky positioning on homepage */
    /* Sticky positioning requires parent to not have overflow hidden/auto on scroll axis */
    body.home,
    html body.home {
        overflow-x: hidden !important;
        overflow-y: visible !important; /* CRITICAL: Must be visible for sticky to work */
        height: auto !important;
        min-height: 100% !important;
        max-height: none !important;
    }
    
    body.home .main-content-wrapper,
    .home .main-content-wrapper {
        overflow-x: hidden !important;
        overflow-y: visible !important; /* CRITICAL: Must be visible for sticky to work */
    }
    
    /* Ensure no wrapper breaks sticky on homepage */
    body.home > *:not(.mobile-header-v2) {
        overflow-y: visible !important;
    }
    
    /* Reset body and html on mobile - CRITICAL for sticky */
    /* html is the scrolling container - this allows sticky to work */
    html,
    html:root {
        padding-left: 0 !important;
        margin-left: 0 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: 100% !important;
        min-height: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* CRITICAL: body should NOT have overflow-y: auto - this breaks sticky! */
    /* body must have overflow-y: visible to allow sticky positioning */
    body,
    html body,
    body.home,
    html body.home {
        padding-left: 0 !important;
        margin-left: 0 !important;
        overflow-x: hidden !important;
        /* CRITICAL: overflow-y: visible is REQUIRED for sticky to work */
        overflow-y: visible !important;
        height: auto !important;
        min-height: 100% !important;
        max-height: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Homepage sections - ensure they start at left edge */
    .homepage-hero-section,
    .homepage-mission-section,
    .homepage-carousel-wrapper,
    .forum-homepage {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Containers inside homepage sections */
    .homepage-hero-section .container,
    .homepage-mission-section .container,
    .homepage-carousel-wrapper .container,
    .forum-homepage .container,
    .carousel-title-section .container {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Carousel container - no padding on mobile */
    .homepage-carousel .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .carousel-container {
        padding-left: 35px !important;
        padding-right: 35px !important;
    }
    
    /* Ensure NEW mobile header v2 is full width on homepage */
    html body.home > .mobile-header-v2,
    body.home > .mobile-header-v2,
    html body.home .mobile-header-v2,
    body.home .mobile-header-v2 {
        position: relative !important; /* Scrolls with page */
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
    }
}

/* Responsive Forum */
@media (max-width: 968px) {
    .forum-homepage {
        padding: 0;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .forum-homepage .container {
        padding: 0 15px !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .forum-layout {
        display: block;
        width: 100%;
        margin-top: 1rem;
    }
    
    .forum-main {
        width: 100%;
    }
    
    .categories-menu {
        display: block !important;
    }
    
    .category-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem;
    }
    
    .category-item {
        width: 100% !important;
    }
    
    
    .structItem {
        padding: 0.75rem !important;
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
    }
    
    .structItem-cell {
        padding: 0.25rem !important;
    }
    
    .structItem-cell--icon {
        min-width: 40px !important;
    }
    
    .structItem-cell--main {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        order: 1 !important;
    }
    
    .structItem-cell--meta {
        grid-column: 2 !important;
        order: 2 !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 1rem !important;
        align-items: center !important;
        padding: 0 !important;
        margin-top: 0.25rem !important;
        width: 100% !important;
        flex-wrap: wrap !important;
    }
    
    .structItem-cell--meta .pairs {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.25rem !important;
        margin: 0 !important;
    }
    
    .structItem-cell--meta .pairs dt {
        font-size: 0.75rem !important;
        margin: 0 !important;
    }
    
    .structItem-cell--meta .pairs dd {
        font-size: 0.85rem !important;
        font-weight: 600 !important;
        margin: 0 !important;
    }
    
    .structItem-cell--latest {
        grid-column: 2 !important;
        order: 2 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        padding: 0 !important;
        margin-left: 1rem !important;
        width: auto !important;
        min-width: auto !important;
    }
    
    .structItem-latest-label {
        font-size: 0.75rem !important;
        color: #666 !important;
        font-weight: 500 !important;
    }
    
    .structItem-cell--latest .structItem-latestDate {
        font-size: 0.85rem !important;
    }
    
    .structItem-cell--latest .structItem-minor {
        display: none !important;
    }
    
    .structItem-cell--iconEnd {
        order: 3 !important;
        min-width: 40px !important;
    }
    
    .structItem-title {
        font-size: 0.95rem !important;
        line-height: 1.4 !important;
        margin: 0 0 0.5rem 0 !important;
        font-weight: 600 !important;
    }
    
    .structItem-title a {
        display: block !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .structItem-minor {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        margin: 0 !important;
    }
    
    .structItem-parts {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        align-items: center !important;
        font-size: 0.8rem !important;
        margin: 0 !important;
    }
    
    .structItem-parts li {
        margin: 0 !important;
        font-size: 0.8rem !important;
    }
    
    .structItem-parts li::after {
        content: '•';
        margin-left: 0.5rem;
        color: #999;
    }
    
    .structItem-parts li:last-child::after {
        display: none;
    }
    
    .forum-layout {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .forum-main {
        width: 100%;
    }
    
    .categories-menu {
        display: block !important;
    }
    
    .category-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem;
    }
    
    .category-item {
        background: var(--bg-color);
        border: 1px solid var(--border-color);
        border-radius: 6px;
    }
    
    .category-link {
        padding: 1rem;
    }
    
    .category-description {
        display: none;
    }
    
    .forum-main-title {
        font-size: 2rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .category-card {
        padding: 1.5rem;
    }
}

/* Thread List Styles - BlackHatWorld Style */
.block {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.block-container {
    display: flex;
    flex-direction: column;
}

.block-header {
    background: var(--hover-bg);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.25rem;
    font-weight: 600;
}

.block-header a {
    color: var(--text-color);
    text-decoration: none;
}

.block-header a:hover {
    color: var(--accent-color-1);
}

.block-body {
    padding: 0;
}

.structItemContainer {
    display: flex;
    flex-direction: column;
}

.structItem {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
    transition: background 0.2s ease;
}

.structItem:last-child {
    border-bottom: none;
}

.structItem:hover {
    background: var(--hover-bg);
}

.structItem-cell {
    display: flex;
    align-items: center;
    padding: 0.5rem;
}

.structItem-cell--icon {
    flex-shrink: 0;
    min-width: 60px;
}

.structItem-cell--main {
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.structItem-cell--meta {
    flex-shrink: 0;
    min-width: 100px;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.structItem-cell--latest {
    flex-shrink: 0;
    min-width: 150px;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    text-align: right;
}

.structItem-cell--iconEnd {
    flex-shrink: 0;
    min-width: 50px;
}

/* Hide right avatar on desktop */
@media (min-width: 969px) {
    .structItem-cell--mobile-only {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}

.structItem-iconContainer {
    display: flex;
    align-items: center;
    justify-content: center;
}

.structItem-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.structItem-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.structItem-title a:hover {
    color: var(--accent-color-1);
}

.structItem-minor {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.structItem-parts {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.structItem-parts li {
    margin: 0;
}

.structItem-parts a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.structItem-parts a:hover {
    color: var(--accent-color-1);
}

.structItem-startDate a {
    color: #666;
}

.structItem-pageJump {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.structItem-pageJump a {
    padding: 0.25rem 0.5rem;
    background: var(--hover-bg);
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s ease;
}

.structItem-pageJump a:hover {
    background: var(--accent-color-1);
    color: white;
}

.pairs {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.pairs--justified {
    text-align: right;
}

.pairs dt {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.pairs dd {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.structItem-latestDate {
    font-size: 0.9rem;
    color: #666;
}

.structItem-latestDate a {
    color: #666;
    text-decoration: none;
}

.structItem-latestDate a:hover {
    color: var(--accent-color-1);
}

.structItem-latest-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    margin-right: 0.5rem;
}

.username {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.username:hover {
    color: var(--accent-color-1);
}

.avatar {
    border-radius: 50%;
    display: block;
}

.avatar--s {
    width: 48px;
    height: 48px;
}

.avatar--xxs {
    width: 32px;
    height: 32px;
}

.block-footer {
    padding: 1rem 1.5rem;
    background: var(--hover-bg);
    border-top: 1px solid var(--border-color);
}

.block-footer-controls {
    display: flex;
    justify-content: flex-end;
}

.button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: var(--accent-color-1);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.button:hover {
    background: var(--accent-color-2);
    color: white;
}

.button-text {
    margin: 0;
}

.no-threads-message {
    padding: 3rem;
    text-align: center;
    color: #666;
}

.no-threads-message p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.no-categories {
    padding: 1rem;
    text-align: center;
    color: #666;
    font-style: italic;
}

