
/* =========================================
   1. CSS Reset & Base Normalization
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-body);
    font-weight: 400;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

[x-cloak] {
    display: none !important;
}

/* =========================================
   2. CSS Variables (Custom Properties)
   ========================================= */
:root {
    /* Color Palette */
    --primary-color: #1a56a3; /* Deep Blue */
    --primary-hover: #123d75;
    --secondary-color: #3b82f6; /* Bright Blue */
    --accent-color: #10b981; /* Success Green */
    --accent-hover: #059669;
    --cta-gradient: linear-gradient(135deg, #1a56a3 0%, #3b82f6 100%);
    
    /* Text Colors */
    --text-color: #1f2937;
    --text-light: #6b7280;
    --text-inverse: #ffffff;

    /* Backgrounds */
    --bg-body: #f9fafb;
    --bg-card: #ffffff;
    --bg-header: #ffffff;

    /* Spacing & Sizes */
    --container-width: 75rem; /* 1200px */
    --header-height: 4.5rem;
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 15px rgba(59, 130, 246, 0.5);

    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   3. Layout & Utilities
   ========================================= */
.wrap {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.bgall {
    background-color: var(--bg-header);
    position: relative;
    z-index: 10;
}

/* Helper classes simulation for Tailwind-like names in HTML */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.ml-auto { margin-left: auto; }
.hidden { display: none; }

/* Responsive Utilities (Media Queries) */
@media (min-width: 768px) {
    .md\:block { display: block !important; }
    .md\:hidden { display: none !important; }
}

/* =========================================
   4. Header & Navigation
   ========================================= */
header.bgall {
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.header_list {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Logo */
.custom-logo-link img {
    height: 2.5rem;
    width: auto;
    transition: var(--transition-base);
    object-fit: contain;
}

.custom-logo-link:hover img {
    transform: scale(1.05);
}

/* Mobile Menu Button */
button[aria-label="mobile menu"] {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

button[aria-label="mobile menu"]:hover {
    background-color: var(--bg-body);
    color: var(--primary-color);
}

/* Off-canvas Mobile Menu */
#mobileMenu {
    position: fixed;
    top: 0;
    left: 0;
    width: 18rem; /* 288px */
    height: 100vh;
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    padding: 2rem 1rem;
    z-index: 200;
    transform-origin: left;
    animation: slideIn 0.3s ease-out;
    border-right: 1px solid #e5e7eb;
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Desktop Navigation */
nav.bgall {
    background-color: var(--primary-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-menu {
    list-style: none;
    display: flex;
    flex-direction: column; /* Mobile first stack */
    gap: 0.5rem;
}

/* Desktop Menu Styles */
@media (min-width: 768px) {
    .header-menu {
        flex-direction: row;
        gap: 2rem;
        justify-content: center;
        padding: 0.75rem 0;
    }
}

.menu-item a {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-base);
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.02em;
}

/* Mobile Link Styles */
#mobileMenu .menu-item a {
    color: var(--text-color);
    font-size: 1.1rem;
    border-bottom: 1px solid #f3f4f6;
}
#mobileMenu .menu-item a:hover {
    color: var(--primary-color);
    padding-left: 1.25rem;
    background-color: #f9fafb;
}

/* Desktop Link Styles */
nav.bgall .menu-item a {
    color: rgba(255, 255, 255, 0.9);
}
nav.bgall .menu-item a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
}

/* =========================================
   5. Buttons & Interactive Elements
   ========================================= */
/* Login Button in Header */
.m_but {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--cta-gradient);
    color: var(--text-inverse);
    text-decoration: none;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    border: 1px solid transparent;
}

.m_but:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.m_but:active {
    transform: translateY(0);
}

/* Content Buttons (.btn) */
.wp-block-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 1rem 2.5rem;
    border-radius: 50px; /* Pill shape */
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 1.1rem;
    transition: var(--transition-base);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn:active {
    transform: scale(0.98);
}

/* =========================================
   6. Content Typography & Styling (.cms-content)
   ========================================= */
.cms-content {
    background-color: var(--bg-card);
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.cms-content h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.2;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.cms-content h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    color: var(--text-color);
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
    position: relative;
    padding-left: 1rem;
}

.cms-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.cms-content p {
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
    color: #374151;
    line-height: 1.75;
}

.cms-content strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* Lists */
.cms-content ul, 
.cms-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.cms-content ul li,
.cms-content ol li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 0.5rem;
}

.cms-content ul li::marker {
    color: var(--secondary-color);
}

.cms-content ol li::marker {
    color: var(--primary-color);
    font-weight: bold;
}

/* Blockquote */
.cms-content blockquote {
    background: #f0f7ff;
    border-left: 5px solid var(--secondary-color);
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: #4b5563;
}

/* Images within content */
.cms-content figure {
    margin: 2.5rem 0;
}

.cms-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    display: block;
    margin: 0 auto;
}

.cms-content img:hover {
    box-shadow: var(--shadow-lg);
    transform: scale(1.01);
}

/* Links in content */
.cms-content a:not(.btn) {
    color: var(--secondary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.cms-content a:not(.btn):hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* =========================================
   7. Form Elements (Generic Support)
   ========================================= */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    background-color: #fff;
    font-size: 1rem;
    transition: var(--transition-base);
    margin-bottom: 1rem;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* =========================================
   8. Footer
   ========================================= */
footer.bgall {
    background-color: #111827;
    color: #9ca3af;
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    border-top: 4px solid var(--secondary-color);
}

footer .copu {
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

/* =========================================
   9. Mobile Adaptations (< 768px)
   ========================================= */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .wrap {
        padding: 0 1rem;
    }

    .cms-content {
        padding: 1.5rem 1rem;
        margin-top: 1rem;
    }

    .btn {
        width: 100%;
        display: block;
        padding: 0.875rem;
    }
    
    .wp-block-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-box {
        width: 100%;
    }
}
