/*
Theme Name: TmaBot AI
Theme URI: https://tmabot.ai
Author: TmaBot Team
Author URI: https://tmabot.ai
Description: Modern WordPress theme for AI Tools Directory
Version: 1.0.1
License: GPL v2 or later
Text Domain: tmabot
*/

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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --text-color: #334155;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--light-color);
    min-height: 100vh;
    font-size: 16px;
    font-weight: 400;
}

body {
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: hidden;
}

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

/* Header Styles */
.site-header {
    background: #ffffff;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Logo Moderno */
.site-branding {
    display: flex;
    align-items: center;
}

.site-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
}

.site-logo-link:hover {
    opacity: 0.9;
}

.site-logo {
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--dark-color);
    line-height: 1;
}

.site-logo .gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-logo .ai-text {
    color: var(--accent-color);
    font-weight: 700;
}

/* Navigation Moderna */
.main-navigation {
    display: flex;
    align-items: center;
}

#primary-menu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

@media (min-width: 768px) {
    #primary-menu {
        display: flex;
        align-items: center;
    }
}

#primary-menu li {
    position: relative;
}

#primary-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
    display: inline-block;
}

#primary-menu a:hover {
    color: var(--primary-color);
}

#primary-menu a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    left: 0;
    bottom: 0;
    transition: width 0.3s ease;
}

#primary-menu a:hover:after {
    width: 100%;
}

#primary-menu a.active {
    color: var(--primary-color);
}

#primary-menu a.active:after {
    width: 100%;
}

/* User Actions */
.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 2rem;
}

.auth-btn {
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.login-btn {
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}

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

.register-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
}

.register-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Mobile Menu Toggle Moderno */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--dark-color);
    border-radius: 3px;
    transition: var(--transition);
    transform-origin: center;
}

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

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

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

/* Mobile Menu Moderno */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
    padding: 5rem 2rem 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 1001;
    backdrop-filter: blur(2px);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

#mobile-primary-menu {
    list-style: none;
    flex: 1;
}

#mobile-primary-menu li {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

#mobile-primary-menu li:last-child {
    border-bottom: none;
}

#mobile-primary-menu a {
    display: block;
    padding: 1rem 0;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    font-size: 1.1rem;
    transition: var(--transition);
}

#mobile-primary-menu a:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

#mobile-primary-menu a.active {
    color: var(--primary-color);
}

.mobile-menu-stats {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.mobile-menu-stats p {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Main Content */
.site-main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Mobile Bottom Menu Moderno */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    display: none;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 767px) {
    .mobile-bottom-nav {
        display: block;
    }
    
    body {
        padding-bottom: 72px !important;
    }
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bottom-nav-item {
    flex: 1;
    text-align: center;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: var(--radius-md);
}

.bottom-nav-link:hover,
.bottom-nav-link.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.bottom-nav-icon {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    display: block;
}

.bottom-nav-text {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Footer Moderno */
.site-footer {
    background: var(--dark-color);
    color: #ffffff;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr 1fr 1fr;
        text-align: left;
    }
}

.footer-logo {
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: white;
    margin-bottom: 1rem;
}

.footer-logo .gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-logo .ai-text {
    color: #22d3ee;
}

.footer-stats {
    margin: 1rem 0;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.stats-text {
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-top: 0.25rem;
}

.footer-info {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.7;
}

.footer-copyright {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    color: #94a3b8;
    text-align: center;
    grid-column: 1 / -1;
}

/* Search Page */
.search-results {
    padding: 2rem 0;
}

.search-result-item {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.search-result-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

/* 404 Page */
.error-404 {
    text-align: center;
    padding: 4rem 1rem;
}

.error-404 h1 {
    font-size: 8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1;
}

.error-404 h2 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.error-404 p {
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-form-404 {
    max-width: 500px;
    margin: 0 auto;
}

.search-form-404 .search-field {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
}

.search-form-404 .search-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-form-404 .search-submit {
    margin-top: 1rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-form-404 .search-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.back-to-home {
    margin-top: 2rem;
}

.back-to-home .button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.back-to-home .button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Responsive */
@media (max-width: 767px) {
    .container {
        padding: 0 16px;
    }
    
    .header-container {
        height: 64px;
    }
    
    .site-logo {
        font-size: 1.5rem;
    }
    
    .site-main {
        padding: 1.5rem 0;
    }
    
    .error-404 h1 {
        font-size: 6rem;
    }
    
    .error-404 h2 {
        font-size: 1.5rem;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Footer Desktop Only */
@media (max-width: 767px) {
    .site-footer {
        display: none !important;
    }
    
    /* Ajustar espacio en mobile cuando footer está oculto */
    body {
        padding-bottom: 72px !important;
    }
}

@media (min-width: 768px) {
    .site-footer {
        display: block;
    }
}

/* Mobile Bottom Menu Improvements */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
    z-index: 999;
    display: none;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

@media (max-width: 767px) {
    .mobile-bottom-nav {
        display: block;
    }
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bottom-nav-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    position: relative;
}

.bottom-nav-link:hover,
.bottom-nav-link.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.bottom-nav-icon {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    display: block;
    transition: var(--transition);
}

.bottom-nav-text {
    font-size: 0.7rem;
    font-weight: 500;
    transition: var(--transition);
}

/* Active indicator */
.bottom-nav-link.active:after {
    content: '';
    position: absolute;
    top: -2px;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
}

/* Search specific styles */
.bottom-nav-item:nth-child(2) .bottom-nav-link {
    position: relative;
}

.bottom-nav-item:nth-child(2) .bottom-nav-link:before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.1;
}

.bottom-nav-item:nth-child(2) .bottom-nav-link.active:before {
    opacity: 0.15;
}

/* Smooth transitions */
.bottom-nav-link * {
    transition: var(--transition);
}

/* Hover effects */
.bottom-nav-link:hover .bottom-nav-icon {
    transform: translateY(-2px);
}

.bottom-nav-link.active .bottom-nav-icon {
    transform: translateY(-2px) scale(1.1);
}

/* Remove default emoji styling */
.bottom-nav-icon {
    font-style: normal;
}