/*
 Theme Name:   Hjelmar
 Theme URI:    https://hjelmar.com
 Description:  Custom child theme for Hjelmar personal site
 Author:       Walter Hjelmar
 Template:     astra
 Version:      1.1.0
 Text Domain:  hjelmar
*/

/* === Color Variables === */
:root {
    --hjelmar-primary: #1a365d;
    --hjelmar-accent: #2b6cb0;
    --hjelmar-accent-light: #4299e1;
    --hjelmar-light: #ebf4ff;
    --hjelmar-dark: #1a202c;
    --hjelmar-gray: #4a5568;
    --hjelmar-gray-light: #718096;
    --hjelmar-border: #e2e8f0;
    --hjelmar-bg: #f7fafc;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--hjelmar-dark);
    line-height: 1.7;
    background: var(--hjelmar-bg);
}

/* ============================================
   HEADER - Astra Builder Header
   ============================================ */
.ast-primary-header-bar,
.ast-primary-header,
.main-header-bar {
    background: var(--hjelmar-primary) !important;
    border-bottom: 3px solid var(--hjelmar-accent) !important;
}

/* Site title */
.ast-site-title-wrap .site-title a,
.site-title a {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.6rem !important;
    letter-spacing: 1px;
    text-decoration: none !important;
}

/* Navigation links */
.ast-builder-menu .main-header-menu a,
.ast-builder-menu-1 .main-header-menu a,
.ast-header-navigation a,
.main-header-menu .menu-link,
.main-header-menu a {
    color: #cbd5e0 !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    font-size: 0.8rem !important;
    letter-spacing: 1px !important;
    transition: color 0.2s ease !important;
    padding: 0 1rem !important;
}

.ast-builder-menu .main-header-menu a:hover,
.ast-builder-menu-1 .main-header-menu a:hover,
.main-header-menu a:hover {
    color: #ffffff !important;
}

.main-header-menu .current-menu-item > .menu-link,
.main-header-menu .current-menu-item > a {
    color: #ffffff !important;
}

/* Mobile menu toggle */
.ast-mobile-menu-trigger-minimal,
.ast-button-wrap .ast-mobile-menu-trigger-minimal {
    color: #ffffff !important;
}

/* ============================================
   HERO SECTION (Home Page)
   ============================================ */
.hjelmar-hero {
    background: linear-gradient(135deg, var(--hjelmar-primary) 0%, var(--hjelmar-accent) 100%);
    color: #ffffff;
    padding: 5rem 2rem;
    text-align: center;
    margin: -2rem -2rem 3rem -2rem;
}

.hjelmar-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #ffffff;
}

.hjelmar-hero p {
    font-size: 1.25rem;
    color: #cbd5e0;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hjelmar-hero .hjelmar-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: 0.8rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.2s ease;
    margin: 0 0.5rem;
}

.hjelmar-hero .hjelmar-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.7);
}

.hjelmar-hero .hjelmar-btn-primary {
    background: #ffffff;
    color: var(--hjelmar-primary);
    border-color: #ffffff;
}

.hjelmar-hero .hjelmar-btn-primary:hover {
    background: #ebf4ff;
}

/* ============================================
   FEATURE CARDS (Home Page)
   ============================================ */
.hjelmar-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.hjelmar-feature-card {
    background: #ffffff;
    border: 1px solid var(--hjelmar-border);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hjelmar-feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.hjelmar-feature-card h3 {
    color: var(--hjelmar-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.hjelmar-feature-card p {
    color: var(--hjelmar-gray);
    font-size: 0.95rem;
    margin: 0;
}

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

/* ============================================
   CONTENT AREA
   ============================================ */
.site-content .ast-container {
    max-width: 1100px;
}

.entry-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--hjelmar-primary);
    margin-bottom: 1rem;
}

/* Hide page title on front page */
.home .entry-title,
.page-id-11 .entry-title,
.home .entry-header {
    display: none;
}

.entry-content p {
    font-size: 1.05rem;
    color: var(--hjelmar-gray);
    margin-bottom: 1.5rem;
}

/* ============================================
   BUTTONS
   ============================================ */
a.wp-block-button__link,
.button,
input[type="submit"],
button[type="submit"] {
    background: var(--hjelmar-accent) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 0.7rem 1.5rem !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: background 0.2s ease, transform 0.1s ease;
    cursor: pointer;
}

a.wp-block-button__link:hover,
.button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
    background: var(--hjelmar-primary) !important;
    transform: translateY(-1px);
}

/* ============================================
   FORMS (Login, Upload)
   ============================================ */
.members-login-form,
.hjelmar-login-wrap {
    max-width: 420px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: #ffffff;
    border: 1px solid var(--hjelmar-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.members-login-form label {
    font-weight: 600;
    color: var(--hjelmar-dark);
    display: block;
    margin-bottom: 0.3rem;
}

.members-login-form input[type="text"],
.members-login-form input[type="password"],
input[type="email"],
input[type="text"],
textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--hjelmar-border);
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--hjelmar-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
}

/* ============================================
   CARDS & NOTICES
   ============================================ */
.hjelmar-card {
    background: #ffffff;
    border: 1px solid var(--hjelmar-border);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.5rem;
}

.hjelmar-card h3 {
    color: var(--hjelmar-primary);
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--hjelmar-light);
}

.hjelmar-notice {
    background: var(--hjelmar-light);
    border-left: 4px solid var(--hjelmar-accent);
    padding: 1rem 1.5rem;
    border-radius: 0 6px 6px 0;
    margin: 1.5rem 0;
}

.hjelmar-notice-error {
    background: #fff5f5;
    border-left-color: #e53e3e;
}

.hjelmar-notice-success {
    background: #f0fff4;
    border-left-color: #38a169;
}

/* ============================================
   DOWNLOADS
   ============================================ */
.dlm-downloads {
    display: grid;
    gap: 1rem;
}

.dlm-download {
    padding: 1rem 1.5rem;
    background: #ffffff;
    border: 1px solid var(--hjelmar-border);
    border-radius: 6px;
    transition: box-shadow 0.2s ease;
}

.dlm-download:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dlm-download a {
    color: var(--hjelmar-accent);
    font-weight: 600;
    text-decoration: none;
}

.dlm-download a:hover {
    color: var(--hjelmar-primary);
}

/* File table */
.hjelmar-file-table {
    width: 100%;
    border-collapse: collapse;
}

.hjelmar-file-table th {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 2px solid var(--hjelmar-border);
    color: var(--hjelmar-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hjelmar-file-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--hjelmar-border);
}

.hjelmar-file-table tr:hover td {
    background: var(--hjelmar-light);
}

.hjelmar-file-table a {
    color: var(--hjelmar-accent);
    font-weight: 500;
    text-decoration: none;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer,
footer.site-footer {
    background: var(--hjelmar-dark) !important;
}

.site-below-footer-wrap,
.ast-builder-grid-row-container {
    background: transparent !important;
}

.ast-footer-copyright,
.ast-footer-copyright p {
    color: #a0aec0 !important;
    font-size: 0.85rem !important;
}

.ast-footer-copyright a {
    color: #63b3ed !important;
}

/* Hide powered by link */
.ast-footer-copyright a[href*="wpastra"] {
    display: none !important;
}

/* Hide the pipe before "Powered by" */
.ast-footer-copyright p {
    font-size: 0 !important;
}

.ast-footer-copyright p::before {
    content: '\00A9  2026 Hjelmar. All rights reserved.';
    font-size: 0.85rem !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 921px) {
    .hjelmar-hero {
        padding: 3rem 1.5rem;
    }

    .hjelmar-hero h1 {
        font-size: 2rem;
    }

    .hjelmar-hero p {
        font-size: 1.1rem;
    }

    .hjelmar-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 544px) {
    .hjelmar-hero h1 {
        font-size: 1.6rem;
    }

    .hjelmar-hero .hjelmar-btn {
        display: block;
        margin: 0.5rem auto;
        max-width: 250px;
    }
}
