/* style.css */

/* Variables */
:root {
    --primary: #6C63FF;
    --secondary: #FF6584;
    --dark: #1A1A1A;
    --light: rgba(255,255,255,0.9);
    --border: rgba(255,255,255,0.1);
    --primary-rgb: 108, 99, 255; 
}

/* Base Styles */
body {
    background-color: var(--dark);
    color: var(--light);
    font-family: 'Roboto Slab', serif;
    line-height: 1.6;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


main {
    flex: 1;
    padding-top: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
}

h2 {
    position: relative;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -1.2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

h3 {
    padding-top: 70px;
    margin-top: -70px;
}

/* Header & Navigation */
header {
    background: var(--dark);
    backdrop-filter: blur(10px);
    padding: 1rem 0.5rem;              /* Keep reasonable padding */
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Add a subtle shadow for separation */
    box-shadow: 0 2px 10px var(--dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    gap: 3px;           /* Creates space between the icon and text */
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light);
    text-decoration: none;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
}

.logo img {
    height: 35px;
    width: auto;   /* Maintains the correct aspect ratio */
}

@media (hover: hover) and (pointer: fine) {
    header {
        padding: 1rem 1rem;              /* Keep reasonable padding */
    }
    .logo {
        gap: 10px;
    }
    .logo img {
        height: 40px;
    }
}

.logo:active {
    opacity: 0.8;
}

.logo img {
    width: 32px;
    height: auto;
    margin-right: 0px;
}

.logo span {
    display: inline-block;
    vertical-align: middle;
    margin-left: 2px;
    color: #FFFFFF;
}

.main-nav {
    display: block;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px;
}

.main-nav ul li {
    margin: 0;
}

.main-nav ul li a {
    color: var(--light);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    transition: opacity 0.3s ease; 
    position: relative;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

/* Default state: active link is underlined */
.main-nav ul li a.active::after {
    width: 100%;
}

@media (hover: hover) and (pointer: fine) {
    /* When the UL is hovered, hide the active link's underline */
    .main-nav ul:hover li a.active::after {
        width: 0;
    }

    /* Show underline for whatever link is currently being hovered */
    .main-nav ul li a:hover::after {
        width: 100%;
    }
    
    /* Ensure the active link still gets an underline if it specifically is the one being hovered */
    .main-nav ul li a.active:hover::after {
        width: 100%;
    }
}

.main-nav ul li a:active::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.2s ease; /* Add transition */
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--light); /* Use light variable */
    transition: all 0.3s ease;
    border-radius: 1px; /* Slightly rounded ends */
}

/* Section Layouts */
.about, .team, .contact, .hero, .video {
    padding: 6rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* Hero Section */
.hero-content p {
    margin: 1.5rem 0;
    line-height: 1.8;
}

/* Team Section */
.staff-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.staff-member {
    background: rgba(255,255,255,0.05);
    padding: 2rem;
    border-radius: 1rem;
    transition: transform 0.3s ease;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

@media (hover: hover) and (pointer: fine) {
    .staff-member:hover {
        transform: translateY(-5px);
    }
}

.staff-member:active {
    transform: translateY(-5px);
}

.staff-image {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    border: 3px solid var(--primary);
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(108,99,255,0.2);
}

.staff-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.role {
    color: var(--primary);
    font-weight: 600;
    margin: 1rem 0;
    font-size: 0.95rem;
}

/* Contact Form */
form {
    max-width: 600px;
    margin: 2rem auto;
    padding: 1rem 2rem;
    background: rgba(255,255,255,0.05);
    border-radius: 1rem;
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 0.5rem;
}

input, textarea {
    width: 100%;
    padding: 12px;
    margin: 4px 0;
    border: 1px solid #ddd;
    box-sizing: border-box;
    font-family: 'Roboto Slab', serif;
    font-size: 16px;
    background: rgba(255,255,255,0.05);
    border-radius: 0.5rem;
    color: var(--light);
    transition: all 0.3s ease;
}

textarea {
    height: 120px;
    resize: vertical;
}

button {
    background: var(--primary);
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 16px;
}

@media (hover: hover) and (pointer: fine) {
    button:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(108,99,255,0.3);
    }
}

button:active {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108,99,255,0.3);
}


#formStatus {
    text-align: center;
    padding: 15px 0 0 0;
    color: #242424;
    font-size: 14px;
}

.contact iframe {
    padding: 0;
    max-width: 740px;
    width: 100%;
}

/* Video Section */
.video {
    padding: 4rem 1.5rem;
}

/* Trials Grid */
.trials-container {
    display: flex;
    justify-content: center; /* Center items horizontally */
    align-items: stretch; /* Make cards the same height */
    flex-wrap: wrap; /* Allow items to wrap to the next line on smaller screens */
    gap: 2rem; /* Space between trial items */
    padding-top: 1rem; /* Adjust as needed, provides space above the images */
    /* The .video section already has max-width and auto margins for centering */
}

.trial-item {
    flex-basis: calc(50% - 1rem); /* Two items per row, accounting for the 2rem gap */
    max-width: 550px; /* Max width for each card to prevent them from becoming too large */
    min-width: 280px; /* Minimum width before stacking or shrinking too much */
    text-align: center;
    background: rgba(150, 150, 150, 0.500); /* Subtle background for the card on the white .full-width-bg */
    padding: 0.5rem;
    border-radius: 1rem; /* Rounded corners for a modern look */
    border: 1px solid rgba(0,0,0,0.08); /* Subtle border */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Soft shadow for depth */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column; /* Ensure image and caption align vertically */
}

@media (hover: hover) and (pointer: fine) {
    .trial-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    }
}

.trial-item:active { /* For touch devices and mouse clicks */
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.trial-item img {
    width: 100%; /* Make image responsive within its container */
    height: auto; /* Maintain aspect ratio */
    border-radius: 0.5rem; /* Slightly rounded corners for the image */
    margin-bottom: 0rem; /* Space between image and caption */
    display: block; /* Remove extra space below image if any */
}

.trial-caption {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark); /* Text color will be dark, as it's on .full-width-bg */
    margin-top: auto; /* Pushes caption to the bottom if cards are stretched to same height */
    padding-top: 0.5rem; /* Some space above the caption if margin-top isn't enough */
}

/* Responsive adjustments for trials-container */
@media (max-width: 768px) {
    .trial-item {
        flex-basis: 80%; /* Allow one card per row, centered */
        /* If you prefer full width: flex-basis: 100%; */
    }
}

@media (max-width: 480px) {
    .trial-item {
        flex-basis: 95%; /* Nearly full width on very small screens */
        padding: 1rem; /* Reduce padding on very small screens */
    }
    .trials-container {
        gap: 1.5rem; /* Reduce gap on very small screens */
    }
}

/* Footer */
footer {
    margin-top: auto; /* Keep pushing to bottom */
    text-align: center;
    /* Significantly increase padding for modern feel */
    padding: 0.6rem 1rem; 
    /* Remove the inset shadow */
    /* box-shadow: inset 0 2px 2px -2px rgba(255, 255, 255, 0.5); */
    /* Add a clean top border */
    /* border-top: 1px solid var(--border);  */
}

/* Animations */
.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Hover Effects */
@media (hover: hover) and (pointer: fine) {
    .main-nav ul li a:hover {
        background-color: transparent !important;
        opacity: 0.7;
        /* background-color: rgb(128, 128, 128); */
    }
    
    .hamburger:hover {
        background-color: transparent !important;
        opacity: 0.7;
        /* background-color: rgb(128, 128, 128); */
    }
}

.main-nav ul li a:active, 
.hamburger:active {
    background-color: transparent !important;
    opacity: 0.7;
    /* background-color: rgb(128, 128, 128); */
}

/* Media Queries */
@media (min-width: 768px) {
    .about, .team, .contact, .hero, .video {
        padding: 8rem 2rem;
    }
}

@media (max-width: 768px) {
    .logo {
        font-size: 1.2rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .staff-row {
        grid-template-columns: 1fr;
    }
    
    .about, .team, .contact {
        padding: 4rem 1.5rem;
    }
    
    .hamburger {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--dark);
        transform: scaleY(0);
        transform-origin: top;
        transition: transform 0.3s ease;
        box-shadow: 0 2px 2px rgba(0,0,0,0.5);
    }

    .main-nav.active {
        transform: scaleY(1);
    }

    .main-nav ul {
        flex-direction: column;
        padding: 20px;
    }

    .main-nav ul li {
        margin: 10px 0;
        text-align: center;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero {
        padding: 4rem 1rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .game-section {
        padding: 1.5rem;
        margin-bottom: 4rem;
    }
}


.full-width-bg {
    background: white;
    width: 100%;
    color: var(--dark);
}

/* Fix element colors within white sections */
.full-width-bg .game-section {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
}


.full-width-bg .staff-member {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
}

.full-width-bg form {
    background: rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    border-color: rgba(0,0,0,0.1);

}

.full-width-bg input,
.full-width-bg textarea {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.15);
    color: var(--dark);
}

.full-width-bg input::placeholder,
.full-width-bg textarea::placeholder {
    color: rgba(0,0,0,0.6);
}