/* Import Poppins font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-color: #111;
    --text-color: #fff;
    --primary-color: #007bff;
}

html {
    font-size: clamp(14px, 2.5vw, 16px);
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    max-width: 100vw;
}

.atropos-main {
    width: 100%;
    height: 100vh;
    min-height: 600px;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    border: none;
    overflow: hidden;
    will-change: transform;
    backface-visibility: hidden;
}

main {
    height: 100%;
    min-height: 600px;
    padding: 0;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;

    h1 {
        font-size: clamp(2.5rem, 8vw, 6.5rem);
        font-weight: 600;
        text-align: center;
        background: linear-gradient(135deg, var(--primary-color), #00d4ff, #ff6b6b);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        background-size: 200% 200%;
        animation: gradientShift 3s ease-in-out infinite alternate;
        margin: 2rem 1rem;
        line-height: 1.2;
        padding: 2rem;
        border-radius: 20px;
        background-color: rgba(255, 255, 255, 0.03);
        backdrop-filter: blur(15px);
        transform: translateZ(0);
    }

    .social-icons {
        display: flex;
        gap: 1.5rem;
        margin: 1rem 1rem 3rem 1rem;
        padding: 1.2rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(20px);
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.15);
        transform: translateZ(0);
    }

    .social-icons a {
        color: var(--text-color);
        font-size: 1.5rem;
        padding: 0.75rem;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        transition: all 0.3s ease;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 3rem;
        height: 3rem;
    }

    .social-icons a:hover {
        transform: translateY(-3px);
        background: rgba(255, 255, 255, 0.2);
        color: var(--primary-color);
        box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
    }

    .social-icons a i {
        transition: transform 0.3s ease;
    }

    .social-icons a:hover i {
        transform: scale(1.1);
    }

    .scroll-indicator {
        position: absolute;
        bottom: 3rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        color: var(--text-color);
        opacity: 0.7;
        cursor: pointer;
        transition: opacity 0.3s ease;
        animation: bounce 2s infinite;
        margin: 0 1rem;
    }

    .scroll-indicator:hover {
        opacity: 1;
    }

    .scroll-indicator svg {
        margin-bottom: 0.5rem;
    }

    .scroll-indicator span {
        font-size: 0.875rem;
        font-weight: 300;
        letter-spacing: 1px;
        text-transform: uppercase;
    }
}

section {
    width: 100%;
    min-height: 50vh;
    padding: clamp(1rem, 3vw, 2rem);
    overflow-x: hidden;

    h2.title {
        margin: clamp(1rem, 3vw, 1.5rem) 0;
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }
}

.swiper {
    width: 100%;
    height: 100%;
    overflow: hidden;

    .swiper-slide {
        cursor: pointer;
        width: clamp(280px, 80vw, 400px);
        min-width: clamp(280px, 80vw, 400px);
        border-radius: 20px;
        background-color: #1d1d1d;
        box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
        padding: clamp(1rem, 3vw, 1.5rem);

        display: flex;
        flex-direction: column;
        transition: all 0.3s ease-in-out;

        
        &:hover {
            scale: 1.01;
        }

        img, iframe {
            height: clamp(150px, 25vw, 200px);
            min-height: clamp(150px, 25vw, 200px);
            object-fit: cover;
            border-radius: 15px;
            margin-bottom: 1rem;
        }

        .content {
            display: flex;
            flex-direction: column;
            justify-content: space-evenly;
            flex: 1;
            gap: 0.75rem;

            h2 {
                display: -webkit-box;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 2;
                line-clamp: 2;
                overflow: hidden;
                text-overflow: ellipsis;
                font-size: clamp(1.1rem, 2.5vw, 1.4rem);
                line-height: 1.3;
            }

            small {
                display: -webkit-box;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 4;
                line-clamp: 4;
                overflow: hidden;
                text-overflow: ellipsis;
                line-height: 1.4;
                font-size: clamp(0.8rem, 2vw, 0.9rem);
                opacity: 0.9;
            }
        }
    }

    .swiper-button-next,
    .swiper-button-prev {
        color: var(--text-color);
    }
}

.loading {
    height: 30vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Media Queries for Enhanced Responsiveness */

/* Mobile Phones - Portrait */
@media (max-width: 480px) {
    .atropos-main {
        height: 80vh;
        min-height: 80vh;
        width: 100%;
        border-radius: 0;
        margin: 0;
        overflow: hidden;
    }
    
    main {
        padding: 0;
        margin: 0;
        min-height: auto;
        height: 100%;
    }
    
    main h1 {
        font-size: clamp(2rem, 12vw, 3rem);
        margin: 1.5rem 1rem;
        padding: 1.5rem;
    }
    
    .social-icons {
        gap: 1rem;
        margin: 1rem 1rem 2rem 1rem;
        padding: 1rem;
    }
    
    .social-icons a {
        font-size: 1.2rem;
        width: 2.5rem;
        height: 2.5rem;
        padding: 0.5rem;
    }
    
    .scroll-indicator {
        bottom: 2rem;
        transform: scale(0.9);
        margin: 0 1rem;
    }
    
    .scroll-indicator span {
        font-size: 0.75rem;
    }
    
    section {
        padding: 2rem 1rem 2rem 1rem;
        min-height: 50vh;
        margin: 1rem 0;
        overflow-x: hidden;
    }
    
    .swiper {
        padding: 0 5vw; /* Reduced padding to prevent overflow */
        overflow: hidden;
    }
    
    .swiper-slide {
        width: clamp(260px, 80vw, 300px);
        min-width: clamp(260px, 80vw, 300px);
        padding: 1.5rem;
        margin: 0 auto; /* Center the slide */
    }
    
    .swiper-slide img {
        height: clamp(120px, 30vw, 150px);
        min-height: clamp(120px, 30vw, 150px);
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
}

/* Tablets - Portrait */
@media (min-width: 481px) and (max-width: 768px) {
    main h1 {
        font-size: clamp(3rem, 8vw, 5rem);
    }
    
    .swiper-slide {
        width: clamp(300px, 70vw, 350px);
        min-width: clamp(300px, 70vw, 350px);
    }
    
    .swiper-slide img {
        height: clamp(160px, 22vw, 180px);
        min-height: clamp(160px, 22vw, 180px);
    }
}

/* Tablets - Landscape & Small Laptops */
@media (min-width: 769px) and (max-width: 1024px) {
    main h1 {
        font-size: clamp(4rem, 6vw, 5.5rem);
    }
    
    .swiper-slide {
        width: clamp(320px, 60vw, 380px);
        min-width: clamp(320px, 60vw, 380px);
    }
}

/* Large Screens */
@media (min-width: 1200px) {
    section {
        padding: clamp(2rem, 4vw, 3rem);
    }
    
    .swiper-slide {
        width: clamp(350px, 25vw, 450px);
        min-width: clamp(350px, 25vw, 450px);
    }
}

/* Ultra-wide Screens */
@media (min-width: 1600px) {
    main h1 {
        font-size: clamp(5rem, 4vw, 7rem);
    }
    
    .swiper-slide {
        width: clamp(400px, 20vw, 500px);
        min-width: clamp(400px, 20vw, 500px);
    }
}

/* Gyroscope optimizations for mobile devices */
.atropos-rotate {
    will-change: transform;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

.atropos-inner {
    will-change: transform;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* Smooth transitions for gyroscope movement */
@media (max-width: 768px) {
    .atropos-rotate {
        transition: transform 0.05s ease-out;
    }
}