/*
Theme Name: CodeItLab Modern
Theme URI: https://codeitlab.com
Author: Alex + Giorgos
Author URI: https://codeitlab.com
Description: Modern, high-performance WordPress theme with dark mode, glassmorphism, and multi-language support.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: codeitlab
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, dark-mode, glassmorphism, modern, performance
*/

/* CSS Variables */
:root {
    --primary: #10B981;
    --primary-dark: #059669;
    --secondary: #6366f1;
    --accent: #f59e0b;
    --background-light: #f9fafb;
    --background-dark: #0b0f13;
    --card-dark: #161b22;
    --text-light: #1f2937;
    --text-dark: #f3f4f6;
    --text-muted: #9ca3af;
    --border-light: #e5e7eb;
    --border-dark: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(22, 27, 34, 0.8);
    --glass-blur: blur(12px);
    --shadow-sm: 0 1px 2px 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.3);
    --font-display: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    background-color: var(--background-light);
    color: var(--text-light);
    transition: background-color var(--transition-slow), color var(--transition-slow);
}

body.dark-mode {
    background-color: var(--background-dark);
    color: var(--text-dark);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* Glass Card Component */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--border-dark);
    color: inherit;
}

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

/* Form Elements */
input, textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    color: inherit;
    transition: all var(--transition-fast);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-dark);
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
}

.nav-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    opacity: 0.8;
    transition: all var(--transition-fast);
}

.nav-links a:hover {
    opacity: 1;
    color: var(--primary);
}

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-dark);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-switch:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.15), transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.hero-title span {
    color: var(--primary);
    font-style: italic;
}

.hero-text {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

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

.hero-visual {
    position: relative;
}

.hero-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform var(--transition-slow);
}

.hero-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

/* Admin Bar Support */
body.admin-bar {
    padding-top: 0 !important;
}

#wpadminbar {
    position: fixed !important;
    top: 0 !important;
    z-index: 99999 !important;
}

.admin-bar .navbar {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    .admin-bar .navbar {
        top: 46px !important;
    }
    
    #wpadminbar {
        position: fixed !important;
    }
}

/* WordPress Core Blocks Fixes */
.wp-block {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.wp-block[data-align="wide"] {
    max-width: 1400px;
}

.wp-block[data-align="full"] {
    max-width: none;
}

/* Gutenberg Block Fixes */
.wp-block-group {
    padding: 2rem 0;
}

.wp-block-cover {
    margin-bottom: 2rem;
}

.wp-block-cover-image,
.wp-block-cover {
    min-height: 400px;
}

.wp-block-columns {
    gap: 2rem;
    margin-bottom: 2rem;
}

.wp-block-column {
    padding: 1rem;
}

.wp-block-image {
    margin-bottom: 1.5rem;
}

.wp-block-image img {
    border-radius: var(--radius-md);
}

.wp-block-quote {
    background: rgba(16, 185, 129, 0.05);
    border-left: 4px solid var(--primary);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.wp-block-quote p {
    font-style: italic;
    margin-bottom: 0;
}

.wp-block-code {
    background: var(--card-dark);
    border-radius: var(--radius-sm);
    padding: 1rem;
    overflow-x: auto;
}

.wp-block-preformatted {
    background: var(--card-dark);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
}

/* WordPress Gallery Fix */
.wp-block-gallery {
    margin-bottom: 2rem;
}

.wp-block-gallery .blocks-gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* WordPress Table Fix */
.wp-block-table {
    margin: 2rem 0;
    overflow-x: auto;
}

.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
}

.wp-block-table td,
.wp-block-table th {
    padding: 1rem;
    border: 1px solid var(--border-dark);
}

/* WordPress Embed Fix */
.wp-block-embed {
    margin: 2rem 0;
}

.wp-block-embed iframe {
    max-width: 100%;
    border-radius: var(--radius-md);
}

/* WordPress Calendar Fix */
.wp-block-calendar {
    margin: 2rem 0;
}

.wp-block-calendar table {
    width: 100%;
    border-collapse: collapse;
}

.wp-block-calendar td,
.wp-block-calendar th {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid var(--border-dark);
}

/* WordPress Categories/Archives Fix */
.wp-block-archives,
.wp-block-categories {
    list-style: none;
    padding: 0;
}

.wp-block-archives li,
.wp-block-categories li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-dark);
}

.wp-block-archives li:last-child,
.wp-block-categories li:last-child {
    border-bottom: none;
}

/* WordPress Search Fix */
.wp-block-search {
    margin: 2rem 0;
}

.wp-block-search__input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
}

.wp-block-search__button {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-left: 0.5rem;
}

.wp-block-search__button:hover {
    background: var(--primary-dark);
}

/* WordPress Button Fix */
.wp-block-button__link {
    background: var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.wp-block-button__link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* WordPress Pullquote Fix */
.wp-block-pullquote {
    border-top: 4px solid var(--primary);
    border-bottom: 4px solid var(--primary);
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.wp-block-pullquote blockquote {
    margin: 0;
    font-style: italic;
}

/* WordPress Verse Fix */
.wp-block-verse {
    background: var(--card-dark);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
}

/* WordPress Audio Fix */
.wp-block-audio audio {
    width: 100%;
    margin: 1rem 0;
}

/* WordPress Video Fix */
.wp-block-video video {
    width: 100%;
    border-radius: var(--radius-md);
}

/* WordPress File Fix */
.wp-block-file {
    background: rgba(16, 185, 129, 0.1);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.wp-block-file__button {
    background: var(--primary);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    margin-left: 1rem;
}

/* WordPress RSS Fix */
.wp-block-rss {
    list-style: none;
    padding: 0;
}

.wp-block-rss li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-dark);
}

/* WordPress Tag Cloud Fix */
.wp-block-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wp-block-tag-cloud a {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.wp-block-tag-cloud a:hover {
    background: var(--primary);
    color: white;
}

/* Fixed Elements Fix */
.navbar.fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.admin-bar .navbar.fixed {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    .admin-bar .navbar.fixed {
        top: 46px !important;
    }
}

/* Section Styles */
.section {
    padding: 6rem 1.5rem;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
}

.service-card {
    padding: 2rem;
    transition: all var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all var(--transition-normal);
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    background: rgba(16, 185, 129, 0.2);
}

.service-icon svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

/* Process Steps */
.process-timeline {
    max-width: 800px;
    margin: 0 auto;
}

.process-step {
    position: relative;
    padding-left: 4rem;
    margin-bottom: 4rem;
}

.process-step::before {
    content: attr(data-step);
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--font-display);
    font-size: 6rem;
    font-weight: 900;
    color: rgba(16, 185, 129, 0.1);
    line-height: 1;
}

.process-step h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.process-step p {
    color: var(--text-muted);
}

/* Footer */
.footer {
    background: var(--card-dark);
    padding: 4rem 1.5rem 2rem;
    border-top: 1px solid var(--border-dark);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    font-size: 0.875rem;
}

.footer-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1280px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--card-dark);
        flex-direction: column;
        padding: 6rem 2rem 2rem;
        transition: right var(--transition-normal);
    }

    .nav-links.active {
        right: 0;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-card {
        margin-top: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-slow);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary);
    z-index: 9999;
    transition: width var(--transition-fast);
}

/* Reading Progress */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 1001;
    transition: width var(--transition-fast);
}

/* Smooth Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-normal);
    z-index: 999;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    color: white;
}
