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

:root {
    /* Colors */
    --color-primary: #3b82f6; /* Modern Blue */
    --color-primary-dark: #1d4ed8;
    --color-secondary: #6366f1; /* Indigo */
    --color-text-main: #1e293b; /* Slate 800 */
    --color-text-light: #64748b; /* Slate 500 */
    --color-bg-body: #f8fafc; /* Slate 50 */
    --color-bg-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-accent: #f43f5e; /* Rose */
    
    /* Typography */
    --font-family-base: 'Inter', system-ui, -apple-system, sans-serif;
    --font-size-root: 100%;
    --font-size-base: 1rem;
    --line-height-base: 1.6;
    
    /* Spacing & Layout */
    --container-width: 75rem; /* 1200px */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    
    /* Effects */
    --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);
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --transition-base: all 0.3s ease;
}

html {
    font-size: var(--font-size-root);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text-main);
    background-color: var(--color-bg-body);
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   2. Utilities & Layout
   ========================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.skip-link:focus {
    background-color: var(--color-bg-surface);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    clip: auto !important;
    clip-path: none;
    color: var(--color-primary);
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 1rem;
    line-height: normal;
    padding: 1rem;
    text-decoration: none;
    top: 1rem;
    width: auto;
    z-index: 10000;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-base);
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
}

a:hover, a:focus {
    color: var(--color-primary-dark);
    background-size: 100% 2px;
}

/* =========================================
   3. Header Styling
   ========================================= */
.site-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    box-shadow: var(--shadow-sm);
}

.site-header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

/* Logo Area */
.site-branding,
.header-html-1 {
    flex-shrink: 0;
}

.header-html-1 a {
    display: block;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-text-main);
    background: none; /* Reset link underline for logo */
}

/* Mobile Hamburger */
.mob-hamburger {
    display: none; /* Hidden by default on desktop */
    cursor: pointer;
    padding: 0.5rem;
}

.mob-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text-main);
    position: relative;
    transition: var(--transition-base);
}

.mob-hamburger span::before,
.mob-hamburger span::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--color-text-main);
    left: 0;
    transition: var(--transition-base);
}

.mob-hamburger span::before { top: -8px; }
.mob-hamburger span::after { top: 8px; }

/* Search Form */
.mob-search {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
}

.search-form {
    display: flex;
    align-items: center;
    background-color: var(--color-bg-body);
    border: 1px solid var(--color-border);
    border-radius: 2rem; /* Pill shape */
    padding: 0.25rem 0.5rem;
    transition: var(--transition-base);
    max-width: 400px;
    width: 100%;
}

.search-form:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background-color: var(--color-bg-surface);
}

.search-form__text {
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    flex-grow: 1;
    font-size: 0.95rem;
    color: var(--color-text-main);
    outline: none;
    width: 100%;
}

.search-form__submit {
    background-color: var(--color-primary);
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

/* Creating a search icon with CSS */
.search-form__submit::before {
    content: '';
    width: 0.75rem;
    height: 0.75rem;
    border: 2px solid white;
    border-radius: 50%;
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
}

.search-form__submit::after {
    content: '';
    width: 2px;
    height: 0.5rem;
    background-color: white;
    position: absolute;
    top: 1rem;
    left: 1.1rem;
    transform: rotate(-45deg);
}

.search-form__submit:hover {
    background-color: var(--color-primary-dark);
    transform: scale(1.05);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.4);
}

/* =========================================
   4. Navigation & Breadcrumbs
   ========================================= */
.header-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), transparent);
    margin: var(--spacing-sm) auto;
    opacity: 0.6;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

.main-navigation a {
    font-weight: 500;
    color: var(--color-text-main);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    background: none; /* remove hover underline */
}

.main-navigation a:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--color-primary);
}

/* =========================================
   5. Content Area Styling
   ========================================= */
.site-content {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-xl);
}

.entry-image--big {
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.entry-image__title h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--color-text-main) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

/* Main Article Content */
.entry-content {
    max-width: 65ch; /* Optimal readability width */
    margin: 0 auto;
}

.entry-content p {
    margin-bottom: var(--spacing-md);
    color: var(--color-text-light);
    font-size: 1.125rem;
}

/* Images within content */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

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

/* Captions */
.wp-caption {
    margin: var(--spacing-lg) auto;
    background-color: var(--color-bg-surface);
    padding: var(--spacing-xs);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    max-width: 100%;
}

.wp-caption-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-light);
    padding: var(--spacing-xs) 0;
    font-style: italic;
}

/* Buttons inside content (if any implied by 'creates account') */
.entry-content a[href*="register"],
.entry-content a.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
    border: none;
    background-size: 100%; /* Override default link bg */
    transition: var(--transition-base);
}

.entry-content a[href*="register"]:hover,
.entry-content a.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4);
    filter: brightness(110%);
}

/* =========================================
   6. Form Elements (Generic)
   ========================================= */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: var(--color-bg-surface);
    transition: var(--transition-base);
}

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

/* =========================================
   7. Responsive Design
   ========================================= */

/* Tablet & Mobile */
@media screen and (max-width: 768px) {
    :root {
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }

    .site-header-inner {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    /* Mobile Menu Trigger */
    .mob-hamburger {
        display: block;
        order: 1;
    }

    /* Logo centers between hamburger and search on mobile if needed, 
       or order adjusted based on preference. Here: Logo first. */
    .header-html-1 {
        order: 2;
        margin-right: auto;
    }

    .mob-search {
        order: 3;
        width: 100%;
        margin-top: var(--spacing-sm);
    }

    .search-form {
        max-width: 100%;
    }

    /* Adjust typography */
    .entry-image__title h1 {
        font-size: 2.25rem;
    }

    .entry-content {
        padding: 0 var(--spacing-xs);
    }
    
    .wp-caption {
        width: 100% !important; /* Override inline styles */
    }
}

/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.site-main {
    animation: fadeIn 0.6s ease-out forwards;
}
