/* --------------------
    GLOBAL STYLES
    --------------------
*/

/* Basic body and background styles */
body {
    margin: 0;
    font-family: 'Courier New', monospace;
    background-color: #111;
    color: #eee;
    background-image: linear-gradient(#222 1px, transparent 1px), linear-gradient(90deg, #222 1px, transparent 1px);
    background-size: 40px 40px;
    scroll-behavior: smooth;
}

html {
    scroll-padding-top: 120px;
}

.main-content {
    padding-top: 150px;
}

/* Section styling for all pages */
.section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 40px 60px 40px;
    border: 2px dashed #666;
}

.section h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
}

.section h2 {
    font-size: 2rem;
    margin-top: 0;
}

.section h3 {
    font-size: 1.8rem;
    margin-top: 0;
}

.text-center {
    text-align: center;
}

.mt-30 {
    margin-top: 30px;
}

/* Button styling for a consistent look across the site */
.dashed-button {
    display: inline-block;
    border: 2px dashed #666;
    background: transparent;
    color: #eee;
    text-decoration: none;
    padding: 10px 20px;
    margin-top: 10px;
    transition: all 0.2s;
    cursor: pointer;
}

.dashed-button:hover {
    background: #eee;
    color: #111;
}

/*
    --------------------
    HEADER & NAVIGATION STYLES
    --------------------
*/

header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-image: linear-gradient(#222 1px, transparent 1px), linear-gradient(90deg, #222 1px, transparent 1px);
    background-color: #111;
    background-size: 40px 40px;
    border-bottom: 2px dashed #666;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

header img {
    height: 60px;
}

nav a {
    margin-left: 20px;
    text-decoration: none;
    color: #eee;
    border: 1px dashed #eee;
    padding: 5px 10px;
    transition: all 0.2s;
}

nav a:hover,
.nav-active {
    background: #eee;
    color: #111;
}

/*
    --------------------
    HERO SECTION STYLING (Scoped to the index.html page only)
    --------------------
*/

.body-home .hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80vh;
    text-align: center;
    border: 2px dashed #666;
    margin: 40px 60px;
    padding: 40px;
}

.body-home .hero h1, .body-home .hero p {
    position: relative;
    z-index: 1;
}

.body-home .hero h1 {
    font-size: 4rem;
    margin: 0;
}

.body-home .hero p {
    font-size: 1.5rem;
    max-width: 600px;
    margin: 20px auto;
}

/*
    --------------------
    SERVICES & WORK STYLING
    --------------------
*/

.service-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
}

.service-image {
    flex: 1 1 300px;
    display: flex;
    justify-content: center;
}

.service-image img {
    max-height: 300px;
    max-width: 100%;
    object-fit: contain;
}

.service-text {
    flex: 2 1 400px;
}

/*
    --------------------
    PORTFOLIO STYLING
    --------------------
*/

.portfolio-item {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 40px;
    align-items: center;
}

.portfolio-visual {
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.portfolio-visual img {
    max-height: 300px;
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 20px;
}

.portfolio-text {
    flex: 2 1 400px;
}

/*
    --------------------
    PHOTO CAROUSEL STYLES
    --------------------
*/

/* FIX: Removed justify-content and display:flex from the container */
.photo-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: 20px;
}

.carousel-track {
    display: flex;
    gap: 15px;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    flex-shrink: 0;
    width: 450px;
    height: 300px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s;
}

.carousel-slide:hover {
    opacity: 0.8;
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(17, 17, 17, 0.7);
    color: #eee;
    border: 2px dashed #666;
    cursor: pointer;
    padding: 10px;
    z-index: 10;
    font-size: 1.5rem;
    line-height: 1;
}

.carousel-nav-btn.prev {
    left: 10px;
}

.carousel-nav-btn.next {
    right: 10px;
}

.pagination-dots {
    text-align: center;
    margin-top: 15px;
}

.pagination-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 5px;
    background-color: #666;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pagination-dot.active {
    background-color: #eee;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

#lightbox-image {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #eee;
    font-size: 40px;
    cursor: pointer;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #eee;
    font-size: 4rem;
    cursor: pointer;
    padding: 0 20px;
}

.lightbox-nav-btn.prev {
    left: 10px;
}

.lightbox-nav-btn.next {
    right: 10px;
}

/*
    --------------------
    CONTACT & FOOTER STYLING
    --------------------
*/

.contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    margin-top: 40px;
}

.contact-info, .contact-form {
    flex: 1 1 400px;
}

.contact-info h3 {
    margin-top: 0;
    font-size: 1.8rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.dashed-icon-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px dashed #666;
    background: transparent;
    color: #eee;
    text-decoration: none;
    padding: 10px 20px;
    transition: all 0.2s;
}

.dashed-icon-button:hover {
    background: #eee;
    color: #111;
}

.social-links {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-top: 30px;
}

.dashed-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px dashed #666;
    background: transparent;
    color: #eee;
    transition: all 0.2s;
}

.dashed-social-icon:hover {
    background: #eee;
    color: #111;
}


form input, form textarea, form button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    border: 2px dashed #666;
    background: transparent;
    color: #eee;
    font-family: 'Courier New', monospace;
    box-sizing: border-box;
}

form button {
    cursor: pointer;
}

.three-column-footer {
    max-width: 1200px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 40px 60px;
    border: 2px dashed #666;
    box-sizing: border-box;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    margin: 10px 0;
    text-align: left;
}

.footer-column h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column li {
    margin-bottom: 5px;
}

.footer-link {
    text-decoration: none;
    color: #ccc;
    transition: all 0.2s;
}

.footer-link:hover {
    color: #eee;
    text-decoration: underline;
}

.single-column-footer {
    
    text-align: center;
    padding: 20px 40px;
    border-top: 2px dashed #666;
    font-size: 0.9rem;
    background-image: linear-gradient(#222 1px, transparent 1px), linear-gradient(90deg, #222 1px, transparent 1px);
    background-color: #111;
    background-size: 40px 40px;
}

/*
    --------------------
    HAMBURGER MENU STYLES
    --------------------
*/

.hamburger-menu {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #eee;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/*
    --------------------
    COOKIE BANNER STYLES
    --------------------
*/

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-image: linear-gradient(#222 1px, transparent 1px), linear-gradient(90deg, #222 1px, transparent 1px);
    background-color: #111;
    background-size: 40px 40px;
    border-top: 2px dashed #666;
    color: #eee;
    padding: 20px;
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    text-align: center;
    gap: 20px;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 800px;
}

.cookie-content p {
    margin: 0;
}

.cookie-content p a {
    color: #eee;
}

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.cookie-buttons .dashed-button {
    margin: 0;
}

/* Styles for the new Cookie Policy page toggles */
.cookie-preferences {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.preference-item {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: 2px dashed #666;
    gap: 10px;
}

.preference-item h3 {
    margin: 0;
    font-size: 1.2rem;
}

.preference-item p {
    margin: 0;
    font-size: 0.9rem;
}

/* The switch - the box around the slider */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

/* Hide default HTML checkbox */
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: #eee;
}

input:focus + .slider {
    box-shadow: 0 0 1px #eee;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.preference-item input:disabled + .slider {
    background-color: #555;
    cursor: not-allowed;
}

.preference-item input:disabled + .slider:before {
    background-color: #999;
}

.button-container {
    margin-top: 20px;
}


/*
    --------------------
    RESPONSIVE DESIGN
    --------------------
*/

@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
    }

    header img {
        height: 40px;
        margin-bottom: 0;
    }

    .hamburger-menu {
        display: block;
    }

    nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: #1a1a1a;
        border-top: 2px dashed #666;
        padding: 20px 0;
        z-index: 999;
    }

    nav.active {
        display: flex;
    }

    nav a {
        margin: 10px 20px;
        font-size: 1rem;
        white-space: nowrap;
    }

    .body-home .hero {
        margin: 20px;
        padding: 20px;
        height: auto;
        min-height: 80vh;
    }

    .body-home .hero h1 {
        font-size: 2.5rem;
    }

    .body-home .hero p {
        font-size: 1.2rem;
    }

    .section {
        margin: 20px auto;
        padding: 40px 20px 20px;
    }

    .section h2 {
        font-size: 1.5rem;
    }
    
    .service-container, .service-item-container, .portfolio-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .service-image img {
        max-height: 250px;
    }

    .contact-grid {
        flex-direction: column;
        gap: 20px;
    }

    .three-column-footer {
        flex-direction: column;
        gap: 20px;
    }

    .cookie-content {
        gap: 10px;
    }

    .cookie-buttons {
        flex-direction: column;
    }

    .cookie-buttons .dashed-button {
        width: 100%;
        text-align: center;
    }

    /* Make carousel responsive on mobile */
    .carousel-slide {
        width: 100%;
        height: 250px;
    }

    /*
    --------------------
    BLOG TEMPLATE STYLES
    --------------------
    */

    /* Styles for the blog post hero header */
    .blog-hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        max-height: 400px;
        min-height: 300px;
        padding: 40px;
        margin: 40px 60px;
        border: 2px dashed #666;
        box-sizing: border-box;
    }

    .blog-hero h1 {
        font-size: 3rem;
        margin: 10px 0;
    }   

    .blog-hero p {
        font-size: 1.3rem;
        max-width: 600px;
        margin: 0 auto;
    }

    /* Styles for the breadcrumbs navigation */
    .breadcrumbs {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .breadcrumbs a {
        color: #ccc;
        text-decoration: none;
        transition: color 0.2s;
    }

    .breadcrumbs a:hover {
        color: #fff;
    }

    .breadcrumbs .separator {
        margin: 0 10px;
        color: #666;
    }

    .breadcrumbs .current {
        color: #fff;
        font-weight: bold;
    }

    /* Styles for the two-column blog layout */
    .blog-two-column {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 40px;
    }

    .blog-column-image {
        flex: 1 1 400px; /* Adjust basis as needed */
    }

    .blog-column-image img {
        width: 100%;
        height: auto;
        display: block;
    }

    .blog-column-text {
        flex: 1 1 400px; /* Adjust basis as needed */
    }

    /* Responsive adjustments for blog elements */
    @media (max-width: 768px) {
        .blog-hero {
            margin: 20px;
        }

        .blog-hero h1 {
            font-size: 2rem;
        }

        .blog-hero p {
            font-size: 1.1rem;
        }
    }
}