/* assets/css/main.css */

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

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #2ed573;
    --danger-color: #ff4757;
    --warning-color: #ffa502;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --border-radius: 10px;
    --transition: all 0.3s ease;
}

html {
    overflow-y: scroll;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: #f5f6fa;
    min-height: 100vh;
}

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

/* Universal Page Header Styles */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.page-description {
    font-size: 1.125rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Header Styles */
.site-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Navigation */
.main-nav {
    flex: 1;
    margin: 0 2rem;
}

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

.nav-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.has-dropdown {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    min-width: 220px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    margin-top: 0.5rem;
    list-style: none;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li {
    list-style: none;
}

.dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.dropdown a:hover {
    background: var(--light);
    color: var(--primary-color);
}

/* Language Switcher */
.language-switcher {
    position: relative;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid var(--light);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.lang-current:hover {
    border-color: var(--primary-color);
}

.lang-code {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 24px;
    text-align: center;
}

.chevron {
    transition: var(--transition);
}

.language-switcher:hover .chevron {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    min-width: 150px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    margin-top: 0.5rem;
    z-index: 1000;
}

.language-switcher:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.lang-option .lang-code {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 24px;
}

.lang-option:hover {
    background: var(--light);
}

.lang-option.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.lang-option.active .lang-code {
    color: white;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

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

.mobile-nav {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: var(--transition);
    z-index: 999;
}

.mobile-nav.active {
    transform: translateX(0);
}

/* Mobile Language Switcher */
.mobile-languages {
    padding: 1rem;
    border-top: 1px solid var(--light);
}

.mobile-languages h3 {
    margin-bottom: 1rem;
    color: var(--dark);
    font-size: 0.875rem;
    text-transform: uppercase;
}

.mobile-lang-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.mobile-lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--light);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}

.mobile-lang-option .lang-code {
    font-weight: 600;
    color: var(--primary-color);
}

.mobile-lang-option:hover {
    background: var(--primary-color);
    color: white;
}

.mobile-lang-option:hover .lang-code {
    color: white;
}

.mobile-lang-option.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.mobile-lang-option.active .lang-code {
    color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Generator Cards */
.featured-section {
    padding: 4rem 0;
}

.generators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.generator-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.generator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.generator-card.featured {
    border: 2px solid var(--primary-color);
}

.card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

.icon-placeholder {
    font-size: 2.5rem;
}

.generator-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

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

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Categories */
.categories-section {
    padding: 4rem 0;
    background: white;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    text-align: center;
    padding: 2rem;
    border-radius: var(--border-radius);
    background: var(--light);
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}

.category-card:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-5px);
}

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

/* Footer */
.site-footer {
    background: var(--dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-column h3 {
    margin-bottom: 1rem;
}

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

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

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

.footer-bottom-links {
    display: flex;
    gap: 2rem;
}

.footer-bottom-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: white;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .generators-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    /* Page header mobile adaptation */
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-description {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .page-description {
        font-size: 0.95rem;
    }
}