:root {
    --primary: #ff007f;
    /* Neon Pink */
    --secondary: #00ffff;
    /* Cyan */
    --accent: #ff8c00;
    --bg-dark: #05010a;
    --bg-card: rgba(36, 11, 54, 0.4);
    --text-light: #f0f0f0;
    --font-main: 'Inter', sans-serif;
    --neon-shadow: 0 0 10px var(--primary);
    --cyan-shadow: 0 0 10px var(--secondary);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Infinity Perspective Grid */
.grid-container {
    position: fixed;
    top: 50%;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image:
        linear-gradient(var(--secondary) 1px, transparent 1px),
        linear-gradient(90deg, var(--secondary) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(300px) rotateX(60deg);
    transform-origin: top;
    z-index: -2;
    mask-image: linear-gradient(to bottom, transparent, black);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black);
    opacity: 0.3;
}

/* Mountains Wireframe Placeholder */
.mountains-gradient {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60vh;
    background: linear-gradient(to top, #6b0034a1, transparent);
    z-index: -1;
    pointer-events: none;
}

/* Removed the dimming overlay that was blocking visibility */

/* Glassmorphism */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

#sobre.glass {
    padding: 25px 35px;
    max-width: 900px;
    margin: 40px auto;
}

/* Typography */
h1,
h2,
h3 {
    text-transform: uppercase;
    letter-spacing: 2px;
}

.neon-text {
    color: var(--primary);
    text-shadow: var(--neon-shadow);
}

.cyan-text {
    color: var(--secondary);
    text-shadow: var(--cyan-shadow);
}

/* Layout */
#home {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, rgba(255, 0, 127, 0.1) 0%, transparent 80%);
}

#home img {
    transition: all 0.3s ease;
}

#home img:hover {
    filter: drop-shadow(0 0 35px var(--primary)) brightness(1.2);
    animation: shaking 0.2s infinite;
}

@keyframes shaking {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(2px, 1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    75% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(-2px, -1px) rotate(1deg);
    }
}

header {
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 2000;
    background: rgba(10, 5, 16, 0.95);
    border-bottom: 1px solid var(--primary);
    backdrop-filter: blur(20px);
}

header img {
    height: 30px;
    width: auto;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a:hover {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    background: rgba(255, 0, 127, 0.1);
}

/* Sections */
section {
    padding: 30px 10%;
    /* Reduced padding */
    min-height: 40vh;
    /* Reduced min-height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

#sobre {
    display: block;
    /* remove o flex */
    min-height: auto;
    /* remove o 40vh */
    padding: 60px 10%;
    margin: 40px auto;
    max-width: 900px;
}

#sobre h2 {
    margin-bottom: 15px;
}

#sobre p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-top: 10px;
}

/* Members Horizontal Layout */
.members-grid {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 20px 0;
    scrollbar-width: none;
    cursor: grab;
}

.members-grid::-webkit-scrollbar {
    display: none;
}

.member-card {
    min-width: 220px;
    width: 220px;
    height: 320px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.3s;
    cursor: pointer;
    transform-style: preserve-3d;
    will-change: transform;
    border-radius: 12px;
}

.member-card:hover {
    box-shadow: var(--neon-shadow);
}

.member-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(transparent, rgba(10, 5, 16, 0.9));
}

.member-details-area {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
    background: rgba(36, 11, 54, 0.3);
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid transparent;
}

.member-details-area.active {
    max-height: 500px;
    /* Large enough to fit text */
    padding: 30px;
    border: 1px solid var(--primary);
    box-shadow: var(--neon-shadow);
    transition: max-height 0.5s ease-in;
}

/* Instagram Icon in Member Details */
.instagram-link {
    display: inline-block;
    text-decoration: none;
}

.instagram-icon {
    width: 67px;
    height: 67px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.instagram-link:hover .instagram-icon {
    transform: scale(1.2) rotate(8deg);
    filter: drop-shadow(0 0 15px var(--primary));
}


.carousel-container {
    width: 100%;
    position: relative;
    margin: 20px 0;
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 0, 127, 0.4);
    color: #fff;
    border: 1px solid var(--primary);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 500;
    display: none;
    /* Hidden by default, shown by JS if needed */
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: 0.3s;
    outline: none;
}

.carousel-nav-btn.visible {
    display: flex;
}

.carousel-nav-btn:hover {
    background: var(--primary);
    box-shadow: 0 0 20px var(--primary);
}

/* Carousel Items */
.video-item {
    min-width: 300px;
    height: 180px;
    background: #333;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s, z-index 0.3s;
    cursor: pointer;
    position: relative;
    transform-origin: center;
    flex-shrink: 0;
}

.video-item:hover {
    transform: scale(1.15);
    z-index: 100;
    box-shadow: 0 0 25px var(--secondary);
}

.members-grid,
.video-carousel {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 45px 15px;
    justify-content: flex-start;
    /* Ensure it starts at the beginning */
    /* Added more padding to avoid clipping on hover */
    scrollbar-width: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.members-grid::-webkit-scrollbar,
.video-carousel::-webkit-scrollbar {
    display: none;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    header {
        height: auto;
        padding: 10px 5%;
        flex-direction: column;
        gap: 10px;
        position: relative;
    }

    nav ul {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    section {
        padding: 30px 5%;
    }

    .neon-text {
        font-size: 1.8rem;
    }

    .cyan-text {
        font-size: 0.9rem;
    }

    .carousel-nav-btn {
        display: none;
        /* Auto scroll/touch on mobile */
    }

    .carousel-nav-btn.visible {
        display: none;
        /* Keep hidden on mobile, use touch scroll */
    }

    .carousel-container {
        padding: 0;
    }

    .members-grid,
    .video-carousel {
        padding: 20px 0;
    }

    #home img {
        max-width: 250px;
    }
}

/* Agenda */
.agenda-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
}

.agenda-row {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 25px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 8px;
    transition: 0.3s;
}

.agenda-row:hover {
    background: rgba(255, 0, 127, 0.15);
    border-color: var(--primary);
    box-shadow: var(--neon-shadow);
}

/* Contact Section Styles */
#contato {
    max-width: 900px;
    margin: 40px auto;
    padding: 60px 10%;
    text-align: center;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.contact-btn img {
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
    transition: all 0.3s ease;
}

.contact-btn.instagram img {
    width: 63px;
    height: 63px;
}

.contact-btn.whatsapp img {
    width: 55px;
    height: 55px;
}

.contact-btn:hover {
    transform: scale(1.2) translateY(-10px);
}

.contact-btn.instagram:hover img {
    filter: drop-shadow(0 0 20px var(--primary));
}

.contact-btn.whatsapp:hover img {
    filter: drop-shadow(0 0 20px #25D366);
}

.contact-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    z-index: -1;
    opacity: 0;
    transition: all 0.5s ease;
}

.contact-btn:hover::after {
    transform: scale(1.5);
    opacity: 0;
}

@media (max-width: 768px) {
    .contact-buttons {
        gap: 30px;
    }
    
    .contact-btn.instagram img {
        width: 45px;
        height: 45px;
    }
    
    .contact-btn.whatsapp img {
        width: 42px;
        height: 42px;
    }
}