/* ========================================
   Vestbjerg Byg - Custom Styles
   Color Scheme: Black (#000000) & Orange (#fe8618)
   ======================================== */

:root {
    --primary-color: #fe8618;
    --secondary-color: #000000;
    --bg-white: #ffffff;
    --bg-light: #f5f5f5;
    --text-dark: #000000;
    --text-light: #ffffff;
    --border-color: #e0e0e0;
    --header-height: 80px;
    --transition-speed: 0.3s;
}

/* ========== Reset & Base Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-white);
}

/* Remove focus outlines from non-interactive elements */
h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus,
p:focus, div:focus, section:focus {
    outline: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== Header ========== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--secondary-color);
    z-index: 1000;
    transition: all var(--transition-speed);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: opacity var(--transition-speed);
}

.logo a:hover {
    opacity: 0.8;
}

.logo-image {
    height: 50px;
    width: auto;
    max-width: 200px;
}

.logo-text {
    color: var(--primary-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all var(--transition-speed);
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all var(--transition-speed);
    transform: translateX(-50%);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 80%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: all var(--transition-speed);
}

/* ========== Hero Section ========== */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
                url('/images/hero.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    color: var(--text-light);
    margin-top: var(--header-height);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    outline: none;
}

.hero-title:focus {
    outline: none;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s backwards;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: bounce 2s infinite;
    color: var(--text-light);
    z-index: 1;
}

.scroll-arrow {
    font-size: 2rem;
    color: var(--primary-color);
}

/* ========== Buttons ========== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all var(--transition-speed);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background: #e67610;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(254, 134, 24, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-light);
}

.btn-secondary:hover {
    background: #333;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.2rem;
}

/* ========== Section Heading ========== */
.section-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.section-heading h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-heading .subtitle {
    font-size: 1.2rem;
    color: #666;
}

.heading-divider {
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    margin: 1rem auto;
}

/* ========== About Section ========== */
.about-section {
    padding: 6rem 0;
    background: var(--bg-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text h3 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: var(--text-dark);
}

.about-text p {
    margin-bottom: 1rem;
    color: #333;
    line-height: 1.8;
}

.services-list {
    list-style: none;
    margin: 1rem 0;
}

.services-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-icon {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.feature {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 10px;
    transition: all var(--transition-speed);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.about-image {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ========== Portfolio Section ========== */
.portfolio-section {
    padding: 6rem 0;
    background: var(--bg-light);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.portfolio-card {
    background: var(--bg-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all var(--transition-speed);
    cursor: pointer;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image::before {
    content: '???';
    font-size: 4rem;
    opacity: 0.3;
    position: absolute;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.card-image img[src*=".jpg"],
.card-image img[src*=".png"] {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(254, 134, 24, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.portfolio-card:hover .card-overlay {
    opacity: 1;
}

.view-project {
    color: var(--text-light);
    font-weight: bold;
    font-size: 1.2rem;
}

.card-content {
    padding: 1.5rem;
}

.card-category {
    display: inline-block;
    background: var(--primary-color);
    color: var(--text-light);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.5rem;
    margin: 0.5rem 0;
    color: var(--text-dark);
}

.card-description {
    color: #666;
    margin: 0.5rem 0;
}

.card-date {
    color: #999;
    font-size: 0.9rem;
}

/* ========== Contact Section ========== */
.contact-section {
    padding: 6rem 0;
    background: var(--bg-white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-form-wrapper h3,
.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

/* Form Styles */
.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.contact-form .form-control {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

.contact-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form .validation-message {
    color: #d32f2f;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.success-message {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 10px;
}

.success-message h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Contact Info */
.info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 10px;
}

.info-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.info-text h4 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.info-text p {
    color: #666;
    line-height: 1.6;
}

/* ========== Footer ========== */
.site-footer {
    background: var(--secondary-color);
    color: var(--text-light);
    padding: 3rem 0 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-contact,
.footer-links {
    list-style: none;
}

.footer-contact li,
.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #999;
}

/* ========== Image Gallery ========== */
.image-gallery {
    margin: 2rem 0;
}

.gallery-main {
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.gallery-main img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    cursor: pointer;
    transition: transform var(--transition-speed);
    display: block;
    user-select: none;
}

.gallery-main img:hover {
    transform: scale(1.02);
}

.gallery-main img:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.thumbnail {
    border-radius: 5px;
  overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all var(--transition-speed);
 position: relative;
    background: var(--bg-light);
    /* Critical: Ensure thumbnail div receives clicks */
    pointer-events: auto;
    user-select: none;
}

.thumbnail:hover {
transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.thumbnail:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.thumbnail.active {
 border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(254, 134, 24, 0.3);
}

.thumbnail img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    /* Critical: Let clicks pass through to parent div */
    pointer-events: none;
    user-select: none;
}

.gallery-empty {
    text-align: center;
    padding: 3rem;
    background: var(--bg-light);
    border-radius: 10px;
    color: #666;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
  align-items: center;
}

.lightbox-content img {
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 5px;
}

.lightbox-counter {
    margin-top: 1rem;
    color: var(--text-light);
 font-size: 1.2rem;
    font-weight: 500;
  background: rgba(0,0,0,0.7);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    background: rgba(0,0,0,0.7);
    border: none;
    color: var(--text-light);
    font-size: 3rem;
cursor: pointer;
    z-index: 2001;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
  justify-content: center;
    line-height: 1;
    transition: all var(--transition-speed);
}

.lightbox-close:hover {
    background: var(--primary-color);
    transform: rotate(90deg);
}

.lightbox-close:focus {
    outline: 3px solid var(--primary-color);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(254, 134, 24, 0.8);
    color: var(--text-light);
    border: none;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
  transition: all var(--transition-speed);
    border-radius: 5px;
    z-index: 2001;
}

.lightbox-nav:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:focus {
    outline: 3px solid var(--text-light);
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* ========== Project Detail ========== */
.project-detail {
    margin-top: var(--header-height);
}

.project-hero {
    background: var(--bg-light);
    padding: 2rem 0;
}

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    color: #666;
}

.breadcrumb a {
 color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.project-content {
    padding: 3rem 0;
}

.project-header {
    margin-bottom: 2rem;
}

.project-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    scroll-margin-top: calc(var(--header-height) + 2rem);
}

.project-meta {
    display: flex;
    gap: 1rem;
}

.project-category {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 0.3rem 1rem;
    border-radius: 20px;
}

.project-date {
    color: #666;
}

.project-description {
    margin: 3rem 0;
}

.project-description h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.project-description p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.project-gallery {
    margin: 3rem 0;
}

.project-gallery h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.project-actions {
 display: flex;
    gap: 1rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

/* ========== Animations ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

/* ========== Responsive Design ========== */
@media (max-width: 968px) {
    .header-container {
        padding: 0 15px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav ul {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 70%;
        height: calc(100vh - var(--header-height));
        background: var(--secondary-color);
        flex-direction: column;
        padding: 2rem;
        transition: right var(--transition-speed);
    }

    .main-nav ul.active {
        right: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .footer-container {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-heading h2 {
        font-size: 2rem;
    }

    .project-header h1 {
        font-size: 2rem;
    }

    .project-actions {
        flex-direction: column;
    }

    .project-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* ========== Loading State ========== */
.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}
