/*
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: #374151;
    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: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    position: sticky;
    top: 0;
    z-index: 999;
    transition: all 0.3s ease;
}

.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;
}

.custom-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.custom-logo {
    max-height: 60px;
    width: auto;
    transition: opacity 0.2s;
}

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

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

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

.logo-icon {
    font-size: 2rem;
    font-weight: 700;
    color: #6366f1;
    font-family: 'Manjari', 'Noto Sans Malayalam', sans-serif;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.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: #374151;
    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: #374151;
    position: relative;
    transition: all 0.3s;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: #374151;
    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;
    }

    .mobile-menu-toggle[aria-expanded="true"] .menu-icon {
        background: transparent;
    }

    .mobile-menu-toggle[aria-expanded="true"] .menu-icon::before {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .mobile-menu-toggle[aria-expanded="true"] .menu-icon::after {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

/* ===========================
   Footer Styles
   =========================== */
.site-footer {
    background: #2a2a2a;
    color: #e0e0e0;
    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: #e0e0e0;
}

[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: #e0e0e0;
}

/* ===========================
   About Page Styles
   =========================== */
.about-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.about-header .main-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.about-header .subtitle {
    font-size: 1.3rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.about-header .hero-text {
    font-size: 1.1rem;
    color: #475569;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.about-content .section {
    background: white;
    margin: 2rem 0;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.about-content .section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    position: relative;
}

.about-content .section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 2px;
}

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

.feature-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.8rem;
}

.feature-description {
    color: #475569;
    line-height: 1.6;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-radius: 16px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.testimonial {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    padding: 2rem;
    border-radius: 16px;
    border-left: 4px solid #10b981;
    margin: 1.5rem 0;
}

.testimonial-text {
    font-style: italic;
    font-size: 1.1rem;
    color: #065f46;
    margin-bottom: 1rem;
}

.testimonial-author {
    font-weight: 600;
    color: #047857;
}

.cta-section {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-radius: 20px;
    margin: 3rem 0;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #6366f1;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,255,255,0.3);
}

.steps-container {
    margin-top: 2rem;
}

.step-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.step-number {
    background: #6366f1;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.malayalam-text {
    font-family: 'Noto Sans Malayalam', 'Manjari', sans-serif;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
}

/* Mobile Responsiveness for About Page */
@media (max-width: 768px) {
    .about-header .main-title {
        font-size: 2rem;
    }

    .about-content .section {
        padding: 1.5rem;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* ===========================
   Converter Tool Styles
   =========================== */
.converter-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

/* Decorative background gradient blob */
.converter-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

.converter-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
}

.converter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #475569;
    font-size: 1.1rem;
}

.input-label i {
    color: #6366f1;
}

.textarea-wrapper {
    position: relative;
    border-radius: 16px;
    background: white;
    padding: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.textarea-wrapper:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.custom-textarea {
    width: 100%;
    height: 300px;
    padding: 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #1e293b;
    resize: vertical;
    background: transparent;
    outline: none;
}

.custom-textarea::placeholder {
    color: #94a3b8;
}

#unicode_text {
    font-family: 'Noto Sans Malayalam', sans-serif;
}

#mltt_text {
    font-family: 'ML-TTKarthika', 'Karthika', sans-serif;
    background-color: #f8fafc;
}

.controls {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: white;
    color: #475569;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    border: none !important;
}

.info-box {
    margin-top: 3rem;
    padding: 1.5rem;
    background: #eff6ff;
    border-left: 4px solid #6366f1;
    border-radius: 8px;
    color: #1e40af;
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .converter-container {
        padding: 20px;
        margin: 20px;
    }
    
    .converter-grid {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .btn-action {
        width: 100%;
        justify-content: center;
    }
}
/* ===========================
   Landing Page / Home Styles
   =========================== */

.home-landing {
    overflow-x: hidden;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    min-height: 80vh;
}

.hero-content {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.hero-title .highlight {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    justify-content: center;
}

.hero-demo-card {
    background: white;
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    transform: rotate(-3deg);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255,255,255,0.5);
    text-align: center;
}

.hero-demo-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.hero-demo-card .demo-text {
    font-size: 5rem;
    font-family: 'Manjari', sans-serif;
    font-weight: bold;
    background: linear-gradient(to right, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1.2;
}

.hero-demo-card .demo-label {
    display: block;
    text-align: right;
    font-size: 0.875rem;
    color: #94a3b8;
    margin-top: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Landing Buttons */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.cta-button.primary {
    background: #6366f1;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.cta-button.primary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.4);
    color: white;
}

.cta-button.secondary {
    background: white;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.cta-button.secondary:hover {
    background: #f8fafc;
    color: #1e293b;
}

/* Features Section */
.features-section {
    padding: 6rem 2rem;
    background: white;
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 4rem;
    color: #0f172a;
}

.landing-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
    border-radius: 16px;
    transition: all 0.3s;
}

.feature-item:hover {
    background: #f8fafc;
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.feature-item p {
    color: #64748b;
    line-height: 1.6;
}

/* Latest Updates / Blog */
.latest-updates {
    padding: 6rem 2rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.mini-post-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    border: 1px solid #f1f5f9;
}

.mini-post-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.mini-post-card .entry-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.mini-post-card .entry-title a {
    color: #1e293b;
}

.mini-post-card .entry-title a:hover {
    color: #6366f1;
}

.mini-post-card .entry-excerpt {
    color: #64748b;
    font-size: 0.9375rem;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: 4rem;
        gap: 3rem;
    }

    .hero-actions {
        justify-content: center;
    }
    
    .hero-demo-card {
        transform: rotate(0deg);
        width: 100%;
    }
}
