/* Discord Section Styles */
.discord-section {
    position: relative;
    background-color: var(--dark-bg);
    padding: 80px 0;
    overflow: visible;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.discord-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/textures/cooltexturebetter.png') center/cover no-repeat;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

.discord-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, 
        rgba(114, 137, 218, 0.15) 0%, 
        rgba(90, 108, 181, 0.12) 25%, 
        rgba(114, 137, 218, 0.08) 50%, 
        rgba(90, 108, 181, 0.05) 75%, 
        transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.discord-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.discord-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 500px;
}

/* Discord Image Container with 3D Effects */
.discord-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    transform-style: preserve-3d;
    isolation: isolate;
}

.discord-image-3d {
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
    z-index: 1;
}

/* Removed problematic glow effect */

.discord-image {
    width: 100%;
    max-width: 1000px;
    height: auto;
    border-radius: 15px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform, box-shadow;
    position: relative;
    z-index: 100;
}

.discord-image-3d:hover .discord-image {
    transform: rotateX(-5deg) rotateY(10deg) scale(1.05);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 15px 30px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(114, 137, 218, 0.5),
        0 0 30px rgba(114, 137, 218, 0.3);
}

/* Floating animation for the image */
@keyframes discordFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.discord-image-3d {
    animation: discordFloat 6s ease-in-out infinite;
}

.discord-image-3d:hover {
    animation-play-state: paused;
}

/* Discord Text Content */
.discord-text-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
    z-index: 2;
}

/* Initial states for entrance animations */
.discord-title,
.discord-reason,
.discord-join-button,
.discord-image-3d {
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.discord-title {
    transform: translateY(50px) scale(0.9);
}

.discord-reason {
    transform: translateX(-30px);
}

.discord-join-button {
    transform: translateY(30px) scale(0.95);
}

.discord-image-3d {
    transform: scale(0.8) rotateY(-15deg);
}

/* Visible states */
.discord-section.animated .discord-title,
.discord-section.animated .discord-reason,
.discord-section.animated .discord-join-button,
.discord-section.animated .discord-image-3d {
    opacity: 1;
}

.discord-section.animated .discord-title {
    transform: translateY(0) scale(1);
}

.discord-section.animated .discord-reason {
    transform: translateX(0);
}

.discord-section.animated .discord-join-button {
    transform: translateY(0) scale(1);
}

.discord-section.animated .discord-image-3d {
    transform: scale(1) rotateY(0deg);
}

/* Staggered animation delays for reasons */
.discord-section.animated .discord-reason:nth-child(1) {
    transition-delay: 0.1s;
}

.discord-section.animated .discord-reason:nth-child(2) {
    transition-delay: 0.2s;
}

.discord-section.animated .discord-reason:nth-child(3) {
    transition-delay: 0.3s;
}

.discord-section.animated .discord-reason:nth-child(4) {
    transition-delay: 0.4s;
}

.discord-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.1;
    position: relative;
    text-shadow: 
        0 0 10px rgba(114, 137, 218, 0.5),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    -webkit-text-stroke: 0.5px rgba(180, 180, 180, 0.3);
    display: flex;
    align-items: center;
    gap: 20px;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.discord-title-icon {
    width: 60px;
    height: auto;
    fill: #7289da;
    transform: rotate(-15deg);
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(114, 137, 218, 0.4));
    animation: discordIconFloat 4s ease-in-out infinite;
}

.discord-title:hover .discord-title-icon {
    transform: rotate(-15deg) scale(1.1);
    filter: drop-shadow(0 0 15px rgba(114, 137, 218, 0.6));
}

@keyframes discordIconFloat {
    0%, 100% {
        transform: rotate(-15deg) translateY(0px);
    }
    50% {
        transform: rotate(-15deg) translateY(-5px);
    }
}

/* Removed title underline */

.discord-member-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: #7289da;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    opacity: 0.9;
    text-shadow: 0 0 8px rgba(114, 137, 218, 0.3);
}

.discord-reasons {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.discord-reason {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: rgba(114, 137, 218, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(114, 137, 218, 0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    position: relative;
    backdrop-filter: blur(10px);
    overflow: hidden;
    will-change: transform, background-color, border-color;
}

.discord-reason::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(114, 137, 218, 0.2) 0%, rgba(114, 137, 218, 0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    opacity: 0;
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
}


.discord-reason:hover {
    background: rgba(114, 137, 218, 0.12);
    border-color: rgba(114, 137, 218, 0.3);
}

.discord-reason:hover::before {
    width: 250%;
    height: 250%;
    opacity: 1;
}


.reason-icon {
    font-size: 28px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(114, 137, 218, 0.2), rgba(90, 108, 181, 0.15));
    border-radius: 16px;
    border: 2px solid rgba(114, 137, 218, 0.25);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    flex-shrink: 0;
    box-shadow: 
        0 4px 12px rgba(114, 137, 218, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.reason-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.discord-reason:hover .reason-icon {
    background: linear-gradient(135deg, rgba(114, 137, 218, 0.3), rgba(90, 108, 181, 0.25));
    border-color: rgba(114, 137, 218, 0.4);
    transform: scale(1.1) rotate(5deg) !important;
}

.discord-reason:hover .reason-text {
    transform: translateX(2px) !important;
}


.reason-text {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* Discord Join Button - Discord Brand Colors with Standard Button Structure */
.discord-join-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(114, 137, 218, 0.15);
    color: #f5f5f5;
    border: 1px solid rgba(114, 137, 218, 0.3);
    border-radius: 6px;
    padding: 0.7rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(114, 137, 218, 0.2);
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
    gap: 8px;
    font-family: 'Oxanium', sans-serif;
}

.discord-join-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(114, 137, 218, 0.4) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.3s, opacity 0.5s;
}

.discord-join-button:hover {
    background-color: rgba(114, 137, 218, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(114, 137, 218, 0.3);
    border-color: rgba(114, 137, 218, 0.5);
    color: #7289da;
}

.discord-join-button:active {
    transform: translateY(0);
}

.discord-join-button:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

.discord-join-button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.discord-join-button:hover svg {
    transform: scale(1.1);
}

/* Large screens - make image even bigger */
@media (min-width: 1400px) {
    .discord-image {
        max-width: 1200px;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .discord-image {
        max-width: 1100px;
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .discord-content {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }
    
    .discord-text-content {
        align-items: center;
    }
    
    .discord-title {
        font-size: 2.5rem;
        gap: 15px;
    }
    
    .discord-title-icon {
        width: 50px;
    }
    
    .discord-image-container {
        display: none;
    }
}

@media (max-width: 768px) {
    .discord-section {
        padding: 60px 0;
    }
    
    .discord-container {
        padding: 0 15px;
    }
    
    .discord-content {
        gap: 40px;
    }
    
    .discord-text-content {
        align-items: center;
    }
    
    .discord-title {
        font-size: 2rem;
        text-align: center;
        justify-content: center;
        gap: 15px;
        white-space: nowrap;
        flex-wrap: nowrap;
    }
    
    .discord-title-icon {
        width: 45px;
    }
    
    .discord-member-count {
        text-align: center;
        font-size: 1rem;
    }
    
    /* Title underline removed */
    
    .discord-image-container {
        display: none;
    }
    
    .discord-reasons {
        gap: 18px;
        align-items: center;
    }
    
    .discord-reason {
        padding: 18px 20px;
        justify-content: center;
        text-align: center;
    }
    
    .reason-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .reason-text {
        font-size: 16px;
        text-align: center;
    }
    
    .discord-join-button {
        font-size: 1rem;
        padding: 0.7rem 1.8rem;
        align-self: center;
    }
}

@media (max-width: 480px) {
    .discord-section {
        padding: 50px 0;
    }
    
    .discord-container {
        padding: 0 10px;
    }
    
    .discord-content {
        gap: 30px;
    }
    
    .discord-text-content {
        align-items: center;
    }
    
    .discord-title {
        font-size: 1.6rem;
        justify-content: center;
        gap: 10px;
        letter-spacing: 0.5px;
        white-space: nowrap;
        flex-wrap: nowrap;
    }
    
    .discord-title-icon {
        width: 40px;
    }
    
    .discord-member-count {
        font-size: 0.95rem;
    }
    
    .discord-image {
        max-width: 420px;
    }
    
    .discord-reasons {
        gap: 16px;
    }
    
    .discord-reason {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 16px 18px;
    }
    
    .discord-reason:hover {
        transform: translateY(-3px);
    }
    
    .reason-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
    
    .reason-text {
        font-size: 15px;
        text-align: center;
    }
    
    .discord-join-button {
        font-size: 0.9rem;
        padding: 0.6rem 1.5rem;
        width: 100%;
        max-width: 280px;
    }
    
    /* Disable 3D effects on mobile for performance */
    .discord-image-3d {
        perspective: none;
        animation: none;
    }
    
    .discord-image-3d::before {
        display: none;
    }
    
    .discord-image-3d:hover .discord-image {
        transform: scale(1.02);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .discord-reason {
        border-left-color: #ffffff;
    }
    
    .reason-icon {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    .discord-join-button {
        background: #7289da;
        border: 2px solid #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .discord-image-3d {
        animation: none;
    }
    
    .discord-title-icon {
        animation: none;
    }
    
    .discord-image-3d,
    .discord-image,
    .discord-join-button,
    .discord-reason,
    .reason-icon,
    .discord-title-icon {
        transition: none;
    }
    
    .discord-image-3d:hover .discord-image {
        transform: scale(1.02);
    }
    
    .discord-title:hover .discord-title-icon {
        transform: rotate(-15deg);
    }
}

/* Extra small screens - ensure title always fits on one line */
@media (max-width: 360px) {
    .discord-title {
        font-size: 1.3rem;
        gap: 8px;
        letter-spacing: 0.3px;
        white-space: nowrap;
        flex-wrap: nowrap;
    }
    
    .discord-title-icon {
        width: 35px;
    }
    
    .discord-member-count {
        font-size: 0.85rem;
    }
}

/* Ultra small screens - aggressive scaling */
@media (max-width: 280px) {
    .discord-title {
        font-size: 1.1rem;
        gap: 6px;
        letter-spacing: 0.2px;
        white-space: nowrap;
        flex-wrap: nowrap;
    }
    
    .discord-title-icon {
        width: 30px;
    }
}
