/*
Theme Name: Astra Child
Template: astra
*/

/* ========================================
GLOBAL
======================================== */

body {
    background: #ffffff !important;
}

/* Full width archive page */
.post-type-archive-verkefni .ast-container {
    max-width: 100% !important;
    padding: 0 !important;
    display: block !important;
}

/* ========================================
HEADER
======================================== */

/* Header background image */
.main-header-bar {
    background-image: url('http://smidakennar.is/wp-content/uploads/2026/02/banner-smida2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 180px;
}

/* Menu text */
.main-header-menu a,
.ast-header-navigation a,
.site-header a {
    color: #5e3aff !important;
    font-size: 20px;
    font-weight: 500;
    text-decoration: none !important;
}

/* Hover */
.main-header-menu a:hover,
.ast-header-navigation a:hover {
    color: #1a5fc1 !important;
}

/* Header spacing */
.site-header {
    padding-top: 20px;
    padding-bottom: 20px;
}

.ast-primary-header-bar {
    min-height: 80px;
    display: flex;
    flex-shrink: 0;
    align-items: center;
}

/* Move menu to the right */
.ast-primary-header-bar .ast-container {
    padding-left: 1150px !important;
    padding-right: 40px !important;
}

/* ========================================
SINGLE PROJECT PAGE LAYOUT
======================================== */

.project-layout {
    max-width: 1700px;
    margin: 0 auto;
    padding: 20px;
}

@media (min-width: 992px) {

    .project-layout {
        display: flex;
        align-items: flex-start;
        gap: 40px;
    }

    .project-main {
        flex: 1;
        min-width: 0;
    }

    .project-sidebar {
        width: 260px;
        flex-shrink: 0;

        position: sticky;
        top: 40px;

        background: #f8db83;
        padding: 30px;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.05);

        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
}

/* ========================================
PROJECT HEADER
======================================== */

.project-header {
    margin-bottom: 20px;
}

.project-header h1 {
    font-size: 70px;
    letter-spacing: -4px;
    color: #094696;
    margin-bottom: 10px;
}

/* REMOVE if deleting featured image */
.project-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

@media (min-width: 900px) {

    .project-header {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        align-items: center;
    }

    .project-header h1 {
        grid-column: span 2;
    }
}

/* ========================================
PROJECT CONTENT
======================================== */

.project-content {
    max-width: 800px;
    margin: 0 auto 60px;
    font-size: 18px;
    line-height: 1.7;
}

.project-content h2 {
    margin-top: 50px;
    font-size: 28px;
}

.project-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: none !important;
}

/* ========================================
SIDEBAR CONTENT
======================================== */

.sidebar-box ul,
.tool-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-box li,
.tool-list li {
    padding: 4px 0;
    font-size: 14px;
    color: #ffffff;
}

.project-sidebar a {
    text-decoration: none;
}

/* Fake checkbox (prevents layout jump) */
.fake-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #999;
    border-radius: 4px;
    display: inline-block;
    flex-shrink: 0;
    margin-right: 8px;
}

.custom-check {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ========================================
PDF BUTTON
======================================== */

.download-btn {
    display: inline-block;
    background: #094696;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    text-decoration: none;
    transition: 0.25s;
    margin-bottom: 20px;
}

.download-btn:hover {
    background: #1a5fc1;
    transform: translateY(-2px);
}

/* ========================================
TOOL MODAL
======================================== */
.tool-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.tool-modal-content {
    position: relative;
    background: white;
    padding: 40px;
    border-radius: 24px;
    max-width: 900px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0,0,0,0.18);
}

.tool-modal-content h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #094696;
}

.tool-modal-content img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    margin: 0 auto;
    border-radius: 16px;
    object-fit: contain;
}

.tool-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 32px;
    cursor: pointer;
    font-weight: bold;
}

/* ========================================
ARCHIVE PAGE (/verkefni/)
======================================== */

.project-archive-layout {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

/* Left filter sidebar */

.project-filters {
    width: 240px;
    padding: 30px;
    background: #3e00a5;
    flex-shrink: 0;
}

.project-filters ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-filters li {
    margin-bottom: 4px;
}

.project-filters h3 {
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 18px;
    color: #ffffff;
    font-weight: 700;
}

.project-filters label {
    display: flex;
    gap: 6px;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #ffffff;
}

/* Search */

.filter-search input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* ========================================
PROJECT GRID
======================================== */

.project-grid {
    flex: 1;
    padding: 40px;

    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

@media (max-width: 1200px) {
    .project-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

.project-item {
    background: #ffffff;
    width: 100%;
    transition: 0.25s;
}

.project-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.project-item img {
    width: 100%;
    height: auto;
    display: block;
}

.project-item h4 {
    margin: 0;
    padding: 15px;
    font-size: 18px;
    color: #ffffff;
    font-weight: 600;
    background: #ff3aa0;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* Different colors by stig */

.project-item.yngsta-stig h4 {
    background: #f8db83;
}

.project-item.midstig h4 {
    background: #d9ecff;
}

.project-item.elsta-stig h4 {
    background: #dff5e1;
}

/* ========================================
STEP BOXES
======================================== */

.project-step {
    position: relative;
    border: 2px solid #8e7bb5;
    border-radius: 12px;
    padding: 40px 40px 30px 60px;
    margin: 60px 0;
    background: #ffffff;
}

.step-number {
    position: absolute;
    top: -25px;
    left: -25px;

    width: 70px;
    height: 70px;

    background: linear-gradient(145deg, #6f63a7, #3b2d86);
    color: #ffffff;
    font-size: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
}

.step-content {
    font-size: 18px;
    line-height: 1.6;
}

/* ========================================
STEP IMAGES
======================================== */

.step-image {
    position: absolute;
}

.img-right {
    right: -60px;
}

.img-left {
    left: -60px;
}

.img-top {
    top: 0;
}

.img-center {
    top: 50%;
    transform: translateY(-50%);
}

.img-bottom {
    bottom: 0;
}

.img-small {
    max-width: 180px;
}

.img-medium {
    max-width: 260px;
}

.img-large {
    max-width: 360px;
}
.project-sidebar strong {
    color: #094696;
    font-size: 16px;
}

.project-sidebar p {
    color: #222222;
    font-size: 16px;
    margin-top: 6px;
}
/* ========================================
INTRO IMAGE + VIDEO SPACING
======================================== */

.project-intro-image {
    margin-bottom: 40px;
}

.project-video {
    margin-bottom: 50px;
}
/* ========================================
VIDEO EMBED FIX
======================================== */

.project-video iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 16px;
    display: block;
}
/* HÆFNIVIÐMIÐ GROUPS */

.haefni-group {
    margin-bottom: 20px;
}

.haefni-group h4 {
    font-size: 15px;
    font-weight: 700;
    margin: 15px 0 8px;
    color: white;
}

.haefni-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.haefni-modal-trigger {
    cursor: pointer;
}

.haefni-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.haefni-modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    position: relative;
}

.haefni-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
}