/*
Theme Name: Malayalam Text FX
Theme URI: https://github.com/yourname/malayalam-text-fx
Description: A Malayalam text-effect generator web app with live canvas preview, full styling controls, downloadable PNG/SVG exports, and Gutenberg/shortcode integration. Create beautiful Malayalam text effects with multiple fonts, gradients, shadows, and more.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
Author: Your Name
Author URI: https://yoursite.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: malayalam-text-fx
Domain Path: /languages
Tags: malayalam, text-effects, canvas, svg, generator, accessibility-ready, custom-colors, editor-style, full-site-editing, rtl-language-support
*/

/**
 * Malayalam Text FX Theme
 * 
 * This theme provides a Malayalam text effect generator with:
 * - Live canvas preview
 * - Multiple Malayalam fonts (Noto Sans Malayalam, Manjari, Meera, Rachana)
 * - Gradient and shadow effects
 * - PNG and SVG export
 * - Gutenberg block integration
 * - Shortcode support
 * 
 * All assets are GPL-licensed and this theme is fully WCAG 2.1 AA compliant.
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Main container */
.site-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Basic typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

p {
    margin-bottom: 1rem;
}

/* Links */
a {
    color: #0073aa;
    text-decoration: none;
}

a:hover,
a:focus {
    color: #005177;
    text-decoration: underline;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Screen reader only text */
.sr-only,
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===========================
   Header Styles
   =========================== */
.site-header {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.site-branding {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #333;
    transition: opacity 0.2s;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-icon {
    font-size: 2rem;
    font-weight: 700;
    color: #ff7700;
    font-family: 'Manjari', 'Noto Sans Malayalam', sans-serif;
}

.site-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-menu,
.footer-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu a,
.footer-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s;
    padding: 0.5rem 0;
}

.nav-menu a:hover,
.footer-links a:hover {
    color: #ff7700;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.menu-icon {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    position: relative;
    transition: all 0.3s;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    position: absolute;
    transition: all 0.3s;
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    bottom: -8px;
}

@media (max-width: 768px) {
    .header-inner {
        padding: 1rem;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: #ffffff;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-menu a {
        display: block;
        padding: 1rem 2rem;
    }

    .mobile-menu-toggle {
        display: block;
    }
}

/* ===========================
   Footer Styles
   =========================== */
.site-footer {
    background: #2a2a2a;
    color: #000000;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.footer-col h3 {
    color: #ff7700;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-col p {
    color: #aaa;
    line-height: 1.6;
    font-size: 0.9375rem;
}

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

.footer-menu li,
.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-menu a,
.footer-links a {
    color: #aaa;
    font-size: 0.9375rem;
}

.footer-menu a:hover,
.footer-links a:hover {
    color: #ff7700;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
}

.footer-bottom .copyright {
    color: #888;
    font-size: 0.875rem;
    margin: 0;
}

@media (max-width: 768px) {
    .footer-inner {
        padding: 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ===========================
   Dark/Light Mode Toggle
   =========================== */
.theme-mode-toggle {
    position: relative;
    width: 50px;
    height: 50px;
    background: transparent;
    border: 2px solid var(--mtfx-border);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-mode-toggle:hover {
    border-color: var(--mtfx-primary);
    transform: scale(1.1);
}

.mode-icon {
    font-size: 1.5rem;
    position: absolute;
    transition: all 0.3s ease;
}

[data-theme="light"] .light-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .dark-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

[data-theme="dark"] .light-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

[data-theme="dark"] .dark-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Dark mode specific overrides */
[data-theme="dark"] .site-header {
    background: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .site-footer {
    background: #1a1a1a;
}

[data-theme="dark"] .nav-menu a,
[data-theme="dark"] .logo-link,
[data-theme="dark"] .site-name {
    color: #000000;
}

[data-theme="dark"] .nav-menu a:hover {
    color: #ff7700;
}

[data-theme="dark"] .menu-icon,
[data-theme="dark"] .menu-icon::before,
[data-theme="dark"] .menu-icon::after {
    background: #000000;
}