/* 
 * Treknoa Digital CSS
 * Theme: Blend of candy colors, sport dynamics, and kite elements
 */

/* ------------ Base Styles ------------ */
:root {
    /* Colorful palette inspired by candy, sports equipment, and kites */
    --primary: #6a5acd;       /* Slate blue - main brand color */
    --secondary: #ff7f50;     /* Coral - accent color */
    --tertiary: #32cd32;      /* Lime green - accent color */
    --quaternary: #ff4081;    /* Pink - accent color */
    
    --bg-light: #f8f9fa;      /* Light background */
    --bg-dark: #212529;       /* Dark background */
    
    --text-dark: #212529;     /* Dark text */
    --text-light: #f8f9fa;    /* Light text */
    --text-muted: #6c757d;    /* Muted text */
    
    --border-color: #dee2e6;  /* Border color */
    
    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    /* Animations */
    --transition-speed: 0.3s;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

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

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary), var(--tertiary));
    border-radius: 2px;
}

/* ------------ Button Styles ------------ */
.btn-primary {
    display: inline-block;
    background-color: var(--primary);
    color: var(--text-light);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    border: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--secondary);
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    display: inline-block;
    background-color: transparent;
    color: var(--primary);
    padding: 0.6rem 1.3rem;
    border-radius: 30px;
    border: 2px solid var(--primary);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--text-light);
}

/* ------------ Navigation ------------ */
header {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo a {
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--tertiary));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
}

.logo a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--tertiary));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-speed) ease;
}

.logo a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

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

.nav-links a {
    color: var(--text-dark);
    font-weight: 600;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-speed) ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-links a.active {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-dark);
    border-radius: 10px;
    transition: all var(--transition-speed) ease;
}

/* ------------ Age Verification Popup ------------ */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.popup-container {
    background-color: var(--bg-light);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    text-align: center;
    max-width: 90%;
    width: 500px;
    position: relative;
    animation: fadeInUp 0.5s ease forwards;
}

.popup-container h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.popup-container p {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.popup-container .btn-primary {
    margin-top: 1rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ------------ Hero Section ------------ */
.hero {
    min-height: 500px;
    background: linear-gradient(135deg, rgba(106, 90, 205, 0.9), rgba(255, 127, 80, 0.9)), url('/assets/images/hero.jpg') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1rem 4rem;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 10%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.2) 0%, transparent 10%);
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* ------------ Games Grid ------------ */
.games-container {
    padding: 5rem 1rem;
    background-color: var(--bg-light);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.game-frame {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.game-frame:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.game-frame h3 {
    padding: 1.25rem;
    text-align: center;
    color: var(--primary);
    background: linear-gradient(to right, rgba(106, 90, 205, 0.1), rgba(255, 127, 80, 0.1), rgba(50, 205, 50, 0.1));
    margin-bottom: 0;
}

.game-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
}

.game-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Games on Play Page */
.games-full {
    padding: 5rem 1rem;
}

.game-section {
    margin-bottom: 4rem;
}

.game-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.game-wrapper.full {
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.game-info {
    padding: 1.5rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* ------------ About Section ------------ */
.about-section {
    padding: 5rem 1rem;
    background: linear-gradient(135deg, rgba(255, 127, 80, 0.1), rgba(106, 90, 205, 0.1));
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.about-content {
    flex: 1;
    padding: 2rem;
    min-width: 300px;
}

.about-image {
    flex: 1;
    padding: 2rem;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

/* ------------ Features Section ------------ */
.features-section {
    padding: 5rem 1rem;
    background-color: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary), var(--secondary), var(--tertiary));
    z-index: -1;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

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

.feature-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-muted);
}

/* ------------ Contact Page ------------ */
.contact-page {
    background-color: var(--bg-light);
}

.contact-section {
    padding: 8rem 1rem 5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info h1 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.contact-methods {
    margin-top: 2rem;
}

.contact-method {
    margin-bottom: 1.5rem;
}

.contact-method h3 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.contact-form-container {
    background-color: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    transition: border-color var(--transition-speed) ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(106, 90, 205, 0.2);
}

.form-status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
}

.form-status.success {
    background-color: rgba(50, 205, 50, 0.1);
    color: #2e7d32;
    border: 1px solid #2e7d32;
}

.form-status.error {
    background-color: rgba(244, 67, 54, 0.1);
    color: #d32f2f;
    border: 1px solid #d32f2f;
}

/* ------------ FAQ Section ------------ */
.faq-section {
    padding: 4rem 1rem 6rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto 0;
}

.faq-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

.faq-item h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

/* ------------ Legal Pages ------------ */
.legal-page {
    background-color: var(--bg-light);
}

.legal-content {
    padding: 8rem 2rem 5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.legal-content h1 {
    color: var(--primary);
    margin-bottom: 2rem;
    text-align: center;
}

.legal-section {
    margin-bottom: 2.5rem;
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

.legal-section h2 {
    color: var(--secondary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.legal-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-section ul li {
    margin-bottom: 0.5rem;
}

/* ------------ Play Intro ------------ */
.play-intro {
    padding: 8rem 1rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(106, 90, 205, 0.1), rgba(255, 127, 80, 0.1));
}

.play-intro h1 {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* ------------ Guidelines ------------ */
.guidelines {
    padding: 4rem 1rem;
    background-color: white;
}

.guidelines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto 0;
}

.guideline {
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    background: linear-gradient(to bottom right, rgba(106, 90, 205, 0.05), rgba(255, 127, 80, 0.05));
    border: 1px solid var(--border-color);
}

.guideline h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
}

/* ------------ Footer ------------ */
footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 4rem 1rem 2rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary), var(--secondary), var(--tertiary), var(--quaternary));
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
}

.footer-brand h3 {
    color: var(--text-light);
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.footer-links h4, .footer-legal h4 {
    color: var(--secondary);
    margin-bottom: 1.25rem;
}

.footer-links ul, .footer-legal ul {
    list-style: none;
}

.footer-links li, .footer-legal li {
    margin-bottom: 0.75rem;
}

.footer-links a, .footer-legal a {
    color: var(--text-light);
    opacity: 0.8;
    transition: opacity var(--transition-speed) ease;
}

.footer-links a:hover, .footer-legal a:hover {
    opacity: 1;
    color: var(--secondary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
}

.disclaimer-text {
    margin-bottom: 1rem;
    opacity: 0.8;
}

.copyright {
    opacity: 0.6;
}

/* ------------ Responsive Design ------------ */
@media (max-width: 992px) {
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-brand {
        grid-column: span 2;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        position: relative;
    }
    
    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 100%;
        max-width: 300px;
        background-color: var(--bg-light);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform var(--transition-speed) ease;
        z-index: 1000;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .about-section {
        flex-direction: column;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-brand {
        grid-column: auto;
    }
    
    .feature-card::before {
        height: 3px;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Three games displayed in a column on mobile */
    .games-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero {
        min-height: 400px;
        padding-top: 5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .popup-container {
        padding: 1.5rem;
    }
    
    .legal-section {
        padding: 1.5rem;
    }
}