/*
Theme Name: D&J Solutions
Theme URI: https://djsolutions.se
Description: Custom child theme for D&J Solutions.
Author: D&J Solutions
Author URI: https://djsolutions.se
Template: twentytwentyfour
Version: 1.1.0
Text Domain: dj-solutions
*/


/* ========================================
   COLOR PALETTE
   #841F32 - Dark Red (accent)
   #FFFFFF - White
   #53575C - Cool Gray
   #9D9FA2 - Light Gray
   #8F3445 - Medium Red
   ======================================== */

/* ========================================
   RESET & BASE
   ======================================== */
:root {
    --wp--preset--font-size--small:     0.875rem;
    --wp--preset--font-size--medium:    1rem;
    --wp--preset--font-size--large:     1.25rem;
    --wp--preset--font-size--x-large:   1.75rem;
    --wp--preset--font-size--xx-large:  2.5rem;
}

body {
    font-size: 1rem !important;
    line-height: 1.6 !important;
}

h1 { font-size: clamp(2.8rem, 6vw, 4.2rem) !important; line-height: 1.05 !important; }
h2 { font-size: 2rem !important; line-height: 1.2 !important; }
h3 { font-size: 1.25rem !important; line-height: 1.3 !important; }
h4 { font-size: 1.1rem !important; }
h5 { font-size: 1rem !important; }
h6 { font-size: 0.9rem !important; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    color: #53575C;
}

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
    width: 100%;
    background: #FFFFFF;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    border-bottom: 3px solid #841F32;
    box-shadow: 0 4px 20px -8px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.3rem;
    color: #53575C;
    letter-spacing: -0.02em;
    text-decoration: none;
    z-index: 10;
}

.navbar-brand i {
    color: #841F32;
    font-size: 1.4rem;
}

.navbar-brand span {
    color: #841F32;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}

/* ========================================
   NAVIGATION BRAND (logo)
   ======================================== */
.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 10;
    transition: opacity 0.2s ease;
}

.navbar-brand:hover {
    opacity: 0.8;
}

.navbar-brand img {
    height: 42px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-btn {
    background: transparent;
    border: 2px solid #53575C;
    color: #53575C;
    padding: 0.4rem 1rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-btn:hover {
    border-color: #841F32;
    color: #841F32;
    background: rgba(132, 31, 50, 0.05);
}

.lang-btn i {
    font-size: 0.9rem;
}

.lang-btn .fa-chevron-down {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.lang-btn.active .fa-chevron-down {
    transform: rotate(180deg);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #FFFFFF;
    border: 1px solid #9D9FA2;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 0.5rem 0;
    min-width: 140px;
    list-style: none;
    z-index: 200;
    overflow: hidden;
}

.lang-dropdown.open {
    display: block;
}

.lang-dropdown li {
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: #53575C;
}

.lang-dropdown li:hover {
    background: #f5f5f5;
}

.lang-dropdown li .fa-check {
    opacity: 0;
    color: #841F32;
    transition: opacity 0.2s ease;
}

.lang-dropdown li .fa-check.visible {
    opacity: 1;
}

.lang-dropdown li.active-lang {
    background: #f5f5f5;
    font-weight: 600;
}

.hamburger {
    display: none;
    background: transparent;
    border: none;
    color: #53575C;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 10;
    padding: 0.2rem 0.4rem;
    transition: color 0.2s;
}

.hamburger:hover {
    color: #841F32;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    flex-wrap: wrap;
    transition: all 0.3s ease;
}

.nav-links a {
    color: #53575C;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease, border-bottom 0.2s ease;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover {
    color: #841F32;
    border-bottom-color: #841F32;
}

/* ========================================
   HERO
   ======================================== */
.hero {
    width: 100%;
    background: linear-gradient(145deg, #53575C 0%, #9D9FA2 100%);
    padding: 4rem 3.5rem 3.5rem 3.5rem;
    color: white;
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 10%, rgba(132, 31, 50, 0.15), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(132, 31, 50, 0.08), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
    max-width: 1280px;
    margin: 0 auto;
}

.hero-text { flex: 1 1 320px; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(132, 31, 50, 0.2);
    backdrop-filter: blur(4px);
    padding: 0.45rem 1.4rem 0.45rem 1.2rem;
    border-radius: 60px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #FFFFFF;
    margin-bottom: 1.6rem;
}

.hero-badge i { color: #841F32; font-size: 0.85rem; }

.hero h1 {
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
    color: #FFFFFF;
}

.hero h1 .highlight {
    color: #841F32;
    border-bottom: 4px solid #841F32;
    padding-bottom: 4px;
    display: inline-block;
}

.hero-sub {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.85;
    max-width: 480px;
    margin-bottom: 2.2rem;
    line-height: 1.6;
    color: #FFFFFF;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.btn-primary {
    background: #841F32;
    border: none;
    padding: 0.9rem 2.4rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1rem;
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    transition: all 0.2s ease;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    font-family: inherit;
}

.btn-primary i { transition: transform 0.2s; }
.btn-primary:hover i { transform: translateX(4px); }

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0.9rem 2rem;
    border-radius: 60px;
    font-weight: 500;
    font-size: 1rem;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s;
    cursor: default;
}

.btn-outline i { opacity: 0.7; }
.btn-outline:hover { border-color: #841F32; background: rgba(132, 31, 50, 0.1); }

.hero-stats {
    display: flex;
    gap: 2.8rem;
    margin-top: 2.6rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    flex-wrap: wrap;
}

.hero-stats .stat-item { display: flex; flex-direction: column; }

.hero-stats .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #841F32;
    letter-spacing: -0.02em;
}

.hero-stats .stat-label {
    font-size: 0.8rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 2px;
    color: #FFFFFF;
}

.hero-visual {
    flex: 0 0 240px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 1rem;
    border-radius: 2rem;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.icon-tile {
    background: rgba(255, 255, 255, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #841F32;
    transition: 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(2px);
}

.icon-tile i { filter: drop-shadow(0 0 8px rgba(132, 31, 50, 0.2)); }

.icon-tile:hover {
    background: rgba(132, 31, 50, 0.3);
    transform: scale(1.05);
    color: #FFFFFF;
}

/* ========================================
   ABOUT
   ======================================== */
.about-section {
    width: 100%;
    padding: 80px 20px;
    background: #f5f5f5;
    box-sizing: border-box;
}

.about-section * { box-sizing: border-box; }

.about-header {
    max-width: 850px;
    margin: 0 auto 45px;
    text-align: center;
}

.about-header h2 {
    margin: 0;
    color: #53575C;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
}

.about-line {
    width: 65px;
    height: 4px;
    margin: 16px auto 18px;
    background: #841F32;
}

.about-header p {
    max-width: 650px;
    margin: 0 auto;
    color: #9D9FA2;
    font-size: 15px;
    line-height: 1.7;
}

.about-grid {
    max-width: 1110px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.about-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 40px 30px 35px;
    background: #53575C;
    border: 1px solid #9D9FA2;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    color: #FFFFFF;
}

.about-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #841F32;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.about-card:hover {
    transform: translateY(-6px);
    border-color: #841F32;
    box-shadow: 0 12px 30px rgba(132, 31, 50, 0.15);
    background: #FFFFFF;
    color: #53575C;
}

.about-card:hover::before { transform: scaleX(1); }

.about-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.about-card:hover .about-icon {
    background: transparent;
    border-color: #841F32;
    transform: translateY(-3px);
}

.about-icon svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.25s ease;
}

.about-card:hover .about-icon svg { stroke: #841F32; }

.about-card-content { flex: 1; }

.about-card h3 {
    margin: 0 0 18px;
    color: #FFFFFF;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.8px;
    transition: color 0.25s ease;
}

.about-card:hover h3 { color: #53575C; }

.about-card p {
    margin: 0 0 14px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.7;
    transition: color 0.25s ease;
}

.about-card:hover p { color: #9D9FA2; }
.about-card p:last-child { margin-bottom: 0; }

/* ========================================
   PROJECTS
   ======================================== */
.projects-section {
    padding: 80px 20px;
    max-width: 1280px;
    width: 100%;
    background: #f8f8f8;
    scroll-margin-top: 80px;
}

.projects-section .about-header { margin-bottom: 0; }

.projects-section .section-sub {
    color: #9D9FA2;
    font-size: 1rem;
    margin-bottom: 2.5rem;
    font-weight: 400;
    border-bottom: 2px solid #9D9FA2;
    padding-bottom: 1.2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.project-card {
    background: #FFFFFF;
    border-radius: 2rem;
    padding: 2rem 1.8rem 1.8rem 1.8rem;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.05);
    border: 1px solid #9D9FA2;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 380px;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 32px -12px rgba(0, 0, 0, 0.08);
    border-color: #841F32;
}

.project-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #53575C;
    margin-bottom: 0.3rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
    min-height: 3.2rem;
}

.project-card .project-subtitle {
    font-size: 0.85rem;
    font-weight: 500;
    color: #841F32;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-height: 1.4rem;
}

.project-card .project-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #9D9FA2;
    margin-bottom: 1.5rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 12.8rem;
}

.project-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #53575C;
    text-decoration: none;
    padding-top: 0.8rem;
    border-top: 1px solid #9D9FA2;
    margin-top: auto;
    transition: gap 0.2s, color 0.2s;
}

.project-card .read-more i {
    color: #841F32;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.project-card .read-more:hover { color: #841F32; }
.project-card .read-more:hover i { transform: translateX(5px); }

/* SEE OTHER PROJECTS */
.projects-footer {
    display: flex;
    justify-content: center;
    margin-top: 3.5rem;
}

.btn-see-more {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: transparent;
    border: 2px solid #841F32;
    color: #841F32;
    padding: 1rem 2.8rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
}

.btn-see-more i {
    font-size: 0.85rem;
    transition: transform 0.25s ease;
}

.btn-see-more:hover {
    background: #841F32;
    color: #FFFFFF;
    box-shadow: 0 12px 28px -10px rgba(132, 31, 50, 0.4);
}

.btn-see-more:hover i { transform: translateX(6px); }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
    .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .about-card:last-child {
        grid-column: 1 / -1;
        max-width: 50%;
        width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 800px) {
    .hero { padding: 2.8rem 1.8rem 2.8rem 1.8rem; }
    .hero-visual { flex: 1 1 100%; justify-content: flex-start; }
    .icon-grid { grid-template-columns: repeat(4, 1fr); width: 100%; gap: 0.8rem; padding: 0.8rem; }
    .icon-tile { width: 100%; height: 72px; font-size: 1.8rem; }
    .hero-stats { gap: 1.8rem; }
}

@media (max-width: 700px) {
    .hamburger { display: block; }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #FFFFFF;
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
        padding: 1.8rem 1.5rem 2rem 1.5rem;
        border-bottom: 3px solid #841F32;
        box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.15);
        transform: scaleY(0);
        transform-origin: top center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease, transform 0.3s ease;
        z-index: 5;
    }

    .nav-links.open {
        transform: scaleY(1);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        font-size: 1.05rem;
        padding: 0.3rem 0;
        width: 100%;
        text-align: center;
        border-bottom: 2px solid transparent;
        color: #53575C;
    }

    .nav-links a:hover {
        color: #841F32;
        border-bottom-color: #841F32;
    }

    .navbar { padding: 0.9rem 1.5rem; }

    .projects-section { padding: 60px 16px; }
    .project-card { padding: 1.5rem; min-height: 340px; }
    .project-card .project-description { -webkit-line-clamp: 6; max-height: 9.6rem; }
    .projects-section .about-header h2 { font-size: 1.8rem; }
    .projects-grid { gap: 1.5rem; }
    .projects-footer { margin-top: 2.5rem; }
    .btn-see-more { padding: 0.9rem 2.2rem; font-size: 0.95rem; }
}

@media (max-width: 600px) {
    .about-section { padding: 50px 16px; }
    .about-header { margin-bottom: 35px; }
    .about-header h2 { font-size: 30px; }
    .about-grid { grid-template-columns: 1fr; gap: 20px; }
    .about-card:last-child { grid-column: auto; max-width: none; }
    .about-card { padding: 35px 24px 30px; }
    .about-icon { width: 68px; height: 68px; }
}

@media (max-width: 500px) {
    .hero h1 { font-size: 2.4rem; }
    .hero-sub { font-size: 1rem; }
    .btn-primary, .btn-outline { width: 100%; justify-content: center; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-stats { flex-direction: column; gap: 0.6rem; }
    .icon-tile { height: 64px; }
    .project-card h3 { font-size: 1.1rem; min-height: 2.8rem; }
    .project-card .project-description { -webkit-line-clamp: 5; max-height: 8rem; font-size: 0.9rem; }
    .btn-see-more { width: 100%; justify-content: center; padding: 1rem 1.5rem; }
}

@media (max-width: 480px) {
    .navbar-brand { font-size: 1.1rem; }
    .hamburger { font-size: 1.4rem; }
    .projects-section .about-header h2 { font-size: 1.5rem; }
    .lang-btn { font-size: 0.75rem; padding: 0.3rem 0.7rem; }
    .lang-dropdown { min-width: 120px; right: -10px; }
    .lang-dropdown li { font-size: 0.8rem; padding: 0.5rem 1rem; }
}
/* Mobile: slightly smaller logo */
@media (max-width: 700px) {
    .navbar-brand img {
        height: 36px;
    }
}

@media (max-width: 480px) {
    .navbar-brand img {
        height: 32px;
    }
}
/* ============================================================
   FORCE DJ SOLUTIONS TYPOGRAPHY
   Overrides twentytwentyfour global-styles-inline-css
   ============================================================ */

:root,
body,
body.wp-theme-twentytwentyfour,
.wp-site-blocks,
.wp-block-group,
.wp-block-cover,
.wp-block-post-content {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

h1, h2, h3, h4, h5, h6,
.wp-block-heading,
.wp-block-post-title,
h1.wp-block-post-title,
h2.wp-block-post-title {
    font-family: 'Montserrat', 'Inter', system-ui, sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
}

/* Specific hero override */
.hero h1,
.hero h1 .highlight,
.hero-sub,
.hero-badge,
.hero-stats .stat-number,
.hero-stats .stat-label {
    font-family: 'Montserrat', 'Inter', system-ui, sans-serif !important;
}

.hero-sub,
.hero-stats .stat-label {
    font-family: 'Inter', system-ui, sans-serif !important;
}
