/* 
   ZetuGames - Main Stylesheet
   Using Safaricom theme colors (green and white)
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Safaricom Theme Colors */
    --primary-color: #39B54A; /* Safaricom Green */
    --primary-dark: #2A8C38;
    --primary-light: #7ED788;
    --secondary-color: #FFFFFF; /* White */
    --accent-color: #00A0D6; /* Blue accent */
    --text-color: #333333;
    --text-light: #666666;
    --background-light: #F5F5F5;
    --background-dark: #222222;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-light);
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header Styles */
header {
    background-color: var(--secondary-color);
    box-shadow: 0 2px 10px var(--shadow-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
}

.logo-container h1 span {
    color: var(--primary-color);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav ul li a {
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: var(--background-light);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    width: 300px;
}

.search-container input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    padding-right: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.search-container button {
    background: transparent;
    color: var(--text-light);
}

.search-container button:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--secondary-color);
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Section Styles */
section {
    padding: 2rem;
    margin-bottom: 2rem;
}

section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: 3px;
    background-color: var(--primary-color);
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.game-thumbnail {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-thumbnail img {
    transform: scale(1.05);
}

.game-icon {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    background-color: var(--background-light);
    transition: transform 0.5s ease;
}

.game-card:hover .game-icon {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--primary-color);
    color: var(--secondary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .play-button {
    opacity: 1;
}

.game-info {
    padding: 1rem;
}

.game-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.game-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Categories Section */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.category-card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.category-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.category-card:hover i {
    color: var(--secondary-color);
}

.category-card h3 {
    font-size: 1.1rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow: auto;
}

.modal-content {
    background-color: var(--secondary-color);
    margin: 5% auto;
    padding: 2rem;
    width: 80%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: var(--danger-color);
}

#modal-game-title {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

#game-container {
    min-height: 400px;
    border: 1px solid var(--background-light);
    border-radius: 5px;
    overflow: hidden;
}

/* Footer Styles */
footer {
    background-color: var(--background-dark);
    color: var(--secondary-color);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.footer-logo h2 span {
    color: var(--primary-color);
}

.footer-logo p {
    opacity: 0.8;
}

.footer-links h3,
.footer-newsletter h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.footer-links h3::after,
.footer-newsletter h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links ul li a {
    color: var(--secondary-color);
    opacity: 0.8;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.footer-links ul li a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.footer-newsletter p {
    margin-bottom: 1rem;
    opacity: 0.8;
}

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 5px 0 0 5px;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

.newsletter-form button {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 0 5px 5px 0;
    font-weight: 500;
}

.newsletter-form button:hover {
    background-color: var(--primary-dark);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    nav ul {
        gap: 1rem;
    }
    
    .search-container {
        width: 100%;
        max-width: 400px;
    }
    
    .hero {
        padding: 3rem 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    section {
        padding: 1.5rem 1rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .modal-content {
        width: 90%;
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        border-radius: 5px;
        margin-bottom: 0.5rem;
    }
    
    .newsletter-form button {
        border-radius: 5px;
    }
}
