/* ===== BASE STYLES ===== */
:root {
    --primary-color: #6aaa64; /* Green from Cyprus flag */
    --secondary-color: #f5c33b; /* Yellow from Cyprus flag */
    --dark-color: #121213;
    --light-color: #ffffff;
    --gray-color: #787c7e;
    --light-gray: #f5f5f5;
    --font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --heading-font: 'Roboto Slab', serif;
    --tile-font: 'IBM Plex Sans Condensed', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
    position: relative;
    padding-top: 0; /* Ensure no padding interferes with sticky header */
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
}

section {
    padding: 80px 20px;
}

h1, h2, h3 {
    font-family: var(--heading-font);
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

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

/* ===== HEADER & NAVIGATION ===== */
header {
    padding: 15px 0;
}

.sticky-header {
    position: fixed; /* Use fixed instead of sticky for more reliable behavior */
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--light-color);
    z-index: 1050;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px 0;
    transition: all 0.3s ease;
}

.sticky-header.scrolled {
    padding: 8px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background-color: rgba(255, 255, 255, 0.98);
}

nav {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: 
        "logo logo"
        "links menu";
    align-items: center;
    padding: 15px 30px;
    max-width: 1200px;
    margin: 0 auto;
    row-gap: 15px;
}

.sticky-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 12px 30px;
    row-gap: 8px;
}

.logo-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.centered-logo {
    height: 50px;
    margin: 0 auto;
}

.sticky-header .centered-logo {
    height: 40px;
}

.nav-links {
    grid-area: links;
    justify-self: center;
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    transition: var(--transition);
}

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

.menu-toggle {
    grid-area: menu;
    justify-self: end;
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    border-radius: 3px;
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: calc(100vh - 60px);
    padding-top: 80px; /* Add padding to account for fixed header */
    margin-top: 60px; /* Add margin to account for fixed header */
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, var(--primary-color) 33%, var(--secondary-color) 33%, var(--secondary-color) 66%, var(--primary-color) 66%);
    opacity: 0.7;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    padding: 0 20px;
}

.hero-content h1 {
    font-family: var(--heading-font);
    font-size: 3.5rem;
    font-weight: 700;
    margin: 20px 0 20px;
    letter-spacing: -0.5px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--gray-color);
}

/* App Store Buttons */
.app-store-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    max-width: 100%;
    justify-content: center;
}

.app-store-button {
    transition: transform 0.3s ease;
    max-width: 100%;
}

.app-store-button img {
    max-width: 100%;
    height: auto;
}

.app-store-button:hover img {
    transform: translateY(-3px);
}

/* Hero Image and Tiles */
.hero-image {
    position: relative;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    position: relative;
    z-index: 1;
}

.floating-tiles {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
    max-width: 90%;
}

.tile {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-family: var(--tile-font);
    font-weight: 600;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: var(--light-color);
    text-transform: uppercase;
    letter-spacing: -0.5px;
    transform-style: preserve-3d;
    transition: transform 0.4s ease;
}

.tile:hover {
    transform: translateY(-2px) rotateY(10deg);
}

.correct {
    background-color: var(--primary-color);
}

.present {
    background-color: var(--secondary-color);
}

.absent {
    background-color: var(--gray-color);
}

@keyframes float {
    0%, 100% {
        transform: translateY(-50%) translateX(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-50%) translateX(-20px) rotate(5deg);
    }
}

/* ===== FEATURES SECTION ===== */
.features {
    background-color: var(--light-color);
}

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

.feature-card {
    background-color: var(--light-gray);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(106, 170, 100, 0.1);
    border-radius: 50%;
}

.feature-icon img {
    width: 40px;
    height: 40px;
}

.feature-card h3 {
    font-family: var(--heading-font);
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 500;
}

/* ===== HOW TO PLAY SECTION ===== */
.how-to-play {
    background-color: var(--light-gray);
}

.steps-container {
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    margin-bottom: 40px;
    position: relative;
}

.step:not(:last-child):after {
    content: '';
    position: absolute;
    top: 60px;
    left: 25px;
    height: calc(100% - 20px);
    width: 2px;
    background-color: var(--primary-color);
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 20px;
    flex-shrink: 0;
    z-index: 1;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-family: var(--heading-font);
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 500;
}

/* Example tiles for How To Play */
.example-row {
    display: flex;
    gap: 5px;
    margin-top: 15px;
}

.example-tile {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-family: var(--tile-font);
    font-weight: 600;
    border: 2px solid var(--gray-color);
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.example-tile.correct, .example-tile.present, .example-tile.absent {
    color: var(--light-color);
}

.example-tile.correct {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.example-tile.present {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.example-tile.absent {
    background-color: var(--gray-color);
    border-color: var(--gray-color);
}

/* ===== DOWNLOAD SECTION ===== */
.download {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.download-content {
    flex: 1;
}

.download-content h2 {
    text-align: left;
    margin-bottom: 20px;
}

.download-content h2:after {
    left: 0;
    transform: none;
}

.download-content p {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.download-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.download-image img {
    max-width: 500px;
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonial-section {
    background-color: var(--light-gray);
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.testimonial-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.testimonial {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    margin-bottom: 20px;
    display: none;
    max-width: 100%;
    box-sizing: border-box;
}

.testimonial.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.slider-nav:hover {
    opacity: 1;
}

.slider-nav.prev {
    left: 0;
}

.slider-nav.next {
    right: 0;
}

.stars {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.testimonial p {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 20px;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-color);
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--primary-color);
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 60px 20px 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px;
}

.footer-logo {
    display: flex;
    justify-content: center;
    width: 100%;
}

.footer-logo img {
    height: 40px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-column h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.footer-column a {
    display: block;
    margin-bottom: 10px;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-column a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--light-gray);
    color: var(--gray-color);
}

/* ===== CONTACT FORM & PRIVACY STYLES ===== */
/* Contact Form Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    padding-top: 60px;
    box-sizing: border-box;
}

.modal-content {
    background-color: #fefefe;
    margin: 20px auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    width: 90%;
    max-width: 700px;
    box-sizing: border-box;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 10px;
    z-index: 10;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
    text-decoration: none;
}

.google-form-container {
    width: 100%;
    overflow: hidden;
    margin-top: 20px;
    box-sizing: border-box;
}

.google-form-container iframe {
    width: 100%;
    max-width: 100%;
    min-height: 600px;
    margin: 0 auto;
    display: block;
    border: none;
    border-radius: 8px;
    background-color: var(--light-color);
    box-sizing: border-box;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    margin-top: 15px;
}

button:hover {
    background-color: var(--dark-color);
    transform: translateY(-2px);
}

/* Privacy Policy Page Styles */
.privacy-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: var(--font-family);
}

.privacy-container h1 {
    font-family: var(--heading-font);
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--dark-color);
    position: relative;
}

.privacy-container h1:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.privacy-container h2 {
    font-family: var(--heading-font);
    font-size: 1.8rem;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--dark-color);
    text-align: left;
}

.privacy-container h2:after {
    left: 0;
    transform: none;
    width: 40px;
}

.privacy-container h3 {
    font-family: var(--heading-font);
    font-size: 1.3rem;
    margin-top: 25px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.privacy-container p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: var(--gray-color);
}

.privacy-container a {
    color: var(--primary-color);
    transition: var(--transition);
}

.privacy-container a:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 30px;
    font-weight: 500;
    color: var(--primary-color);
    transition: var(--transition);
}

.back-link:before {
    content: '←';
    margin-right: 8px;
    font-size: 1.1em;
}

.back-link:hover {
    transform: translateX(-5px);
    text-decoration: none;
}

.effective-date {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--light-gray);
    border-radius: 4px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.privacy-section {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.privacy-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.contact-section {
    background-color: var(--light-gray);
    border-radius: 10px;
    padding: 25px;
    margin-top: 40px;
    text-align: center;
}

.contact-section h2 {
    text-align: center;
}

.contact-section h2:after {
    left: 50%;
    transform: translateX(-50%);
}

.contact-section a {
    font-weight: 600;
}

/* Privacy and Terms Cards */
.terms-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.terms-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.terms-card h2 {
    color: #2b3990;
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.4rem;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 10px;
}

.terms-card p, .terms-card ul {
    color: #444;
    line-height: 1.6;
}

.terms-card ul {
    padding-left: 20px;
}

.terms-card li {
    margin-bottom: 8px;
}

#full-legal-terms, #full-legal-privacy {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
    border-left: 4px solid #2b3990;
}

#full-legal-terms h3, #full-legal-privacy h3 {
    color: #2b3990;
    margin-top: 24px;
    font-size: 1.2rem;
}

.privacy-content {
    max-width: 800px;
    margin: 0 auto;
}

.privacy-section h1 {
    text-align: center;
    color: #2b3990;
    margin-bottom: 10px;
}

.privacy-section .effective-date {
    display: block;
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* Make sure the content has proper spacing with fixed header */
.privacy-container {
    padding-top: 100px;
    padding-bottom: 50px;
    max-width: 1000px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

@media (max-width: 768px) {
    .privacy-container {
        padding-top: 80px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .terms-card {
        padding: 15px;
    }
    
    .terms-card h2 {
        font-size: 1.2rem;
    }
}

/* ===== CYPRIOT DIALECT FLOURISHES ===== */
.dialect {
    color: var(--primary-color);
    font-style: italic;
    font-weight: 500;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (min-width: 768px) {
    nav {
        grid-template-columns: 1fr auto auto;
        grid-template-areas: "logo links menu";
    }
    
    .logo-container {
        justify-self: start;
    }
}

@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 70px;
        padding-bottom: 50px;
        min-height: auto;
    }
    
    .hero-content {
        margin-bottom: 50px;
        padding: 0 20px;
        max-width: 100%;
    }
    
    .hero-image {
        transform: scale(0.9);
        margin-top: -30px;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .app-store-buttons {
        justify-content: center;
    }
    
    .download {
        flex-direction: column;
    }
    
    .download-content {
        text-align: center;
    }
    
    .download-content h2 {
        text-align: center;
    }
    
    .download-content h2:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .testimonial-slider {
        max-width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 2rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: white;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 1000;
        gap: 15px;
        align-items: center;
    }
    
    .nav-links.active a {
        font-size: 1.2rem;
        padding: 10px;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--light-gray);
    }
    
    .nav-links.active a:last-child {
        border-bottom: none;
    }
    
    .menu-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-content h1 {
        font-size: 2.3rem;
        margin-top: 10px;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-image {
        transform: scale(0.8);
        margin-top: -50px;
        margin-bottom: -30px;
    }
    
    .floating-tiles {
        left: 50%;
        transform: translate(-50%, -50%);
        scale: 0.9;
    }
    
    @keyframes float {
        0%, 100% {
            transform: translate(-50%, -50%) rotate(0deg);
        }
        50% {
            transform: translate(-50%, -50%) translateY(-15px) rotate(5deg);
        }
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
    }
    
    .step-number {
        margin-bottom: 15px;
    }
    
    .step:not(:last-child):after {
        display: none;
    }
    
    .testimonial {
        padding: 25px 20px;
    }
    
    .testimonial p {
        font-size: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .animate {
        animation: fadeInUp 0.6s ease forwards;
    }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .slider-nav {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .slider-nav.prev {
        left: -5px;
    }
    
    .slider-nav.next {
        right: -5px;
    }
    
    .privacy-container {
        padding: 20px 15px;
    }
    
    .privacy-container h1 {
        font-size: 2rem;
    }
    
    .privacy-container h2 {
        font-size: 1.5rem;
    }
    
    .privacy-section {
        padding: 20px 15px;
    }

    .modal-content {
        width: 95%;
        padding: 15px;
        margin: 10px auto;
    }
    
    .google-form-container iframe {
        min-height: 500px;
    }
}

@media (max-width: 480px) {
    section {
        padding: 60px 15px;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .app-store-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .app-store-button img {
        max-width: 200px;
    }
    
    .hero-image img {
        max-width: 90%;
    }
    
    .floating-tiles {
        scale: 0.8;
    }
    
    .tile, .example-tile {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}
