/*
Theme Name: DigitalHjelp
Theme URI: https://digitalhjelp.no
Author: DigitalHjelp
Author URI: https://digitalhjelp.no
Description: Profesjonelt tema for utvikling og drift av nettsider – digitalhjelp.no leverer moderne webløsninger, vedlikehold og hosting for bedrifter og privatpersoner.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: digitalhjelp
Tags: it-support, helpdesk, business, responsive, clean
*/

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-primary:    #1B4F72;
    --color-primary-d:  #154360;
    --color-secondary:  #2E86C1;
    --color-accent:     #E67E22;
    --color-accent-h:   #CA6F1E;
    --color-success:    #1E8449;
    --color-light:      #EBF5FB;
    --color-bg:         #F4F6F7;
    --color-white:      #FFFFFF;
    --color-text:       #1A252F;
    --color-muted:      #566573;
    --color-border:     #D5D8DC;
    --radius:           8px;
    --radius-lg:        16px;
    --shadow:           0 2px 12px rgba(27,79,114,.10);
    --shadow-lg:        0 8px 32px rgba(27,79,114,.16);
    --transition:       .22s ease;
    --max-w:            1200px;
    --font-body:        'Inter', 'Segoe UI', Arial, sans-serif;
    --font-heading:     'Inter', 'Segoe UI', Arial, sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-secondary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary); }
ul { list-style: none; }

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-primary);
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* === LAYOUT === */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section--light { background: var(--color-light); }
.section--bg { background: var(--color-bg); }
.section--primary { background: var(--color-primary); color: var(--color-white); }
.section--primary h2, .section--primary h3 { color: var(--color-white); }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header p { font-size: 1.1rem; color: var(--color-muted); max-width: 640px; margin: .75rem auto 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.flex-center { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary { background: var(--color-accent); color: var(--color-white); border-color: var(--color-accent); }
.btn-primary:hover { background: var(--color-accent-h); border-color: var(--color-accent-h); color: var(--color-white); }
.btn-outline { background: transparent; color: var(--color-white); border-color: var(--color-white); }
.btn-outline:hover { background: var(--color-white); color: var(--color-primary); }
.btn-secondary { background: var(--color-secondary); color: var(--color-white); border-color: var(--color-secondary); }
.btn-secondary:hover { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-white); }
.btn-lg { padding: 1.1rem 2.5rem; font-size: 1.1rem; }

/* === HEADER === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: var(--max-w);
    margin: 0 auto;
    gap: 1.5rem;
}
.site-logo { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.site-logo .logo-icon {
    width: 44px; height: 44px;
    background: var(--color-primary);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-white);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -1px;
    flex-shrink: 0;
}
.site-logo .logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.site-logo .logo-name { font-size: 1.2rem; font-weight: 700; color: var(--color-primary); }
.site-logo .logo-tagline { font-size: .7rem; color: var(--color-muted); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }

/* Main nav */
.main-nav ul { display: flex; gap: .25rem; align-items: center; }
.main-nav a {
    display: block; padding: .5rem .9rem;
    border-radius: var(--radius);
    font-weight: 500; font-size: .95rem;
    color: var(--color-text);
    transition: all var(--transition);
}
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--color-light); color: var(--color-primary); }

.header-cta { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.header-phone { display: flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--color-primary); font-size: .95rem; }
.header-phone svg { width: 16px; height: 16px; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; color: var(--color-primary); }
.nav-toggle svg { display: block; }

/* === HERO === */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1A5276 50%, var(--color-secondary) 100%);
    color: var(--color-white);
    padding: 5rem 0 6rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='rgba(255,255,255,.07)'/%3E%3C/svg%3E");
    pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; position: relative; }
.hero-content h1 { color: var(--color-white); margin-bottom: 1.25rem; }
.hero-content .hero-lead { font-size: 1.2rem; opacity: .9; margin-bottom: 2rem; line-height: 1.7; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 2rem; margin-top: 2.5rem; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: .5rem; font-size: .9rem; opacity: .85; }
.trust-item svg { width: 18px; height: 18px; color: #F39C12; }

.hero-card {
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}
.hero-card h3 { color: var(--color-white); margin-bottom: 1.5rem; }
.hero-form .form-group { margin-bottom: 1rem; }
.hero-form label { display: block; font-size: .85rem; margin-bottom: .35rem; opacity: .9; font-weight: 500; }
.hero-form input, .hero-form select, .hero-form textarea {
    width: 100%; padding: .75rem 1rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.3);
    background: rgba(255,255,255,.15);
    color: var(--color-white);
    font-size: .95rem;
    font-family: inherit;
    transition: border-color var(--transition);
}
.hero-form input::placeholder, .hero-form textarea::placeholder { color: rgba(255,255,255,.6); }
.hero-form input:focus, .hero-form select:focus, .hero-form textarea:focus {
    outline: none; border-color: rgba(255,255,255,.7);
    background: rgba(255,255,255,.2);
}
.hero-form select option { color: var(--color-text); background: white; }
.hero-form .btn { width: 100%; justify-content: center; margin-top: .5rem; }

/* === SERVICES === */
.service-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--color-secondary);
    transform: scaleX(0);
    transition: transform var(--transition);
    transform-origin: left;
}
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
    width: 60px; height: 60px;
    background: var(--color-light);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
    transition: background var(--transition);
}
.service-card:hover .service-icon { background: var(--color-secondary); }
.service-card h3 { font-size: 1.15rem; margin-bottom: .6rem; }
.service-card p { font-size: .9rem; color: var(--color-muted); margin-bottom: 1.25rem; }
.service-link { font-weight: 600; font-size: .9rem; color: var(--color-secondary); display: flex; align-items: center; gap: .3rem; }
.service-link:hover { color: var(--color-primary); }

/* === PROCESS === */
.process-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; position: relative; }
.process-step { text-align: center; padding: 1.5rem; }
.step-number {
    width: 56px; height: 56px;
    background: var(--color-accent);
    color: var(--color-white);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem; font-weight: 800;
    margin: 0 auto 1rem;
}
.process-step h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.process-step p { font-size: .9rem; color: var(--color-muted); }

/* === WHY US === */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.why-list { list-style: none; display: flex; flex-direction: column; gap: 1.25rem; }
.why-item { display: flex; gap: 1rem; align-items: flex-start; }
.why-item-icon {
    width: 44px; height: 44px; flex-shrink: 0;
    background: var(--color-light);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
}
.why-item-text h4 { margin-bottom: .25rem; color: var(--color-primary); }
.why-item-text p { font-size: .9rem; color: var(--color-muted); margin: 0; }
.why-image { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.why-image-placeholder {
    background: linear-gradient(135deg, var(--color-light), #D6EAF8);
    aspect-ratio: 4/3;
    display: flex; align-items: center; justify-content: center;
    font-size: 5rem;
}

/* === STATS === */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 2rem; }
.stat-card { text-align: center; padding: 2rem 1rem; }
.stat-number { font-size: 3rem; font-weight: 800; color: var(--color-white); line-height: 1; margin-bottom: .25rem; }
.stat-label { font-size: .9rem; opacity: .8; }

/* === TESTIMONIALS === */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.testimonial-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border);
}
.testimonial-stars { color: #F39C12; font-size: 1.1rem; margin-bottom: 1rem; letter-spacing: .1em; }
.testimonial-text { font-style: italic; color: var(--color-muted); margin-bottom: 1.5rem; line-height: 1.7; }
.testimonial-author { display: flex; align-items: center; gap: .75rem; }
.testimonial-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--color-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    flex-shrink: 0;
}
.testimonial-name { font-weight: 600; font-size: .95rem; }
.testimonial-role { font-size: .8rem; color: var(--color-muted); }

/* === CTA BAND === */
.cta-band {
    background: linear-gradient(135deg, var(--color-accent) 0%, #D35400 100%);
    padding: 4rem 0;
    text-align: center;
    color: var(--color-white);
}
.cta-band h2 { color: var(--color-white); margin-bottom: 1rem; }
.cta-band p { font-size: 1.1rem; opacity: .9; margin-bottom: 2rem; }

/* === CONTACT === */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; }
.contact-info h2 { margin-bottom: 1.5rem; }
.contact-items { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-item-icon {
    width: 48px; height: 48px; flex-shrink: 0;
    background: var(--color-light);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
}
.contact-item h4 { margin-bottom: .2rem; }
.contact-item p, .contact-item a { font-size: .95rem; color: var(--color-muted); }
.contact-item a:hover { color: var(--color-primary); }

.contact-form { background: var(--color-white); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow); border: 1px solid var(--color-border); }
.contact-form h3 { margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; color: var(--color-text); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: .75rem 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    font-family: inherit; font-size: .95rem;
    color: var(--color-text);
    background: var(--color-white);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(46,134,193,.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* === FOOTER === */
.site-footer { background: #0D1B2A; color: #CBD5E0; padding: 4rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; }
.footer-brand .logo-name { color: var(--color-white); font-size: 1.3rem; }
.footer-brand .logo-tagline { color: #718096; }
.footer-about { margin-top: 1rem; font-size: .9rem; color: #A0AEC0; line-height: 1.7; }
.footer-social { display: flex; gap: .75rem; margin-top: 1.5rem; }
.social-link {
    width: 38px; height: 38px;
    background: rgba(255,255,255,.07);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: #A0AEC0; font-size: .95rem;
    transition: all var(--transition);
    text-decoration: none;
}
.social-link:hover { background: var(--color-secondary); color: white; }

.footer-col h4 { color: var(--color-white); font-size: .95rem; margin-bottom: 1.25rem; }
.footer-links { display: flex; flex-direction: column; gap: .65rem; }
.footer-links a { color: #A0AEC0; font-size: .9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--color-white); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.07);
    padding: 1.25rem 0;
    display: flex; align-items: center; justify-content: space-between;
    font-size: .85rem; color: #718096; flex-wrap: wrap; gap: 1rem;
}
.footer-bottom a { color: #A0AEC0; }
.footer-bottom a:hover { color: white; }

/* === ENTRY CONTENT (pages/posts) === */
.entry-content { max-width: 780px; }
.entry-content h2, .entry-content h3 { margin-top: 2rem; margin-bottom: .75rem; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.entry-content li { margin-bottom: .4rem; }
.entry-content blockquote { border-left: 4px solid var(--color-secondary); padding-left: 1.25rem; margin: 1.5rem 0; color: var(--color-muted); font-style: italic; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.entry-content th, .entry-content td { padding: .75rem 1rem; border: 1px solid var(--color-border); }
.entry-content th { background: var(--color-light); font-weight: 600; }

/* === PAGE HEADER === */
.page-hero { background: var(--color-primary); color: white; padding: 3.5rem 0; }
.page-hero h1 { color: white; margin-bottom: .5rem; }
.page-hero .breadcrumb { font-size: .9rem; opacity: .75; }
.page-hero .breadcrumb a { color: rgba(255,255,255,.8); }

/* === ARCHIVE / BLOG === */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.post-card { background: white; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--color-border); transition: all var(--transition); }
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.post-card-image { aspect-ratio: 16/9; background: var(--color-light); overflow: hidden; }
.post-card-body { padding: 1.5rem; }
.post-meta { font-size: .8rem; color: var(--color-muted); margin-bottom: .75rem; }
.post-card h3 { font-size: 1.1rem; margin-bottom: .6rem; }
.post-card h3 a { color: var(--color-primary); }
.post-card h3 a:hover { color: var(--color-secondary); }
.post-card p { font-size: .9rem; color: var(--color-muted); margin-bottom: 1rem; }

/* === 404 === */
.error-404 { text-align: center; padding: 6rem 0; }
.error-404 .error-code { font-size: 8rem; font-weight: 900; color: var(--color-light); line-height: 1; margin-bottom: 1rem; }
.error-404 h2 { margin-bottom: 1rem; }

/* === WIDGETS === */
.widget { margin-bottom: 2rem; }
.widget-title { font-size: 1rem; font-weight: 700; padding-bottom: .6rem; border-bottom: 2px solid var(--color-secondary); margin-bottom: 1rem; color: var(--color-primary); }

/* === BADGES === */
.badge { display: inline-block; padding: .25rem .75rem; border-radius: 100px; font-size: .8rem; font-weight: 600; }
.badge-success { background: #D4EFDF; color: var(--color-success); }
.badge-primary { background: var(--color-light); color: var(--color-primary); }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .why-grid { grid-template-columns: 1fr; }
    .why-image { display: none; }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-card { display: none; }
}

@media (max-width: 768px) {
    .section { padding: 3.5rem 0; }
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: white; border-bottom: 1px solid var(--color-border); padding: 1rem; box-shadow: var(--shadow); }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; }
    .nav-toggle { display: flex; }
    .header-phone { display: none; }
    .contact-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .hero { padding: 3rem 0 4rem; }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ── WordPress editor content (the_content) ── */
.page-content.entry-content { font-size: 1rem; line-height: 1.8; color: var(--color-text); }
.page-content.entry-content h1,.page-content.entry-content h2,.page-content.entry-content h3 { margin-top: 2rem; margin-bottom: .75rem; color: var(--color-primary); }
.page-content.entry-content h2 { font-size: 1.5rem; }
.page-content.entry-content h3 { font-size: 1.2rem; }
.page-content.entry-content p { margin-bottom: 1.25rem; }
.page-content.entry-content ul,.page-content.entry-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.page-content.entry-content li { margin-bottom: .4rem; }
.page-content.entry-content a { color: var(--color-secondary); }
.page-content.entry-content img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 1rem 0; }
.page-content.entry-content blockquote { border-left: 4px solid var(--color-secondary); margin: 1.5rem 0; padding: .75rem 1.5rem; background: var(--color-bg); border-radius: 0 var(--radius) var(--radius) 0; color: var(--color-muted); font-style: italic; }
.page-content.entry-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.page-content.entry-content th,.page-content.entry-content td { padding: .6rem 1rem; border: 1px solid var(--color-border); text-align: left; }
.page-content.entry-content th { background: var(--color-primary); color: white; }
