:root {
        --color-red: #E74C3C;
        --color-teal: #1ABC9C;
        --color-black: #2C3E50;
        --color-yellow: #F1C40F;
        --color-white: #ECF0F1; /* Light grey for text contrast */
        --color-dark-grey: #34495E; /* Slightly lighter black */

        --font-sans: 'Roboto', sans-serif;
        --font-serif: 'Playfair Display', serif;
        --font-display: 'Bebas Neue', display;

        --max-width: 1200px;
        --padding-section: 80px;
    }

    /* Base Styles & Chaotic Reset */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        line-height: 1.4; /* Slightly less than normal for chaotic overlap */
        scroll-behavior: smooth;
    }

    body {
        font-family: var(--font-sans);
        color: var(--color-white);
        background-color: var(--color-black);
        overflow-x: hidden; /* Prevent horizontal scroll from chaotic elements */
        position: relative; /* For animations or floating elements */
    }

    .container {
        max-width: var(--max-width);
        margin: 0 auto;
        padding: 0 20px;
        position: relative; /* For overlapping content within sections */
    }

    a {
        color: var(--color-teal);
        text-decoration: none;
        transition: color 0.3s ease, transform 0.2s ease;
        position: relative;
        z-index: 10;
    }

    a:hover {
        color: var(--color-yellow);
        transform: translateY(-2px);
    }

    h1, h2, h3, h4, h5, h6 {
        font-family: var(--font-display);
        color: var(--color-red);
        text-transform: uppercase;
        margin-bottom: 0.5em; /* Reduced margin */
        position: relative;
        z-index: 2;
        text-shadow: 2px 2px 0 var(--color-teal), 4px 4px 0 var(--color-black);
    }
    
    h1 { font-size: 4.5em; font-family: var(--font-display); line-height: 0.9; }
    h2 { font-size: 3.5em; font-family: var(--font-serif); font-weight: 900; line-height: 1; text-shadow: 3px 3px 0 var(--color-yellow); }
    h3 { font-size: 2.2em; font-family: var(--font-sans); font-weight: 700; color: var(--color-yellow); text-shadow: 2px 2px 0 var(--color-red); }
    p {
        font-family: var(--font-sans);
        font-size: 1.1em;
        margin-bottom: 1em; /* Reduced margin */
        color: var(--color-white);
        position: relative;
        z-index: 1;
    }

    img {
        max-width: 100%;
        height: auto;
        display: block;
        object-fit: cover; /* Important for grids/cards */
        filter: grayscale(20%) contrast(110%); /* Artistic touch */
        transition: filter 0.3s ease, transform 0.3s ease;
    }
    img:hover {
        filter: grayscale(0%) contrast(100%);
        transform: scale(1.02) rotate(-1deg);
    }

    .section-title {
        text-align: center;
        margin-bottom: 0.5em;
        font-size: 3.8em;
        line-height: 1;
        letter-spacing: -2px;
        transform: translateX(-5%); /* Chaotic offset */
        z-index: 5;
        position: relative;
    }

    .section-description {
        text-align: center;
        max-width: 800px;
        margin: -20px auto 40px auto; /* Negative margin to create overlap */
        font-size: 1.2em;
        font-family: var(--font-serif);
        font-style: italic;
        color: var(--color-teal);
        position: relative;
        z-index: 1;
        opacity: 1;.9;
        transform: rotate(2deg) translateX(2%);
    }

     .section-description-bottom {
        text-align: center;
        max-width: 800px;
        margin: 40px auto 0 auto;
        font-size: 1.1em;
        font-family: var(--font-sans);
        color: var(--color-white);
        position: relative;
        z-index: 1;
        opacity: 1;.8;
        transform: rotate(-1deg) translateX(-1%);
    }

    /* Header & Navigation */
    .header {
        background-color: rgba(44, 62, 80, 0.9); /* Semi-transparent black */
        position: sticky;
        top: 0;
        z-index: 1000;
        padding: 15px 0;
        border-bottom: 3px dashed var(--color-red);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }

    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
        padding-top: 5px; /* Adjust for overlap */
    }

    .site-logo {
        font-family: var(--font-display);
        font-size: 2.8em;
        line-height: 1;
        letter-spacing: -1px;
        color: var(--color-yellow);
        text-shadow: 2px 2px 0 var(--color-teal);
        transform: rotate(-3deg) translateX(-5px);
        margin: 0;
        z-index: 10;
    }
    .site-logo a {
        color: inherit;
        text-decoration: none;
    }
    .site-logo a:hover {
        transform: scale(1.05) rotate(3deg);
        color: var(--color-red);
    }

    .nav-list {
        display: flex;
        list-style: none;
        gap: 25px;
        position: relative;
        transform: translateY(0); /* Default position */
        transition: transform 0.5s ease-out;
        z-index: 5;
    }

    .nav-list a {
        font-family: var(--font-display);
        font-size: 1.3em;
        color: var(--color-white);
        padding: 5px 10px;
        text-transform: uppercase;
        position: relative;
        overflow: hidden;
        border: 1px solid transparent;
        transition: color 0.3s, transform 0.3s, background-color 0.3s;
        text-shadow: 1px 1px 0 var(--color-black);
    }

    .nav-list a::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--color-red);
        transform: translateX(-100%);
        transition: transform 0.3s ease-out;
    }

    .nav-list a:hover::before {
        transform: translateX(0);
    }
    .nav-list a:hover {
        color: var(--color-yellow);
        transform: translateY(-3px) scale(1.05);
        background-color: rgba(var(--color-teal), 0.1);
        border-color: var(--color-teal);
    }

    .nav-toggle {
        display: none; /* Hidden on desktop */
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        position: relative;
        z-index: 1001; /* Above nav list */
    }

    .nav-toggle .bar {
        display: block;
        width: 30px;
        height: 3px;
        background-color: var(--color-yellow);
        margin: 6px 0;
        transition: all 0.3s ease-in-out;
    }
    
    /* Hero Section */
    .hero-section {
        position: relative;
        height: 100vh;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-bg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 120%; /* Larger for parallax */
        background-size: cover;
        background-position: center bottom;
        background-attachment: fixed; /* Parallax effect */
        filter: brightness(0.6) saturate(1.2);
        z-index: 0;
        transform: translateY(0); /* Initial position for JS parallax, or if only CSS fixed */
    }
    /* Simple JS for parallax, or can be managed with CSS `transform` on scroll */

    .hero-content {
        position: relative;
        text-align: center;
        z-index: 10;
        padding-top: 50px; /* Offset for floating cards */
    }

    .hero-title {
        font-size: 5.5em; /* Larger for impact */
        margin-bottom: 0.1em;
        text-transform: uppercase;
        color: var(--color-yellow);
        text-shadow: 5px 5px 0 var(--color-red), 10px 10px 0 var(--color-black);
        letter-spacing: -3px;
        line-height: 0.9;
        transform: rotate(-5deg) translateX(-10px);
        animation: flicker 1.5s infinite alternate;
    }

    @keyframes flicker {
        0%, 100% { opacity: 1; text-shadow: 5px 5px 0 var(--color-red), 10px 10px 0 var(--color-black); }
        50% { opacity: 1;.8; text-shadow: 3px 3px 0 var(--color-teal), 8px 8px 0 var(--color-red); }
        70% { opacity: 1; text-shadow: 5px 5px 0 var(--color-red), 10px 10px 0 var(--color-black); }
        90% { opacity: 1;.9; text-shadow: 4px 4px 0 var(--color-yellow), 9px 9px 0 var(--color-black); }
    }

    .floating-card {
        background-color: rgba(var(--color-dark-grey), 0.85); /* Dark grey, semi-transparent */
        border: 2px solid var(--color-teal);
        padding: 30px;
        position: absolute;
        border-radius: 8px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        max-width: 400px;
        text-align: left;
        opacity: 1;
        animation: floatIn 2s forwards ease-out;
    }

    .floating-card h3 {
        font-family: var(--font-serif);
        font-size: 1.8em;
        color: var(--color-yellow);
        margin-bottom: 10px;
        text-shadow: 1px 1px 0 var(--color-black);
    }
    .floating-card p {
        font-size: 1em;
        color: var(--color-white);
        margin-bottom: 0;
    }

    .floating-card.card-1 {
        top: 25%;
        left: 5%;
        transform: rotate(-8deg) scale(0.9);
        animation-delay: 0.5s;
        z-index: 15;
    }

    .floating-card.card-2 {
        bottom: 20%;
        right: 8%;
        transform: rotate(5deg) scale(0.95);
        animation-delay: 1.2s;
        z-index: 12;
    }

    @keyframes floatIn {
        0% { transform: translateY(50px) rotate(0deg) scale(0.8); opacity: 1; }
        100% { transform: translateY(0) rotate(var(--initial-rotation, 0deg)) scale(1); opacity: 1; }
    }
    .floating-card.card-1 { --initial-rotation: -8deg; }
    .floating-card.card-2 { --initial-rotation: 5deg; }

    /* About Section */
    .about-section {
        padding: var(--padding-section) 0;
        background-color: var(--color-dark-grey);
        position: relative;
        overflow: hidden; /* For containing overlaps */
    }

    .about-story {
        display: flex;
        flex-direction: column;
        gap: 60px;
        position: relative;
    }

    .story-image-left,
    .story-image-right {
        display: flex;
        position: relative;
        min-height: 400px;
    }

    .story-image-left img,
    .story-image-right img {
        width: 60%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        filter: grayscale(40%) saturate(1.3);
        box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.5);
    }

    .story-image-left img {
        left: 0;
        top: 0;
        transform: rotate(-3deg) scale(1.05);
        z-index: 1;
        border: 4px solid var(--color-teal);
    }

    .story-image-right img {
        right: 0;
        top: 0;
        transform: rotate(2deg) scale(1.05);
        z-index: 1;
        border: 4px solid var(--color-red);
    }

    .text-overlay {
        position: relative;
        background-color: rgba(var(--color-black), 0.9);
        padding: 40px;
        max-width: 60%;
        box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.7);
        z-index: 5;
        border: 2px solid var(--color-yellow);
    }

    .overlay-1 {
        left: 45%;
        top: 20%;
        transform: rotate(4deg);
        border-color: var(--color-yellow);
    }
    .overlay-2 {
        left: -5%;
        top: 30%;
        transform: rotate(-3deg);
        border-color: var(--color-teal);
    }

    .text-overlay h2, .text-overlay h3 {
        margin-top: 0;
        font-family: var(--font-display);
        line-height: 1;
        letter-spacing: -1px;
        font-size: 2.8em;
        text-shadow: 2px 2px 0 var(--color-red);
        color: var(--color-yellow);
    }
    .text-overlay h3 {
        font-size: 2.2em;
        color: var(--color-teal);
        text-shadow: 1px 1px 0 var(--color-yellow);
    }

    /* Services Section */
    .services-section {
        padding: var(--padding-section) 0;
        background-color: var(--color-black);
        border-top: 5px solid var(--color-yellow);
        border-bottom: 5px solid var(--color-teal);
        overflow: hidden; /* For horizontal scroll */
        position: relative;
    }

    .service-cards-wrapper {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 30px;
        padding: 20px;
        margin: 40px 0;
        transform: rotate(-1deg);
        background-color: rgba(var(--color-dark-grey), 0.7);
        border: 2px dashed var(--color-red);
        box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
    }

    .service-card {
        flex: 0 0 auto;
        width: calc(33.333% - 20px); /* 3 cards per row */
        scroll-snap-align: start;
        background-color: var(--color-dark-grey);
        border: 1px solid var(--color-teal);
        padding: 25px;
        border-radius: 5px;
        box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.4), 12px 12px 0 var(--color-red);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        position: relative;
        z-index: 1;
    }
    .service-card:nth-child(even) {
        transform: rotate(2deg) translateY(-10px);
        box-shadow: -8px -8px 0 rgba(0, 0, 0, 0.4), -12px -12px 0 var(--color-yellow);
    }
    .service-card:nth-child(odd) {
         transform: rotate(-3deg) translateY(10px);
    }
    .service-card:hover {
        transform: translateY(-15px) rotate(0deg) scale(1.03);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
        z-index: 5;
    }

    .service-card img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        margin-bottom: 20px;
        border: 1px solid var(--color-yellow);
        filter: grayscale(10%) contrast(105%);
    }

    .service-card h3 {
        font-family: var(--font-display);
        font-size: 1.8em;
        color: var(--color-teal);
        margin-bottom: 10px;
        letter-spacing: -0.5px;
        text-shadow: 1px 1px 0 var(--color-black);
    }

    /* Portfolio Section (Filterable Gallery) */
    .portfolio-section {
        padding: var(--padding-section) 0;
        background-color: var(--color-dark-grey);
        position: relative;
        overflow: hidden;
    }

    .filter-buttons {
        text-align: center;
        margin-bottom: 50px;
        margin-top: -20px;
        position: relative;
        z-index: 10;
        transform: rotate(1deg);
    }

    .tab-button {
        background-color: var(--color-red);
        color: var(--color-white);
        border: 2px solid var(--color-yellow);
        padding: 12px 25px;
        margin: 0 10px 10px 0;
        cursor: pointer;
        font-family: var(--font-display);
        font-size: 1.1em;
        text-transform: uppercase;
        letter-spacing: 1px;
        transition: all 0.3s ease-in-out;
        transform: rotate(0deg);
        box-shadow: 3px 3px 0 var(--color-black);
    }

    .tab-button:hover,
    .tab-button.active {
        background-color: var(--color-teal);
        border-color: var(--color-red);
        color: var(--color-yellow);
        transform: translateY(-5px) rotate(-2deg) scale(1.05);
        box-shadow: 6px 6px 0 var(--color-dark-grey);
    }

    .portfolio-grid {
        position: relative; /* For stacking panels, though content is shown/hidden */
    }

    .tab-pane {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
        /* opacity: 1; */ /* Removed for direct display:block/none from JS */
        transition: opacity 0.5s ease-in-out;
        transform: scale(0.95) rotate(1deg);
        position: relative;
        z-index: 1; /* Default lower z-index */
    }

    .tab-pane.active {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        z-index: 2; /* Active panel on top */
    }

    .grid-item {
        position: relative;
        overflow: hidden;
        border: 3px solid var(--color-red);
        box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.3), 15px 15px 0 var(--color-yellow);
        transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
        /* transform: rotate(random(-2deg, 2deg)); */ /* Intentional random rotation - cannot use SASS random */
    }
     .grid-item:nth-child(even) { transform: rotate(1deg); }
     .grid-item:nth-child(odd) { transform: rotate(-1deg); }


    .grid-item img {
        width: 100%;
        height: 250px;
        object-fit: cover;
        display: block;
        transition: transform 0.5s ease, filter 0.5s ease;
    }

    .item-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        background: linear-gradient(to top, rgba(var(--color-black), 0.9), rgba(var(--color-black), 0));
        color: var(--color-white);
        padding: 20px;
        transform: translateY(100%);
        transition: transform 0.4s ease-out;
        text-align: left;
        border-top: 1px solid var(--color-teal);
        z-index: 2;
    }

    .grid-item:hover .item-overlay {
        transform: translateY(0);
    }

    .grid-item:hover img {
        transform: scale(1.1) rotate(1deg);
        filter: grayscale(0%) contrast(100%) brightness(0.8);
    }

    .item-title {
        font-family: var(--font-display);
        font-size: 1.5em;
        margin-bottom: 5px;
        color: var(--color-yellow);
        text-shadow: 1px 1px 0 var(--color-red);
    }

    .item-caption {
        font-family: var(--font-sans);
        font-size: 0.9em;
        color: var(--color-white);
        margin-bottom: 0;
    }

    /* Showcase Section */
    .showcase-section {
        padding: var(--padding-section) 0;
        background-color: var(--color-black);
        border-top: 5px solid var(--color-teal);
        border-bottom: 5px solid var(--color-red);
        position: relative;
        overflow: hidden;
    }

    .highlights-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 40px;
        margin-top: 50px;
        transform: rotate(2deg);
    }

    .highlight-card {
        background-color: var(--color-dark-grey);
        border: 2px dashed var(--color-yellow);
        padding: 30px;
        box-shadow: 10px 10px 0 var(--color-teal), 15px 15px 0 rgba(0, 0, 0, 0.4);
        position: relative;
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        text-align: center;
    }
     .highlight-card:nth-child(even) { transform: rotate(-1deg); }
     .highlight-card:nth-child(odd) { transform: rotate(1deg); }

    .highlight-card:hover {
        transform: translateY(-10px) rotate(0deg) scale(1.03);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 10px 10px 0 var(--color-red);
    }

    .highlight-card img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        margin-bottom: 20px;
        border: 1px solid var(--color-red);
        filter: grayscale(30%) contrast(110%);
    }

    .highlight-card h3 {
        font-family: var(--font-display);
        font-size: 2em;
        color: var(--color-red);
        letter-spacing: -0.5px;
        text-shadow: 1px 1px 0 var(--color-black);
    }

    /* Team Section */
    .team-section {
        padding: var(--padding-section) 0;
        background-color: var(--color-dark-grey);
        position: relative;
        overflow: hidden;
    }

    .team-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 40px;
        margin-top: 50px;
        transform: rotate(-2deg);
    }

    .team-card {
        background-color: var(--color-black);
        border: 3px solid var(--color-yellow);
        padding: 30px;
        text-align: center;
        box-shadow: 10px 10px 0 var(--color-red), 15px 15px 0 rgba(0, 0, 0, 0.5);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        position: relative;
    }
    .team-card:nth-child(even) { transform: rotate(1deg) scale(0.98); }
    .team-card:nth-child(odd) { transform: rotate(-1deg) scale(0.98); }


    .team-card:hover {
        transform: translateY(-15px) rotate(0deg) scale(1.05);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 10px 10px 0 var(--color-teal);
    }

    .team-card img {
        width: 150px;
        height: 150px;
        border-radius: 50%;
        object-fit: cover;
        margin: 0 auto 20px auto;
        border: 4px solid var(--color-teal);
        filter: saturate(1.2) contrast(1.1);
        transition: transform 0.3s ease;
    }
    .team-card:hover img {
        transform: scale(1.1) rotate(5deg);
    }

    .member-name {
        font-family: var(--font-display);
        font-size: 2em;
        color: var(--color-yellow);
        margin-bottom: 5px;
        text-shadow: 1px 1px 0 var(--color-black);
    }

    .member-title {
        font-family: var(--font-serif);
        font-style: italic;
        color: var(--color-teal);
        font-size: 1.1em;
        margin-bottom: 15px;
    }

    .member-bio {
        font-family: var(--font-sans);
        font-size: 0.95em;
        color: var(--color-white);
        margin-bottom: 0;
    }

    /* Testimonials Section (Simulated Video) */
    .testimonials-section {
        padding: var(--padding-section) 0;
        background-color: var(--color-black);
        border-top: 5px dashed var(--color-yellow);
        position: relative;
        overflow: hidden;
    }

    .testimonial-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 40px;
        margin-top: 50px;
        transform: rotate(1deg);
    }

    .testimonial-card {
        background-color: var(--color-dark-grey);
        border: 2px solid var(--color-teal);
        padding: 30px;
        box-shadow: -10px -10px 0 var(--color-red), -15px -15px 0 rgba(0, 0, 0, 0.4);
        position: relative;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        text-align: center;
    }
    .testimonial-card:nth-child(even) { transform: rotate(-2deg); }
    .testimonial-card:nth-child(odd) { transform: rotate(2deg); }

    .testimonial-card:hover {
        transform: translateY(-10px) rotate(0deg) scale(1.02);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), -10px -10px 0 var(--color-yellow);
    }

    .video-placeholder {
        position: relative;
        width: 100%;
        padding-top: 56.25%; /* 16:9 Aspect Ratio */
        background-color: rgba(0, 0, 0, 0.8);
        margin-bottom: 20px;
        overflow: hidden;
        border: 2px solid var(--color-yellow);
    }

    .video-placeholder img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: brightness(0.7) grayscale(10%);
        transition: filter 0.3s ease;
    }

    .video-placeholder:hover img {
        filter: brightness(0.9) grayscale(0%);
    }

    .play-button {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(1);
        background-color: var(--color-red);
        color: var(--color-white);
        border: 3px solid var(--color-yellow);
        border-radius: 50%;
        width: 70px;
        height: 70px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: var(--font-display);
        font-size: 1.5em;
        cursor: pointer;
        z-index: 10;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
        transition: all 0.3s ease;
        text-shadow: 1px 1px 0 var(--color-black);
    }

    .play-button:hover {
        background-color: var(--color-teal);
        transform: translate(-50%, -50%) scale(1.1) rotate(5deg);
        box-shadow: 0 0 25px var(--color-yellow);
        border-color: var(--color-red);
    }

    .customer-name {
        font-family: var(--font-display);
        font-size: 2em;
        color: var(--color-yellow);
        margin-bottom: 10px;
        text-shadow: 1px 1px 0 var(--color-black);
    }

    .customer-quote {
        font-family: var(--font-serif);
        font-style: italic;
        font-size: 1.1em;
        color: var(--color-white);
        margin-bottom: 0;
    }

    /* Gallery Section */
    .gallery-section {
        padding: var(--padding-section) 0;
        background-color: var(--color-dark-grey);
        border-top: 5px solid var(--color-red);
        position: relative;
        overflow: hidden;
    }

    .image-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
        margin-top: 50px;
        transform: rotate(-1deg);
    }

    .gallery-item {
        position: relative;
        overflow: hidden;
        border: 4px solid var(--color-teal);
        box-shadow: -8px 8px 0 rgba(0, 0, 0, 0.4), -12px 12px 0 var(--color-yellow);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        /* transform: rotate(random(-3deg, 3deg)); */
    }
     .gallery-item:nth-child(even) { transform: rotate(2deg); }
     .gallery-item:nth-child(odd) { transform: rotate(-2deg); }

    .gallery-item:hover {
        transform: scale(1.05) rotate(0deg);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
        z-index: 5;
    }

    .gallery-item img {
        width: 100%;
        height: 280px;
        object-fit: cover;
        display: block;
        transition: transform 0.5s ease, filter 0.5s ease;
    }
    .gallery-item:hover img {
        transform: scale(1.1) rotate(2deg);
        filter: grayscale(0%) contrast(100%) brightness(0.9);
    }

    .gallery-item .caption {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: rgba(var(--color-black), 0.85);
        color: var(--color-white);
        padding: 15px;
        font-family: var(--font-serif);
        font-style: italic;
        font-size: 1.1em;
        text-align: center;
        border-top: 1px solid var(--color-red);
        opacity: 1;
        transform: translateY(100%);
        transition: opacity 0.4s ease-out, transform 0.4s ease-out;
        z-index: 2;
    }

    .gallery-item:hover .caption {
        opacity: 1;
        transform: translateY(0);
    }

    /* Footer */
    .footer {
        background-color: var(--color-black);
        color: var(--color-white);
        padding: 60px 0 20px 0;
        border-top: 5px solid var(--color-yellow);
        position: relative;
        overflow: hidden;
        font-family: var(--font-sans);
    }

    .footer-content {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 30px;
        text-align: left;
        margin-bottom: 40px;
        transform: rotate(-1deg);
        padding-top: 20px;
    }

    .footer-brand, .footer-nav, .footer-info {
        flex: 1 1 280px;
        padding: 20px;
        background-color: rgba(var(--color-dark-grey), 0.8);
        border: 1px solid var(--color-teal);
        box-shadow: 5px 5px 0 var(--color-red);
        position: relative;
        transition: transform 0.3s ease;
    }
     .footer-brand:hover, .footer-nav:hover, .footer-info:hover {
        transform: translateY(-5px) rotate(0deg) scale(1.01);
     }
    .footer-brand h3 {
        font-family: var(--font-display);
        font-size: 2.5em;
        color: var(--color-yellow);
        margin-bottom: 10px;
        text-shadow: 1px 1px 0 var(--color-black);
    }
    .footer-brand p {
        font-size: 0.9em;
        color: var(--color-white);
        opacity: 1;.8;
    }

    .footer-nav h4, .footer-info h4 {
        font-family: var(--font-display);
        font-size: 1.5em;
        color: var(--color-teal);
        margin-bottom: 15px;
        text-shadow: 1px 1px 0 var(--color-black);
    }

    .footer-nav ul {
        list-style: none;
        padding: 0;
    }

    .footer-nav ul li a {
        color: var(--color-white);
        font-size: 1em;
        margin-bottom: 8px;
        display: block;
        transition: color 0.3s, transform 0.3s;
        border-left: 2px solid transparent;
        padding-left: 5px;
    }

    .footer-nav ul li a:hover {
        color: var(--color-yellow);
        transform: translateX(5px) scale(1.02);
        border-color: var(--color-red);
    }
    
    .footer-info p {
        font-size: 0.95em;
        color: var(--color-white);
        margin-bottom: 10px;
        opacity: 1;.8;
    }

    .footer-bottom {
        text-align: center;
        padding-top: 30px;
        border-top: 1px dashed rgba(var(--color-teal), 0.5);
        font-size: 0.9em;
        color: var(--color-white);
        opacity: 1;.7;
        transform: rotate(1deg);
    }


    /* SR-only for accessibility */
    .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border-width: 0;
    }

    /* Responsive adjustments */
    @media (max-width: 992px) {
        h1 { font-size: 3.5em; }
        h2 { font-size: 2.8em; }
        h3 { font-size: 1.8em; }
        .site-logo { font-size: 2.2em; }
        .section-title { font-size: 3em; }

        .floating-card.card-1 {
            top: 20%;
            left: 2%;
            max-width: 350px;
            padding: 20px;
            transform: rotate(-5deg) scale(0.9);
        }
        .floating-card.card-2 {
            bottom: 15%;
            right: 2%;
            max-width: 350px;
            padding: 20px;
            transform: rotate(3deg) scale(0.9);
        }

        .about-story {
            gap: 40px;
        }
        .story-image-left,
        .story-image-right {
            flex-direction: column;
            align-items: center;
            min-height: auto;
        }

        .story-image-left img,
        .story-image-right img {
            position: static;
            width: 90%;
            height: 300px;
            margin-bottom: -50px; /* Overlap with text */
            transform: none;
            border: 3px solid var(--color-teal);
        }
        .story-image-right img {
             border: 3px solid var(--color-red);
        }

        .text-overlay {
            position: static;
            max-width: 90%;
            width: 100%;
            transform: none;
            margin: 0 auto;
            border: 2px solid var(--color-yellow);
            padding: 30px;
        }
        .overlay-1 { top: auto; left: auto; transform: rotate(1deg); }
        .overlay-2 { top: auto; left: auto; transform: rotate(-1deg); }
        .text-overlay h2, .text-overlay h3 { font-size: 2em; }

        .service-card {
            width: calc(50% - 15px); /* 2 cards per row on tablets */
        }
    }

    @media (max-width: 768px) {
        .nav-list {
            position: absolute;
            top: 100%;
            left: 0;
            width: 100%;
            background-color: rgba(44, 62, 80, 0.95);
            flex-direction: column;
            align-items: center;
            padding: 20px 0;
            display: none; /* Hidden by default */
            transform: translateY(-20px) translateX(0);
            opacity: 1;
            transition: opacity 0.4s ease-out, transform 0.4s ease-out;
            border-top: 2px solid var(--color-yellow);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
        }

        .nav-list.active {
            display: flex; /* Show when active */
            transform: translateY(0) translateX(0);
            opacity: 1;
        }

        .nav-toggle {
            display: block; /* Show hamburger on mobile */
        }
        
        .nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
        .nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 1; }
        .nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }


        .hero-title { font-size: 3em; letter-spacing: -1px; transform: rotate(-2deg) translateX(0); }
        .floating-card {
            position: static;
            margin: 20px auto;
            max-width: 90%;
            transform: none !important;
            animation: none !important;
            opacity: 1;
            padding: 20px;
        }

        .section-title { font-size: 2.5em; transform: translateX(0); }
        .section-description { margin-top: 0; transform: rotate(0); }
        .section-description-bottom { transform: rotate(0); }


        .service-cards-wrapper {
            flex-wrap: wrap; /* Allow cards to wrap */
            justify-content: center;
            transform: rotate(0);
            gap: 20px;
        }
        .service-card {
            width: 100%; /* 1 card per row on mobile */
            transform: rotate(0) translateY(0) !important;
            box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4), 10px 10px 0 var(--color-red);
        }
        .service-card:hover {
             transform: translateY(-5px) scale(1.02) !important;
        }

        .portfolio-grid, .highlights-grid, .team-grid, .testimonial-grid, .image-grid {
            grid-template-columns: 1fr; /* 1 column on mobile */
            gap: 20px;
            transform: rotate(0);
        }
        .grid-item, .highlight-card, .team-card, .testimonial-card, .gallery-item {
            transform: rotate(0) !important;
            box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4), 10px 10px 0 var(--color-yellow) !important;
        }
        .grid-item:hover, .highlight-card:hover, .team-card:hover, .testimonial-card:hover, .gallery-item:hover {
            transform: translateY(-5px) scale(1.02) !important;
        }

        .filter-buttons {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            transform: rotate(0);
        }
        .tab-button {
            margin: 5px;
            transform: rotate(0) !important;
            font-size: 1em;
            padding: 10px 20px;
        }
        .tab-button:hover, .tab-button.active {
             transform: translateY(-2px) scale(1.03) !important;
        }


        .footer-content {
            flex-direction: column;
            align-items: center;
            text-align: center;
            transform: rotate(0);
        }
        .footer-brand, .footer-nav, .footer-info {
            width: 100%;
            box-shadow: 3px 3px 0 var(--color-red);
            transform: rotate(0);
        }
        .footer-brand:hover, .footer-nav:hover, .footer-info:hover {
            transform: translateY(-2px) rotate(0deg) scale(1.005);
        }
        .footer-nav ul {
            text-align: center;
        }
        .footer-nav ul li a {
            padding-left: 0;
            border-left: none;
            text-align: center;
        }
        .footer-bottom { transform: rotate(0); }
    }


/* Visible state helpers */
+ .animate-fade-in-up.visible,
+ .animate-fade-in-left.visible,
+ .animate-fade-in-right.visible,
+ .animate-bounce-y.visible,
+ .section-scroll-animate.visible,
+ .text-animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Universal Icon Fixes for Buttons */
button svg, .carousel-next svg, .carousel-prev svg, .slider-next svg, .slider-prev svg,
.next svg, .prev svg, .tab-button svg, .tab-btn svg {
    display: inline-block;
    vertical-align: middle;
    pointer-events: none;
    width: 1em;
    height: 1em;
    fill: currentColor;
}

button i, .carousel-next i, .carousel-prev i, .slider-next i, .slider-prev i,
.next i, .prev i, .tab-button i, .tab-btn i {
    display: inline-block;
    vertical-align: middle;
    pointer-events: none;
    font-style: normal;
}

button .icon, .carousel-next .icon, .carousel-prev .icon,
.slider-next .icon, .slider-prev .icon, .tab-button .icon {
    display: inline-block;
    vertical-align: middle;
    pointer-events: none;
}

/* Ensure carousel buttons are clickable even with icons */
.carousel-next, .carousel-prev, .slider-next, .slider-prev,
.next, .prev, .next-btn, .prev-btn {
    cursor: pointer;
    position: relative;
}

.carousel-next *, .carousel-prev *, .slider-next *, .slider-prev *,
.next *, .prev *, .next-btn *, .prev-btn * {
    pointer-events: none;
}

/* Tab button icon fixes */
.tab-button, .tab-btn, .tab {
    cursor: pointer;
    position: relative;
}

.tab-button *, .tab-btn *, .tab * {
    pointer-events: none;
}

/* Ensure icons don't block clicks */
button > svg, button > i, button > .icon,
.carousel-next > svg, .carousel-prev > svg,
.tab-button > svg, .tab-button > i {
    pointer-events: none !important;
}

/* Enhanced: Team grid stabilization */
+ .team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
+ @media (max-width: 900px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
+ @media (max-width: 600px) { .team-grid { grid-template-columns: 1fr; } }

/* Safe visibility overrides (auto-added) */
:root, html, body, main, header, footer, section, .container, .content {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Accessibility focus outlines */
:focus{outline:2px solid #5ac8fa;outline-offset:2px;}
:focus:not(:focus-visible){outline:none;}
