/*
Theme Name: Broderna Dibb
Theme URI: https://roidnet.com/
Author: RoidNet
Author URI: https://roidnet.com/
Description: Custom WordPress theme for Bröderna Dibb bilverkstad
Version: 2.0.0
Requires at least: 6.3
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: broderna-dibb
Tags: custom-background, custom-logo, translation-ready
*/

:root {
    --color-primary: #0a0a0c; /* Ultra dark grey/black */
    --color-primary-light: #16161a;
    --color-accent: #0066ff; /* Electric blue for premium tech feel */
    --color-accent-hover: #0052cc;
    --color-accent-glow: rgba(0, 102, 255, 0.3);
    --color-text: #2d2d2d;
    --color-text-light: #71717a;
    --color-text-inverse: #ffffff;
    --color-text-inverse-light: #a1a1aa;
    --color-bg: #ffffff;
    --color-bg-light: #f8fafc;
    --color-border: #e4e4e7;
    --color-border-dark: #27272a;

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    
    --container-width: 1300px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, picture { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; border: none; background: none; }

/* Base Styles */
body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

a { color: var(--color-accent); text-decoration: none; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
a:hover { color: var(--color-accent-hover); }

/* Utility Classes */
.container { width: 100%; max-width: var(--container-width); margin-inline: auto; padding-inline: var(--spacing-md); }
.section-padding { padding-block: var(--spacing-xl); }
.text-center { text-align: center; }
.bg-light { background-color: var(--color-bg-light); }
.bg-dark { background-color: var(--color-primary); color: var(--color-text-inverse); }
.bg-dark h2, .bg-dark h3 { color: var(--color-text-inverse); }
.text-inverse { color: var(--color-text-inverse); }
.text-light { color: var(--color-text-inverse-light) !important; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.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; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 1rem 2rem; font-family: var(--font-heading); font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem; letter-spacing: 0.5px;
}

.btn-white {
    background-color: #fff; color: var(--color-primary);
}
.btn-white:hover {
    background-color: #f1f1f1; transform: translateY(-2px);
}
.btn-primary {
    background-color: var(--color-accent); color: #fff;
}
.btn-primary:hover {
    background-color: var(--color-accent-hover); color: #fff; transform: translateY(-2px);
}
.btn-outline-light {
    border: 2px solid rgba(255,255,255,0.2); color: #fff;
    backdrop-filter: blur(10px);
}
.btn-outline-light:hover {
    background-color: #fff; color: var(--color-primary); border-color: #fff;
}

/* Header */
.site-header {
    background-color: #000000;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 0.5rem 0; position: sticky; top: 0; z-index: 1000;
}
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.custom-logo-link img, .site-logo img { height: 50px; width: auto; display: block; max-width: 250px; }

.menu-toggle { display: none; background: transparent; border: none; cursor: pointer; padding: 0.5rem; position: relative; z-index: 1001; }
.hamburger-box { width: 30px; height: 24px; display: inline-block; position: relative; }
.hamburger-inner { display: block; top: 50%; margin-top: -1px; width: 30px; height: 2px; background-color: #fff; position: absolute; transition-property: transform; transition-duration: 0.15s; transition-timing-function: ease; }
.hamburger-inner::before, .hamburger-inner::after { width: 30px; height: 2px; background-color: #fff; position: absolute; display: block; content: ""; transition-property: transform; transition-duration: 0.15s; transition-timing-function: ease; }
.hamburger-inner::before { top: -8px; }
.hamburger-inner::after { bottom: -8px; }
.menu-toggle.is-active .hamburger-inner { transform: rotate(45deg); }
.menu-toggle.is-active .hamburger-inner::before { top: 0; opacity: 0; }
.menu-toggle.is-active .hamburger-inner::after { bottom: 0; transform: rotate(-90deg); }

.primary-nav ul { display: flex; gap: 2.5rem; align-items: center; }
.primary-nav a { 
    color: rgba(255,255,255,0.85); font-size: 1.05rem; font-weight: 600; 
    position: relative; transition: color 0.3s ease; padding-bottom: 4px;
}
.primary-nav a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; 
    background-color: var(--color-accent); transition: width 0.3s ease;
}
.primary-nav a:hover { color: #fff; text-shadow: none; }
.primary-nav a:hover::after { width: 100%; }
.primary-nav li.current-menu-item > a { color: #fff; font-weight: 700; }

/* Page Hero */
.page-hero { position: relative; height: 50vh; min-height: 400px; display: flex; align-items: center; justify-content: center; background-size: cover; background-position: center; overflow: hidden; }
.page-hero .hero-gradient { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10,10,12,0.4) 0%, rgba(10,10,12,0.8) 100%); z-index: 1; }
.page-hero .container { z-index: 2; position: relative; }
.page-title { font-size: clamp(3rem, 6vw, 4.5rem); margin-bottom: 0.5rem; letter-spacing: -0.04em; }
.page-subtitle { font-size: clamp(1.2rem, 2vw, 1.5rem); opacity: 0.9; }

/* Grids & Utilities */
.grid-layout { display: grid; }
.gap-4 { gap: 2rem; }
.gap-3 { gap: 1.5rem; }
.p-4 { padding: 2rem; }
.text-4xl { font-size: 2.5rem; }
.text-xl { font-size: 1.25rem; }
.text-lg { font-size: 1.1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.object-cover { object-fit: cover; }
.rounded { border-radius: 8px; }
.shadow-sm { box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.hover-lift { transition: transform 0.3s ease; }
.hover-lift:hover { transform: translateY(-5px); }
.flex-center { display: flex; justify-content: center; align-items: center; }

/* Hero Section */
.premium-hero {
    position: relative; height: 85vh; min-height: 500px;
    display: flex; align-items: center; color: #fff;
    overflow: hidden;
}
.hero-background {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    transform: scale(1.05); animation: subtleZoom 20s ease-out forwards;
}
@keyframes subtleZoom { to { transform: scale(1); } }
.hero-gradient {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(10,10,12,0.95) 0%, rgba(10,10,12,0.7) 40%, rgba(10,10,12,0.2) 100%);
}
.hero-content-wrapper { position: relative; z-index: 10; }
.hero-content { max-width: 750px; }
.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    color: #fff; margin-bottom: 1.5rem; line-height: 1.05;
    text-wrap: balance;
}
.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: rgba(255,255,255,0.8); margin-bottom: 2.5rem; max-width: 600px;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Section Headers */
.premium-heading { font-size: clamp(2.5rem, 4vw, 3.5rem); margin-bottom: 1rem; }
.premium-sub { font-size: 1.25rem; color: var(--color-text-light); max-width: 600px; margin-inline: auto; margin-bottom: 4rem; }

/* Services Grid */
.premium-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.premium-card {
    background: #fff; border: 1px solid var(--color-border);
    border-radius: var(--radius-md); padding: 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column;
}
.premium-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
    border-color: rgba(0, 102, 255, 0.2);
}
.service-icon-wrapper {
    width: 64px; height: 64px; border-radius: var(--radius-sm);
    background: var(--color-bg-light); color: var(--color-accent);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem; transition: all 0.3s ease;
}
.premium-card:hover .service-icon-wrapper { background: var(--color-accent); color: #fff; }
.service-icon-wrapper svg { width: 32px; height: 32px; }
.service-title { font-size: 1.25rem; margin-bottom: 0.75rem; }
.service-desc { color: var(--color-text-light); line-height: 1.5; font-size: 0.95rem; }

/* Drop-in CTA Card */
.card-highlight {
    background: var(--color-primary); border: none; color: #fff;
    justify-content: center; align-items: flex-start;
}
.card-highlight:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0, 102, 255, 0.2); }
.card-highlight .service-title { color: #fff; font-size: 1.5rem; }

/* Drop-in Split Section */
.drop-in-section { padding-block: 0; overflow: hidden; background: var(--color-primary); }
.split-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: 600px; }
.split-image-container { position: relative; }
.split-image-container img { width: 100%; height: 100%; object-fit: cover; }
.image-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(10,10,12,0), rgba(10,10,12,1)); z-index: 1; }
.split-text-container { display: flex; align-items: center; padding: 4rem 10%; position: relative; z-index: 2; }
.badge { display: inline-flex; align-items: center; gap: 0.75rem; font-family: var(--font-heading); font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; }
.premium-badge { color: var(--color-accent); background: transparent; border: none; padding: 0; }
.premium-badge::before { content: ''; display: block; width: 40px; height: 2px; background-color: var(--color-accent); }
.lead-text { font-size: 1.35rem; font-weight: 500; color: #fff; margin-bottom: 1rem; }
.content-body p { color: rgba(255,255,255,0.7); font-size: 1.1rem; }

/* About Section */
.about-section { background: var(--color-bg); }
.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.section-label { margin-bottom: 1rem; }
.label-text { display: block; color: var(--color-accent); font-weight: 600; font-family: var(--font-heading); font-size: 1.1rem; margin-bottom: 0.25rem; }
.label-line { width: 30px; height: 2px; background-color: var(--color-accent); }
.about-title { font-size: clamp(2rem, 4vw, 3rem); color: var(--color-primary); margin-bottom: 1.5rem; letter-spacing: -0.03em; }
.about-body p { color: var(--color-text); font-size: 1.1rem; line-height: 1.7; margin-bottom: 1.5rem; }
.about-body p:last-child { margin-bottom: 0; }
.about-image-wrapper { position: relative; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.about-img { width: 100%; height: auto; display: block; }
@media (max-width: 992px) { .about-layout { grid-template-columns: 1fr; gap: 2rem; } }

/* Testimonials */
.google-rating { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,0.05); padding: 0.5rem 1rem; border-radius: 100px; border: 1px solid rgba(255,255,255,0.1); }
.rating-number { font-weight: 700; font-family: var(--font-heading); font-size: 1.25rem; color: #fff; }
.stars-svg { display: flex; gap: 2px; }
.testimonials-grid { grid-template-columns: repeat(3, 1fr); }
.testimonial-card {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md); padding: 2.5rem;
}
.testimonial-card:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); transform: translateY(-5px); }
.card-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--color-accent); display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; color: #fff; }
.card-header .meta { flex: 1; }
.testimonial-author { margin: 0; color: #fff; font-size: 1.1rem; }
.google-icon-small { width: 24px; height: 24px; }
.testimonial-text { color: rgba(255,255,255,0.8); font-size: 1.05rem; line-height: 1.6; }

/* Footer */
.site-footer { border-top: 1px solid var(--color-border-dark); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 4rem; }
.footer-logo img { height: 36px; width: auto; opacity: 0.9; }
.footer-title { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1.5rem; color: #fff; }
.footer-nav li { margin-bottom: 0.75rem; }
.footer-nav a { color: rgba(255,255,255,0.6); }
.footer-nav a:hover { color: #fff; }
.contact-list li { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; color: rgba(255,255,255,0.6); }
.contact-list svg { width: 20px; height: 20px; color: var(--color-accent); flex-shrink: 0; margin-top: 2px; }
.contact-list a { color: rgba(255,255,255,0.6); }
.contact-list a:hover { color: #fff; }
.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.05); color: #fff; transition: all 0.3s ease; }
.social-icon:hover { background: var(--color-accent); transform: scale(1.1); }
.map-col { position: relative; border-radius: var(--radius-md); overflow: hidden; height: 100%; min-height: 200px; }
.footer-map-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.footer-map-link:hover .footer-map-img { transform: scale(1.05); }
.footer-map-link .map-overlay { position: absolute; inset: 0; background: rgba(10,10,12,0.6); display: flex; align-items: center; justify-content: center; z-index: 2; opacity: 0; transition: opacity 0.3s ease; }
.footer-map-link:hover .map-overlay { opacity: 1; }
.map-overlay span { color: #fff; font-family: var(--font-heading); font-weight: 600; padding: 0.5rem 1.5rem; border: 2px solid #fff; border-radius: 100px; }
.footer-bottom { border-top: 1px solid var(--color-border-dark); padding-block: 1.5rem; }
.site-credits { text-align: center; color: rgba(255,255,255,0.4); font-size: 0.85rem; }

/* Forms */
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--color-heading); font-size: 0.95rem; }
.form-control { width: 100%; padding: 0.75rem 1rem; border: 1px solid #999; border-radius: 6px; background-color: #fafafa; font-family: inherit; font-size: 1rem; color: var(--color-text); transition: var(--transition-fast); }
.form-control:focus { outline: none; border-color: var(--color-accent); background-color: #fff; box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1); }
textarea.form-control { resize: vertical; min-height: 120px; }
.btn-loader { animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Cookie Banner - Full Width Bar */
.site-notice-bar { position: fixed; bottom: 0; left: 0; right: 0; background-color: #1a1a1a; color: #fff; padding: 0.5rem 0; z-index: 9999; box-shadow: 0 -5px 20px rgba(0,0,0,0.3); transform: translateY(100%); transition: transform 0.4s ease-in-out; border-top: 2px solid var(--color-accent); }
.site-notice-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-notice-bar.show { transform: translateY(0); }
.site-notice-bar .notice-text { font-size: 0.85rem; line-height: 1.4; font-weight: 400; flex: 1; margin: 0; }
.notice-btn { background-color: var(--color-accent); color: #fff; border: none; padding: 0.4rem 1.5rem; border-radius: 4px; font-weight: 600; cursor: pointer; transition: background-color 0.3s; font-family: inherit; font-size: 0.85rem; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.5px; }
.notice-btn:hover { background-color: #004ecc; color: #fff; }


/* Modal Styles */
.modal {
    display: none; position: fixed; z-index: 1001; left: 0; top: 0;
    width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    align-items: center; justify-content: center;
}
.modal.show { display: flex; animation: fadeIn 0.3s ease; }
.modal-content {
    background-color: var(--color-bg); margin: auto; padding: 2.5rem;
    border-radius: var(--radius-md); max-width: 600px; width: 90%;
    position: relative; max-height: 90vh; overflow-y: auto;
    color: var(--color-text);
}
.close-modal {
    color: var(--color-text-light); float: right; font-size: 28px;
    font-weight: bold; cursor: pointer; position: absolute;
    top: 1rem; right: 1.5rem; line-height: 1; transition: color 0.3s;
}
.close-modal:hover, .close-modal:focus {
    color: var(--color-accent); text-decoration: none;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Responsive */
@media (max-width: 1200px) {
    .premium-grid { grid-template-columns: repeat(3, 1fr); }
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 992px) {
    .premium-grid { grid-template-columns: repeat(2, 1fr); }
    .split-layout { grid-template-columns: 1fr; }
    .image-overlay { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .primary-nav { position: static; }
    .primary-nav ul {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        z-index: 1000;
        gap: 2rem;
        text-align: center;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease-in-out;
        margin: 0;
        padding: 0;
    }
    .primary-nav ul.toggled { 
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    .primary-nav ul li a {
        font-size: 1.8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 2px;
        color: #fff;
        transition: color 0.3s;
    }
    .primary-nav ul li a:hover {
        color: var(--primary-color, #f1c40f);
    }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .premium-grid, .testimonials-grid, .footer-grid { grid-template-columns: 1fr; }
    .split-text-container { padding: 3rem 5%; }
    .hero-background { background-position: right center; }
    .split-image-container img { object-position: right center; }
}
