/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #20B2AA;
    --secondary-color: #008B8B;
    --accent-color: #48D1CC;
    --text-dark: #1f2937;
    --text-light: #4a5568;
    --bg-light: #E8F5E9;
    --bg-white: #F1F8E9;
    --bg-body: #E8F5E9;
    --border-color: #C8E6C9;
    --success-color: #2E7D32;
    --dark-green: #1B5E20;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-body);
    overflow-x: hidden;
}

/* Page Load Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-content {
    animation: fadeIn 0.6s ease-out;
}

/* Header and Navigation */
header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}

@media (max-width: 768px) {
    header {
        padding: 0.75rem 0;
    }
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    position: relative;
    z-index: 1001;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1001;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    transition: all 0.3s ease;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-lg);
    z-index: 998;
    padding: 2rem;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    border-bottom: 1px solid var(--border-color);
    max-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 769px) {
    .mobile-menu {
        display: none !important;
    }
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 4rem 2rem;
    background-color: var(--bg-body);
    border-bottom: 2px solid var(--border-color);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-image-wrapper {
    border: 3px solid var(--primary-color);
    border-radius: 1rem;
    padding: 1rem;
    background-color: #ffffff;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.8s ease-out;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.5rem;
    object-fit: cover;
}

.hero-content {
    padding: 2rem;
    background-color: #ffffff;
    border: 3px solid var(--primary-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.8s ease-out 0.2s both;
    color: var(--text-dark);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-green);
    animation: fadeIn 1s ease-out 0.4s both;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--dark-green);
    animation: fadeIn 1s ease-out 0.6s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeIn 1s ease-out 0.8s both;
}

.hero-content .btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.hero-content .btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Card Animations */
@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    animation: cardSlideUp 0.6s ease-out both;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.card-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card-grid-2x2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Sections */
section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 2px solid var(--border-color);
}

section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--dark-green);
}

.section-subtitle {
    text-align: center;
    color: var(--dark-green);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* Demo Game */
.demo-game {
    background-color: #ffffff;
    padding: 3rem 2rem;
    border-radius: 1rem;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 600px;
    margin: 2rem auto;
}

.game-card {
    aspect-ratio: 1;
    background-color: var(--primary-color);
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
    transform: rotateY(180deg);
    position: relative;
}

.game-card.flipped {
    transform: rotateY(0deg);
    background-color: var(--accent-color);
}

.game-card.matched {
    opacity: 0.5;
    cursor: default;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 2rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    box-shadow: var(--shadow-md);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

thead {
    background-color: var(--primary-color);
    color: white;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: var(--bg-light);
}

tbody tr {
    background-color: #ffffff;
}

/* Accordion */
.accordion {
    margin: 2rem 0;
}

.accordion-item {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accordion-header {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: var(--bg-light);
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
    padding: 1.5rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 2rem 0;
    margin: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
    padding: 1.5rem;
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    animation: cardSlideUp 0.6s ease-out both;
    border: 1px solid var(--border-color);
}

.timeline-item:nth-child(odd) {
    margin-left: 0;
}

.timeline-item:nth-child(even) {
    margin-left: auto;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    top: 1.5rem;
    border: 4px solid #ffffff;
}

.timeline-item:nth-child(odd)::before {
    right: -10px;
}

.timeline-item:nth-child(even)::before {
    left: -10px;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.1);
}

/* Modal/Popup */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 0.75rem;
    max-width: 500px;
    width: 90%;
    animation: cardSlideUp 0.3s ease-out;
    position: relative;
    border: 1px solid var(--border-color);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-close:hover {
    color: var(--text-dark);
}

/* Footer */
footer {
    background-color: var(--bg-body);
    color: var(--text-dark);
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
    border-top: 2px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section a {
    color: var(--text-light);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-section.legal-center {
    text-align: center;
}

.footer-section.legal-center a {
    display: block;
    margin: 0 auto 0.5rem;
    text-align: center;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background-color: var(--bg-white);
    }

    nav {
        position: relative;
        z-index: 1001;
        background-color: var(--bg-white);
        width: 100%;
    }

    .logo {
        z-index: 1001;
        position: relative;
        display: block;
        flex-shrink: 0;
    }

    .mobile-menu {
        display: block;
        top: 65px;
        padding-top: 1rem;
        max-height: calc(100vh - 65px);
    }

    body.menu-open {
        overflow: hidden;
    }

    nav {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-image-wrapper {
        order: 1;
    }

    .hero-content {
        order: 2;
        text-align: center;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    section {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card-grid-2x2 {
        grid-template-columns: 1fr;
    }

    .card-grid-3 {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 1.25rem;
    }

    .card h3 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .card p {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .game-board {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: calc(100% - 40px);
        margin-left: 40px !important;
    }

    .timeline-item::before {
        left: -30px !important;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    /* Contact Page Specific */
    .page-content section {
        padding: 2rem 1rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    iframe,
    .map-iframe {
        height: 300px !important;
    }

    .directions-info {
        padding: 1.25rem !important;
        margin: 1.5rem auto !important;
    }

    .directions-info h3 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem !important;
    }

    .directions-info p {
        font-size: 0.9rem;
    }

    .table-container {
        overflow-x: visible;
        width: 100%;
        max-width: 100%;
        margin: 2rem auto;
        padding: 0;
        display: block;
    }

    table {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        font-size: 0.75rem;
        display: table;
        margin: 0 auto;
        table-layout: auto;
    }

    th, td {
        padding: 0.5rem 0.4rem;
        font-size: 0.7rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: normal;
    }

    th {
        font-size: 0.75rem;
        padding: 0.6rem 0.4rem;
        white-space: normal;
    }

    .accordion-header {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .accordion-content {
        padding: 0 1rem;
    }

    .accordion-item.active .accordion-content {
        padding: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-section {
        text-align: center;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    .card {
        padding: 1rem;
    }

    section {
        padding: 1.5rem 0.75rem;
    }

    iframe {
        height: 250px !important;
    }

    .table-container {
        margin: 1.5rem auto;
    }

    table {
        font-size: 0.65rem;
    }

    th, td {
        padding: 0.4rem 0.25rem;
        font-size: 0.65rem;
    }

    th {
        font-size: 0.7rem;
        padding: 0.5rem 0.25rem;
    }

    .mobile-menu {
        padding: 1.5rem;
    }

    .mobile-menu ul {
        gap: 1rem;
    }

    .mobile-menu a {
        font-size: 1rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Image Placeholders */
.image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Stagger Animation for Cards */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

