/*
Theme Name: Sopa de Letras
Theme URI: http://example.com/sopa-de-letras
Author: Antigravity
Author URI: http://example.com
Description: A minimal custom WordPress theme for a word search game.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sopa-de-letras
*/

/* ==========================================================================
   Variables & Reset
   ========================================================================== */

:root {
    --primary: #4f46e5; /* Purple from screenshot */
    --primary-hover: #4338ca;
    --bg: #f9fafb; /* Light gray page bg */
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --footer-bg: #111827;
    --footer-text: #9ca3af;
    --footer-heading: #ffffff;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */

.site-header {
    background-color: var(--primary);
    color: #fff;
    padding: 15px 0;
    position: relative;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.primary-navigation ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.primary-navigation a {
    color: #fff;
    font-weight: 500;
}

.primary-navigation a:hover {
    color: #e0e7ff;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */

.site-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 40px 20px;
    margin-top: auto;
}

.footer-top h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.footer-top p {
    font-size: 0.875rem;
}

.footer-top a {
    color: #a5b4fc;
    text-decoration: underline;
}

.footer-navigation ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 20px;
    margin: 20px 0;
    font-size: 0.875rem;
}

.footer-navigation a {
    color: var(--footer-text);
}

.footer-navigation a:hover {
    color: #fff;
}

.footer-bottom {
    font-size: 0.75rem;
    border-top: 1px solid #374151;
    padding-top: 20px;
    margin-top: 20px;
}

/* ==========================================================================
   Generator Layout
   ========================================================================== */

.generator-container {
    display: flex;
    max-width: 1200px;
    margin: 40px auto;
    gap: 30px;
    padding: 0 20px;
}

.config-sidebar {
    flex: 1;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    height: max-content;
}

.main-content {
    flex: 2;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    min-height: 120px;
    font-family: inherit;
    resize: vertical;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    transition: background 0.2s;
}

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

/* Grid & Action Area */
.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.grid-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #1f2937;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.btn-accent {
    background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.875rem;
}

.grid-container {
    display: grid;
    border: 2px solid #000;
    width: max-content;
    margin: 0 auto 30px;
}

.grid-cell {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    font-weight: bold;
    font-family: monospace;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.grid-cell.highlighted {
    background-color: #fef08a; /* Yellow */
}

/* Word List */
.word-list-section h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
}

.word-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.word-item {
    font-size: 0.875rem;
    text-transform: uppercase;
    font-weight: 500;
}

/* Top Banner */
.top-banner {
    background-color: #eef2ff;
    padding: 20px 30px;
    border-radius: 12px;
    margin: 0 auto 30px;
    max-width: 1200px;
    width: calc(100% - 40px);
}

.top-banner h1 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.top-banner p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Static Pages Styles (About, Contact, etc.)
   ========================================================================== */

.page-hero {
    background-color: var(--primary);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #fff;
}

.page-hero p {
    font-size: 1.1rem;
    color: #e0e7ff;
}

.page-content-container {
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.page-content-container p {
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.6;
}

.page-content-container h2 {
    margin: 30px 0 15px;
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Hamburger Menu Base */
.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .generator-container {
        flex-direction: column;
    }
    .main-content {
        overflow-x: auto;
    }
    
    /* Hamburger Menu Mobile */
    .menu-toggle {
        display: flex !important; /* Force flex display on mobile */
    }

    .primary-navigation {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--primary);
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .primary-navigation.is-active {
        display: block !important;
    }

    .primary-navigation ul {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
}
