/* WPBlogger Theme - Clean & Professional */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* ============================================
   Base Styles & Reset
   ============================================ */
html {
    overflow-y: scroll;
    overflow-x: hidden;
    width: 100vw;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--background-color) 0%, #e2e8f0 100%);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============================================
   Layout
   ============================================ */
.content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    min-height: 100vh;
}

/* ============================================
   Header
   ============================================ */
.dj-app-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--surface-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.dj-app-site-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    letter-spacing: -0.025em;
}

.dj-app-site-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

/* ============================================
   Under Construction Badge
   ============================================ */
.construction-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-color), #f97316);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 1rem;
    box-shadow: var(--shadow-md);
}

.construction-badge::before {
    content: "🔧";
    font-size: 1rem;
}

/* ============================================
   Navigation Menu
   ============================================ */
.dj-app-menu-container {
    background: transparent;
    border-radius: 12px;
    padding: 1rem 0;
    margin: 0;
}

.dj-app-integrated-menu {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.dj-app-integrated-menu .dj-app-menu-container {
    background: transparent;
    padding: 0.5rem 0;
    margin: 0;
}

.dj-app-menu-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.dj-app-menu-item {
    position: relative;
}

.dj-app-menu-link,
.dj-app-menu-text {
    display: block;
    padding: 0.875rem 1.5rem;
    text-decoration: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: 0 1px 2px 0 transparent;
}

.dj-app-menu-link:hover {
    background: var(--border-color);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.dj-app-menu-item-current .dj-app-menu-text {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   Submenu Dropdown
   ============================================ */
.dj-app-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

.dj-app-menu-item:hover .dj-app-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dj-app-submenu .dj-app-menu-item {
    position: static;
}

.dj-app-submenu .dj-app-menu-link,
.dj-app-submenu .dj-app-menu-text {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    font-size: 0.9rem;
}

.dj-app-submenu .dj-app-menu-item:last-child .dj-app-menu-link,
.dj-app-submenu .dj-app-menu-item:last-child .dj-app-menu-text {
    border-bottom: none;
}

.dj-app-submenu .dj-app-menu-link:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.dj-app-submenu .dj-app-menu-item-current .dj-app-menu-text {
    background: var(--primary-color);
    color: white;
}

/* Dropdown arrow indicators */
.dj-app-menu-item:has(.dj-app-submenu) .dj-app-menu-link::after,
.dj-app-menu-item:has(.dj-app-submenu) .dj-app-menu-text::after,
.dj-app-menu-item-has-submenu .dj-app-menu-link::after,
.dj-app-menu-item-has-submenu .dj-app-menu-text::after {
    content: "▼";
    margin-left: 0.5rem;
    font-size: 0.8em;
    transition: transform 0.3s;
}

.dj-app-menu-item:hover:has(.dj-app-submenu) .dj-app-menu-link::after,
.dj-app-menu-item:hover:has(.dj-app-submenu) .dj-app-menu-text::after,
.dj-app-menu-item-has-submenu:hover .dj-app-menu-link::after,
.dj-app-menu-item-has-submenu:hover .dj-app-menu-text::after {
    transform: rotate(180deg);
}

.dj-app-submenu .dj-app-menu-link::after,
.dj-app-submenu .dj-app-menu-text::after {
    content: none !important;
}

/* Parent active state when submenu contains active item */
.dj-app-menu-item:has(.dj-app-submenu .dj-app-menu-item-current) > .dj-app-menu-link,
.dj-app-menu-item:has(.dj-app-submenu .dj-app-menu-item-current) > .dj-app-menu-text {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   Content Area
   ============================================ */
.dj-app-content {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0.5rem 0;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.dj-app-page-content {
    padding-top: 1rem;
}

.dj-app-content h1,
.dj-app-content h2,
.dj-app-content h3,
.dj-app-content h4,
.dj-app-content h5,
.dj-app-content h6 {
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.dj-app-content h1 {
    font-size: 2rem;
}

.dj-app-content h2 {
    font-size: 1.75rem;
}

.dj-app-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.dj-app-content p {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.dj-app-content a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.dj-app-content a:hover {
    color: #1d4ed8;
}

.dj-app-content .dj-app-menu-link,
.dj-app-content .dj-app-menu-text {
    text-decoration: none;
}

.dj-app-content article {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.dj-app-content article:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ============================================
   Footer
   ============================================ */
.dj-app-footer {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.dj-app-footer p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ============================================
   Newsletter Plugin
   ============================================ */
.djebel-simple-newsletter-form {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin: 2rem auto;
    max-width: 500px;
}

.djebel-simple-newsletter-msg {
    margin-bottom: 1rem;
}

.newsletter-input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.newsletter-email-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: var(--surface-color);
    color: var(--text-primary);
    min-width: 0;
}

.newsletter-email-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.newsletter-email-input::placeholder {
    color: var(--text-secondary);
}

.newsletter-submit-btn {
    padding: 0.75rem 1.25rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.newsletter-submit-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.newsletter-submit-btn:active {
    transform: translateY(0);
}

.newsletter-agree-section {
    margin-top: 1rem;
}

.newsletter-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.newsletter-checkbox {
    margin: 0;
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.newsletter-agree-text {
    flex: 1;
}

/* ============================================
   Pre-formatted Text Content
   ============================================ */
.text-pre-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-family: monospace;
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    line-height: 1.6;
    color: var(--text-primary);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .content-area {
        padding: 0.5rem 1rem;
    }

    .dj-app-site-title {
        font-size: 2rem;
    }

    .dj-app-menu-nav {
        flex-direction: column;
        align-items: center;
    }

    .dj-app-menu-link,
    .dj-app-menu-text {
        width: 100%;
        text-align: center;
    }

    .newsletter-input-group {
        flex-direction: column;
    }

    .newsletter-submit-btn {
        width: 100%;
    }

    .djebel-simple-newsletter-form {
        padding: 1.25rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .dj-app-site-title {
        font-size: 1.75rem;
    }

    .dj-app-content {
        padding: 1.5rem;
    }

    .dj-app-integrated-menu {
        margin-bottom: 0.5rem;
        padding: 0.25rem 0;
    }

    .dj-app-page-content {
        padding-top: 0.5rem;
    }
}
