:root {
    --primary-color: #0F172A;
    /* Slate 900 */
    --primary-light: #1E293B;
    /* Slate 800 */
    --secondary-color: #F59E0B;
    /* Amber 500 */
    --accent-color: #10B981;
    /* Emerald 500 */
    --bg-color: #F8FAFC;
    /* Slate 50 */
    --text-color: #334155;
    /* Slate 700 */
    --text-light: #64748B;
    /* Slate 500 */
    --white: #ffffff;
    --max-width: 1200px;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
.logo {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-color);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

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

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: #d97706;
    border-color: #d97706;
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.btn.sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.hero-image {
    flex: 1;
    position: relative;
}

#hero-img {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

#hero-img:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Mission Section */
.mission-section {
    padding: 6rem 0;
    background-color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.125rem;
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.mission-card {
    background: var(--bg-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: transform 0.3s;
}

.mission-card:hover {
    transform: translateY(-5px);
}

.icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.mission-card h3 {
    margin-bottom: 1rem;
}

/* Groups Section */
.groups-section {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

.groups-grid {
    display: grid;
    /* Reduced min-width to ensure 4 items fit in the container (1200px) */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.group-card {
    background-color: transparent;
    perspective: 1000px;
    height: 400px;
    /* Fixed height for flip effect and content */
}

.group-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.group-card:hover .group-card-inner {
    transform: rotateY(180deg);
}

.group-card-front,
.group-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.group-card-front {
    z-index: 2;
    transform: rotateY(0deg);
    padding: 0;
    /* Remove padding from container to allow full width image */
}

.group-image-container {
    width: 100%;
    height: 140px;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    flex-shrink: 0;
}

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

.group-content {
    padding: 1.5rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.group-card-back {
    transform: rotateY(180deg);
    z-index: 1;
    padding: 1.5rem;
    justify-content: center;
}

/* Border accents for each group */
/* Border accents for each group - Apply to both faces */
.group-card:nth-child(1) .group-card-front,
.group-card:nth-child(1) .group-card-back {
    border-top: 5px solid #10B981;
}

/* Green */
.group-card:nth-child(2) .group-card-front,
.group-card:nth-child(2) .group-card-back {
    border-top: 5px solid #3B82F6;
}

/* Blue */
.group-card:nth-child(3) .group-card-front,
.group-card:nth-child(3) .group-card-back {
    border-top: 5px solid #F59E0B;
}

/* Orange */
.group-card:nth-child(4) .group-card-front,
.group-card:nth-child(4) .group-card-back {
    border-top: 5px solid #8B5CF6;
}

/* Purple */

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.badge {
    background: #DBEAFE;
    color: #1E40AF;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.group-front-desc {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.group-time {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.group-desc {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.group-details {
    list-style: none;
    font-size: 0.9rem;
    padding-top: 1rem;
}

.group-details li {
    margin-bottom: 0.5rem;
}

/* Pi Day Section */
.pi-day-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    padding: 6rem 0;
    overflow: hidden;
}

.pi-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pi-content {
    flex: 1;
    z-index: 10;
}

.pi-content .tag {
    background: var(--secondary-color);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.pi-content h2 {
    color: var(--white);
    font-size: 3rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.pi-content .date {
    font-size: 1.5rem;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 2rem;
}

.pi-schedule {
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(5px);
}

.schedule-item {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.schedule-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.schedule-item .time {
    font-weight: 700;
    width: 100px;
    color: var(--secondary-color);
}

.pi-visual {
    position: relative;
    font-size: 15rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05);
    line-height: 1;
}

.pie-decoration {
    font-size: 8rem;
    position: absolute;
    bottom: 20px;
    right: -20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

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

    50% {
        transform: translateY(-20px);
    }
}

/* About Section */
.about-section {
    padding: 6rem 0;
    background-color: var(--white);
}

.team-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 0 auto;
}

.team-member {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: left;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    /* Mobile first: stack vertically */
    gap: 1rem;
    align-items: flex-start;
}

.team-member:hover {
    transform: translateX(5px);
    /* Slide right slightly instead of up */
    box-shadow: var(--shadow-lg);
}

.member-info {
    min-width: 200px;
}

.team-member h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.role {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0;
}

.member-bio {
    flex: 1;
    color: var(--text-color);
}


.member-photo {
    width: 80px;
    height: 80px;
    background-color: #cbd5e0;
    border-radius: 50%;
    margin-bottom: 1rem;
    align-self: flex-start;
    /* Mobile default */
}

/* Desktop: Horizontal layout - 4 columns */
@media (min-width: 900px) {
    .team-content {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .team-member {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
    }

    .member-photo {
        align-self: center;
    }

    .team-member:hover {
        transform: translateY(-5px);
        /* Move up on hover */
    }

    .member-info {
        min-width: auto;
        margin-bottom: 0.5rem;
    }
}

/* CTA Section */
.cta-section {
    background-color: var(--accent-color);
    padding: 5rem 0;
    text-align: center;
    color: var(--white);
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 2rem;
}

.btn-white {
    background: var(--white);
    color: var(--accent-color);
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
}

.btn-outline-white {
    border: 2px solid var(--white);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    margin-left: 1rem;
    display: inline-block;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: #94a3b8;
    padding: 4rem 0 2rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-col a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--secondary-color);
}

.footer-donate {
    color: var(--secondary-color) !important;
    font-weight: 700;
}

.copyright {
    text-align: center;
    border-top: 1px solid #334155;
    padding-top: 2rem;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Mobile menu implementation to follow */
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .mission-grid {
        grid-template-columns: 1fr;
    }

    .pi-container {
        flex-direction: column;
        text-align: center;
    }

    .pi-visual {
        display: none;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}