/* ================================
   KontextLora Gaming Website CSS
   Modern, Responsive, AdSense-Ready
   ================================ */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page Content */
.page-content {
    min-height: calc(100vh - 400px);
    padding: 2rem 0;
}

.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.page-title {
    font-size: 2.5rem;
    color: #333;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #007bff, #28a745);
    border-radius: 2px;
}

.lead {
    font-size: 1.25rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 2rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: #007bff;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
    min-width: 44px;
    min-height: 44px;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    color: white;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
    color: white;
}

.btn-outline {
    border: 2px solid #007bff;
    color: #007bff;
    background-color: transparent;
}

.btn-outline:hover {
    background-color: #007bff;
    color: white;
}

.btn-play {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 20px;
}

.btn-play:hover {
    background: linear-gradient(135deg, #218838, #1ea182);
    color: white;
    transform: scale(1.05);
}

/* Header */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 123, 255, 0.1);
}

.navbar {
    padding: 1.2rem 0;
    transition: padding 0.3s ease;
}

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

.nav-brand {
    transition: transform 0.3s ease;
}

.nav-brand:hover {
    transform: scale(1.02);
}

.nav-brand .logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.nav-brand .logo h1 {
    color: #007bff;
    margin-bottom: 0;
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-brand .tagline {
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 400;
    margin-top: -2px;
    letter-spacing: 0.5px;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: #333;
    font-weight: 500;
    padding: 0.75rem 0;
    position: relative;
    transition: all 0.3s ease;
    font-size: 1rem;
    letter-spacing: 0.3px;
}

.nav-link:hover {
    color: #007bff;
    transform: translateY(-1px);
}

.nav-link.active {
    color: #007bff;
    font-weight: 600;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-toggle:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

.nav-toggle span {
    width: 28px;
    height: 3px;
    background: linear-gradient(135deg, #333, #007bff);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* Sections */
section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 1rem;
    color: #333;
}

.section-subtitle {
    text-align: center;
    color: #6c757d;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.section-footer {
    text-align: center;
    margin-top: 3rem;
}

/* Featured Games */
.featured-games {
    background-color: #f8f9fa;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.game-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.game-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-image img {
    transform: scale(1.05);
}

.game-info {
    padding: 1.5rem;
}

.game-title {
    margin-bottom: 0.5rem;
    color: #333;
}

.game-description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.game-category {
    background-color: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.game-rating {
    color: #ffc107;
    font-size: 0.9rem;
}

/* Game Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border: 1px solid #e9ecef;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.game-count {
    color: #007bff;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Blog Section */
.blog-section {
    background-color: #f8f9fa;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.blog-image {
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.blog-category {
    background-color: #007bff;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.blog-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.blog-title {
    margin-bottom: 0.75rem;
    color: #333;
}

.blog-excerpt {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.blog-link {
    color: #007bff;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-link:hover {
    color: #0056b3;
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 1.5rem;
}

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

.feature h3 {
    color: #333;
    margin-bottom: 1rem;
}

.feature p {
    color: #666;
    font-size: 0.95rem;
}

/* Footer */
.site-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 4rem 0 1.5rem;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1.5rem;
    color: white;
    font-weight: 600;
    position: relative;
    font-size: 1.2rem;
}

.footer-section h3::after,
.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #007bff, #28a745);
    border-radius: 2px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, #e3f2fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    padding: 0.25rem 0;
    display: inline-block;
    position: relative;
}

.footer-links a::before {
    content: '▸';
    opacity: 0;
    margin-right: 0.5rem;
    transition: opacity 0.3s ease;
    color: #007bff;
}

.footer-links a:hover::before {
    opacity: 1;
}

.footer-links a:hover {
    color: #fff;
    transform: translateX(8px);
    text-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-copyright p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.footer-social a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    position: relative;
    overflow: hidden;
}

.footer-social a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.footer-social a:hover::before {
    left: 100%;
}

.footer-social a:hover {
    color: #fff;
    background: linear-gradient(135deg, #007bff, #28a745);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .navbar {
        padding: 1rem 0;
    }
    
    .nav-brand .logo h1 {
        font-size: 1.6rem;
    }
    
    .nav-brand .tagline {
        font-size: 0.8rem;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-social a {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    /* Typography adjustments */
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }
    h3 { font-size: 1.4rem; }
    
    /* Layout adjustments */
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Navigation improvements */
    .nav-brand .logo h1 {
        font-size: 1.4rem;
    }
    
    .nav-brand .tagline {
        font-size: 0.75rem;
    }
    
    /* Button adjustments */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .hero-buttons .btn {
        text-align: center;
    }
    
    /* Footer adjustments */
    .footer-social a {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
    
    /* Spacing adjustments */
    .container {
        padding: 0 12px;
    }
    
    .page-content {
        padding: 1.5rem 0;
    }
    
    .site-footer {
        padding: 3rem 0 1rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Game Page Specific Styles */
.game-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.game-wrapper iframe {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
}

/* Article Styles */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.article-content h2,
.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .hero,
    .btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}