/* CSS Variables for Colors */
:root {
    --color-red: #E63946; /* A vibrant red */
    --color-teal: #457B9D; /* A deep teal */
    --color-black: #1D3557; /* A very dark blue, acting as black */
    --color-yellow: #F4D35E; /* A bright yellow */
    --color-white: #F1FAEE; /* A light off-white */
    --color-accent-dark: #A8DADC; /* A light teal for contrast */
}

/* Typography Mix */
body {
    font-family: 'Montserrat', sans-serif; /* General sans-serif */
    color: var(--color-white);
    background-color: var(--color-black);
    overflow-x: hidden; /* Prevent horizontal scroll from chaotic elements */
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Bebas Neue', sans-serif; /* Display font for headings */
    text-transform: uppercase;
    line-height: 0.9; /* Tighter line-height for chaotic look */
    margin-bottom: -10px; /* Overlapping heading with paragraph */
    color: var(--color-yellow); /* Yellow headings */
    text-shadow: 2px 2px 0 var(--color-red); /* Shadow effect */
}

h1 { font-size: 5em; font-weight: 700; color: var(--color-red); text-shadow: 4px 4px 0 var(--color-teal); }
h2 { font-size: 3.5em; font-weight: 700; color: var(--color-teal); text-shadow: 3px 3px 0 var(--color-yellow); margin-top: 50px; }
h3 { font-size: 2.2em; font-weight: 400; color: var(--color-yellow); text-shadow: 2px 2px 0 var(--color-black); }

p {
    font-family: 'Playfair Display', serif; /* Serif for body text */
    margin-top: 15px; /* Adjust for overlapping with headings */
}

/* General Layout Adjustments */
section {
    position: relative;
    padding: 80px 5% 100px 5%; /* Generous padding */
    margin-bottom: -50px; /* Negative margin for sections to overlap slightly */
    z-index: 1; /* Ensure sections overlap correctly */
    overflow: hidden; /* Contains absolute children */
}
section:nth-of-type(odd) { background-color: var(--color-black); }
section:nth-of-type(even) { background-color: var(--color-teal); color: var(--color-white); } /* Alternating background */
section:nth-of-type(even) h2,
section:nth-of-type(even) h3 { color: var(--color-yellow); }
section:nth-of-type(even) .button { background-color: var(--color-red); color: var(--color-white); }


.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--color-red);
    color: var(--color-white);
    text-decoration: none;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2em;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transform: skew(-10deg); /* Skewed button */
    margin-top: 20px;
    transition: background-color 0.2s ease, transform 0.2s ease-out;
}
.button:hover {
    background-color: var(--color-yellow);
    color: var(--color-black);
    transform: skew(-10deg) scale(1.05); /* Jumpy hover */
}

/* Visual Elements: Mixed Collage, Stacked Layers, Dynamic Cutouts */
img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: cover; /* Ensure images fill space */
}

/* Apply chaotic styling to specific sections */

/* Header */
header {
    background-color: var(--color-red);
    padding: 20px 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-bottom: 5px solid var(--color-yellow); /* Border accent */
    transform: rotateX(2deg) translateY(-5px); /* Slightly tilted */
}
.nav-brand {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5em;
    color: var(--color-white);
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--color-black);
    margin-left: -20px; /* Overlap with edge */
    transform: rotate(-3deg);
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}
.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    position: relative;
    right: -20px; /* Overlap with edge */
    z-index: 0;
    background-color: var(--color-teal);
    padding: 10px 30px;
    transform: rotate(2deg) translateY(5px);
}
.nav-links li {
    margin-left: 30px;
}
.nav-links a {
    text-decoration: none;
    color: var(--color-white);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    position: relative;
    padding: 5px 0;
    transition: color 0.2s, transform 0.2s;
}
.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 3px;
    background-color: var(--color-yellow);
    transition: width 0.2s ease-out;
}
.nav-links a:hover {
    color: var(--color-yellow);
    transform: translateY(-3px); /* Jumpy hover */
}
.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 100px 5%; /* More padding */
    min-height: 80vh;
    background-color: var(--color-black);
    position: relative;
    z-index: 1;
    margin-top: -30px; /* Overlap with header */
    border-bottom: 8px solid var(--color-teal);
}
.hero-content {
    flex: 1;
    padding-right: 50px;
    position: relative;
    z-index: 2;
}
.hero-content h1 {
    font-size: 5.5em;
    margin-bottom: -20px; /* Strong overlap */
    position: relative;
    left: -15px; /* Slide left */
}
.hero-content p {
    font-size: 1.3em;
    line-height: 1.4;
    position: relative;
    z-index: 3;
    background-color: var(--color-black); /* Solid black background for readability */
    padding: 15px;
    margin-left: -30px;
    transform: rotate(-2deg);
    border-left: 5px solid var(--color-yellow);
}
.hero-image {
    flex: 1;
    position: relative;
    height: 600px; /* Fixed height for image container */
    overflow: hidden; /* Hide overflow from skewed image */
    transform: rotate(3deg) scale(1.05); /* Skew and scale image */
    margin-right: -50px; /* Overlap to right */
    border: 8px solid var(--color-red);
    box-shadow: 10px 10px 0 var(--color-yellow);
}
.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1) rotate(-3deg); /* Counter-rotate inner image */
}
.hero-action {
    position: relative;
    margin-top: 40px;
    left: 10px;
}

/* About Section */
.about-section {
    background-color: var(--color-black);
    color: var(--color-white);
    padding-top: 150px; /* Extra padding to account for overlap */
    margin-top: -120px; /* Significant overlap */
    border-bottom: 5px solid var(--color-red);
    position: relative;
    z-index: 2; /* Higher z-index to overlap previous section */
}
.about-section h2 {
    position: relative;
    left: -20px;
    margin-bottom: -5px;
    padding-bottom: 20px;
    border-bottom: 2px dashed var(--color-yellow);
}
.about-section p {
    max-width: 800px;
    margin-left: 30px;
    transform: rotate(1deg);
}
.interactive-map {
    position: relative;
    margin-top: 80px;
    background-color: var(--color-teal);
    padding: 40px;
    border: 5px solid var(--color-yellow);
    box-shadow: -10px -10px 0 var(--color-red);
    transform: rotate(-3deg); /* Tilt the whole map container */
    margin-left: -50px;
    margin-right: -50px;
    z-index: 1;
}
.interactive-map h3 {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    color: var(--color-white);
    text-shadow: 2px 2px 0 var(--color-black);
    transform: rotate(2deg);
}
.interactive-map img {
    width: 100%;
    height: auto;
    border: 3px solid var(--color-red);
    box-shadow: 5px 5px 0 var(--color-black);
    transform: rotate(1deg); /* Slight rotation on image within map */
    position: relative;
    z-index: 0;
}
.map-point {
    position: absolute;
    background-color: var(--color-yellow);
    border: 2px solid var(--color-red);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 2px 2px 0 var(--color-black);
}
.map-point span {
    display: none;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%) rotate(5deg);
    white-space: nowrap;
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 8px 12px;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9em;
    pointer-events: none;
    border: 2px solid var(--color-yellow);
    box-shadow: 3px 3px 0 var(--color-red);
}
.map-point:hover {
    background-color: var(--color-red);
    transform: scale(1.2) rotate(5deg);
}
.map-point:hover span {
    display: block;
}

/* Services Section & Portfolio Section (Tabbed Interface) */
.services-section, .portfolio-section {
    background-color: var(--color-teal);
    color: var(--color-white);
    padding-top: 100px;
    margin-top: -80px;
    border-bottom: 8px solid var(--color-yellow);
    position: relative;
    z-index: 3;
}
.services-section h2, .portfolio-section h2 {
    text-align: right; /* Right-align one heading */
    margin-right: -20px;
    margin-bottom: 40px;
    border-bottom: 2px dashed var(--color-red);
    padding-bottom: 15px;
    transform: rotate(2deg);
}
.tab-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    position: relative;
    z-index: 5;
    background-color: var(--color-red);
    padding: 10px;
    transform: rotate(-1deg);
    margin-left: -20px;
    margin-right: -20px;
    border-top: 3px solid var(--color-yellow);
    border-bottom: 3px solid var(--color-yellow);
}
.tab-button {
    background-color: var(--color-black);
    color: var(--color-white);
    border: 2px solid var(--color-teal);
    padding: 12px 25px;
    margin: 5px 10px;
    cursor: pointer;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1em;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    transform: skew(-5deg);
    box-shadow: 3px 3px 0 var(--color-yellow);
}
.tab-button:hover {
    background-color: var(--color-yellow);
    color: var(--color-black);
    transform: skew(-5deg) translateY(-5px);
}
.tab-button.active {
    background-color: var(--color-yellow);
    color: var(--color-black);
    border-color: var(--color-red);
    transform: skew(-5deg) scale(1.05);
    box-shadow: 5px 5px 0 var(--color-red);
}
.tab-content-wrapper {
    position: relative;
    z-index: 1;
}
.tab-pane {
    display: none;
    padding: 30px 0;
    animation: fadeIn 0.5s ease-out;
}
.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 1; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.service-grid, .portfolio-grid, .team-grid, .testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px; /* Increased gap for more chaotic feel */
    position: relative;
    z-index: 1;
    transform: rotate(-1deg); /* Slight rotation on grids */
}
.service-card, .portfolio-item, .testimonial-card {
    background-color: var(--color-black);
    padding: 25px;
    border: 4px solid var(--color-yellow);
    box-shadow: 8px 8px 0 var(--color-red);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    z-index: 1;
}
.service-card:hover, .portfolio-item:hover, .testimonial-card:hover {
    transform: translateY(-10px) rotate(2deg) scale(1.02); /* Jumpy hover + rotation */
    box-shadow: 12px 12px 0 var(--color-teal);
}
.service-card img, .portfolio-item img, .testimonial-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 15px;
    border: 2px solid var(--color-red);
    transform: rotate(-1deg) scale(1.02); /* Slight rotation on image */
}
.service-card h3, .portfolio-item h3 {
    margin-top: 0;
    margin-bottom: 5px;
    color: var(--color-yellow);
    text-shadow: 1px 1px 0 var(--color-black);
}
.service-card p, .portfolio-item p {
    font-size: 0.95em;
    color: var(--color-accent-dark);
}

/* Gallery Section (Slideshow) */
.gallery-section {
    background-color: var(--color-black);
    color: var(--color-white);
    padding-top: 100px;
    margin-top: -80px;
    border-bottom: 5px solid var(--color-red);
    position: relative;
    z-index: 4;
}
.gallery-section h2 {
    text-align: center;
    margin-bottom: 60px;
    transform: rotate(-3deg) translateX(-10px);
}
.slideshow-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    border: 8px solid var(--color-teal);
    box-shadow: 15px 15px 0 var(--color-yellow);
    overflow: hidden;
    transform: rotate(2deg); /* Tilt the slideshow */
    background-color: var(--color-black);
}
.slideshow-slide {
    display: none;
    animation: slideFadeIn 0.8s ease-out;
}
.slideshow-slide.active {
    display: block;
}
.slideshow-slide img {
    width: 100%;
    height: 500px; /* Fixed height for slideshow images */
    object-fit: cover;
    transform: scale(1.05) rotate(-1deg); /* Slight zoom and rotation */
    filter: brightness(0.9);
}
.slide-caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: var(--color-black);
    color: var(--color-white);
    font-family: 'Playfair Display', serif;
    padding: 10px 20px;
    font-size: 1.2em;
    border-left: 5px solid var(--color-red);
    transform: rotate(-2deg);
}
.slideshow-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 10;
}
.slideshow-nav button {
    background-color: var(--color-red);
    color: var(--color-white);
    border: 3px solid var(--color-yellow);
    padding: 10px 15px;
    cursor: pointer;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2em;
    transform: skewX(-15deg);
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
.slideshow-nav button:hover {
    background-color: var(--color-yellow);
    color: var(--color-black);
    transform: skewX(-15deg) scale(1.1);
}
.prev-slide { margin-left: -50px; }
.next-slide { margin-right: -50px; }

/* Features Section (Comparison Table) */
.features-section {
    background-color: var(--color-teal);
    color: var(--color-white);
    padding-top: 100px;
    margin-top: -80px;
    border-bottom: 8px solid var(--color-yellow);
    position: relative;
    z-index: 5;
}
.features-section h2 {
    text-align: left;
    margin-left: -30px;
    margin-bottom: 40px;
    border-bottom: 2px dashed var(--color-red);
    padding-bottom: 15px;
    transform: rotate(-1deg);
}
.comparison-table {
    background-color: var(--color-black);
    border: 5px solid var(--color-yellow);
    box-shadow: 10px 10px 0 var(--color-red);
    padding: 20px;
    margin: 0 auto;
    max-width: 900px;
    transform: rotate(1deg); /* Tilt the table */
}
.table-header, .table-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 15px 0;
    border-bottom: 1px dashed var(--color-accent-dark);
}
.table-header {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2em;
    color: var(--color-yellow);
    background-color: var(--color-red);
    padding: 20px 0;
    transform: skewX(-5deg); /* Skew header */
    margin-bottom: 10px;
}
.table-header div {
    padding-left: 15px;
}
.table-row div {
    font-family: 'Playfair Display', serif;
    padding-left: 15px;
    color: var(--color-white);
}
.table-row:last-child {
    border-bottom: none;
}

/* Team Section */
.team-section {
    background-color: var(--color-black);
    color: var(--color-white);
    padding-top: 100px;
    margin-top: -80px;
    border-bottom: 5px solid var(--color-red);
    position: relative;
    z-index: 6;
}
.team-section h2 {
    text-align: center;
    margin-bottom: 60px;
    transform: rotate(1deg) translateX(10px);
}
.team-grid {
    transform: rotate(-2deg); /* Tilt team grid */
    margin-left: -20px;
    margin-right: -20px;
}
.team-member {
    text-align: center;
    background-color: var(--color-teal);
    padding: 30px 20px;
    border: 4px solid var(--color-yellow);
    box-shadow: 8px 8px 0 var(--color-red);
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}
.team-member:hover {
    transform: translateY(-10px) rotate(3deg) scale(1.02);
    box-shadow: 12px 12px 0 var(--color-black);
}
.circular-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px auto;
    border: 5px solid var(--color-red);
    box-shadow: 0 0 0 5px var(--color-yellow); /* Ring effect */
    transition: border-color 0.3s ease, transform 0.3s ease;
    transform: rotate(-5deg); /* Initial rotation */
}
.team-member:hover .circular-photo {
    border-color: var(--color-yellow);
    transform: rotate(5deg) scale(1.05); /* Counter-rotate and scale on hover */
}
.team-member h3 {
    margin-bottom: 5px;
    color: var(--color-yellow);
    text-shadow: 1px 1px 0 var(--color-black);
    transform: rotate(1deg);
}
.team-member .team-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--color-accent-dark);
    margin-top: -5px;
    margin-bottom: 15px;
    transform: rotate(-2deg);
}
.team-member p {
    font-size: 0.9em;
    color: var(--color-white);
}

/* Testimonials Section (Video Testimonials - using images) */
.testimonials-section {
    background-color: var(--color-teal);
    color: var(--color-white);
    padding-top: 100px;
    margin-top: -80px;
    border-bottom: 8px solid var(--color-yellow);
    position: relative;
    z-index: 7;
}
.testimonials-section h2 {
    text-align: right;
    margin-right: -30px;
    margin-bottom: 60px;
    transform: rotate(-2deg) translateX(10px);
}
.testimonial-card {
    background-color: var(--color-black);
    padding: 30px;
    border: 4px solid var(--color-red);
    box-shadow: 8px 8px 0 var(--color-yellow);
    position: relative;
    text-align: center;
    transform: rotate(1deg);
}
.testimonial-card:hover {
    transform: translateY(-10px) rotate(-2deg) scale(1.02);
    box-shadow: 12px 12px 0 var(--color-black);
}
.video-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 20px;
    border: 2px solid var(--color-teal);
    transform: rotate(2deg);
    filter: grayscale(0.2) brightness(0.8);
    transition: transform 0.3s ease, filter 0.3s ease;
}
.testimonial-card:hover .video-thumbnail {
    transform: rotate(-2deg) scale(1.05);
    filter: grayscale(0) brightness(1);
}
.play-button { /* Faux play button */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%) rotate(5deg);
    width: 60px;
    height: 60px;
    background-color: var(--color-red);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.3);
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.play-button::before {
    content: '';
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 25px solid var(--color-white);
    transform: translateX(3px);
}
.play-button:hover {
    background-color: var(--color-yellow);
    transform: translate(-50%, -100%) rotate(-5deg) scale(1.1);
}
.testimonial-text {
    font-size: 1.1em;
    font-style: italic;
    margin-bottom: 15px;
    color: var(--color-accent-dark);
    transform: rotate(-1deg);
}
.testimonial-author {
    font-weight: 700;
    color: var(--color-yellow);
    transform: rotate(2deg);
}

/* FAQ Section (Searchable) */
.faq-section {
    background-color: var(--color-black);
    color: var(--color-white);
    padding-top: 100px;
    margin-top: -80px;
    border-bottom: 5px solid var(--color-teal);
    position: relative;
    z-index: 8;
}
.faq-section h2 {
    text-align: center;
    margin-bottom: 40px;
    transform: rotate(-1deg) translateX(-5px);
}
.faq-search-container {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
    transform: rotate(2deg);
}
#faq-search {
    width: 70%;
    max-width: 600px;
    padding: 15px 20px;
    border: 3px solid var(--color-yellow);
    background-color: var(--color-black);
    color: var(--color-white);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1em;
    box-shadow: 5px 5px 0 var(--color-red);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}
#faq-search:focus {
    border-color: var(--color-red);
    box-shadow: 5px 5px 0 var(--color-teal);
}
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 0;
    transform: rotate(-1deg);
    border: 4px solid var(--color-red);
    box-shadow: 8px 8px 0 var(--color-yellow);
    padding: 30px;
    background-color: var(--color-teal);
}
.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--color-accent-dark);
    padding-bottom: 15px;
}
.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.faq-question {
    background-color: var(--color-black);
    color: var(--color-yellow);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3em;
    padding: 15px 20px;
    border: 2px solid var(--color-red);
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 3px 3px 0 var(--color-teal);
    transform: skew(-2deg);
}
.faq-question:hover, .faq-question.active {
    background-color: var(--color-yellow);
    color: var(--color-black);
    border-color: var(--color-black);
    transform: skew(-2deg) translateY(-5px);
    box-shadow: 5px 5px 0 var(--color-red);
}
.faq-answer {
    display: none;
    background-color: var(--color-black);
    padding: 20px;
    margin-top: 10px;
    border-left: 5px solid var(--color-yellow);
    font-family: 'Playfair Display', serif;
    font-size: 1.1em;
    line-height: 1.5;
    color: var(--color-white);
    transform: rotate(1deg);
}
.faq-answer.active {
    display: block;
}

/* Contact Section (Side-by-side, no form) */
.contact-section {
    background-color: var(--color-red);
    color: var(--color-white);
    padding-top: 100px;
    margin-top: -80px;
    border-bottom: 8px solid var(--color-yellow);
    position: relative;
    z-index: 9;
}
.contact-section h2 {
    text-align: center;
    margin-bottom: 60px;
    color: var(--color-white);
    text-shadow: 3px 3px 0 var(--color-black);
    transform: rotate(3deg) translateX(-10px);
}
.contact-layout {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    transform: rotate(-1deg);
}
.contact-text-area, .contact-map-area {
    flex: 1;
    background-color: var(--color-black);
    padding: 40px;
    border: 5px solid var(--color-yellow);
    box-shadow: 10px 10px 0 var(--color-teal);
    transform: rotate(2deg);
}
.contact-text-area p {
    margin-bottom: 20px;
    font-size: 1.1em;
    line-height: 1.6;
    color: var(--color-accent-dark);
}
.contact-map-area {
    transform: rotate(-3deg);
    overflow: hidden; /* Contains img rotation */
}
.contact-map-area img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border: 3px solid var(--color-red);
    box-shadow: 5px 5px 0 var(--color-black);
    transform: rotate(3deg); /* Rotate map image */
}
.contact-map-area .map-caption {
    font-style: italic;
    font-size: 0.9em;
    color: var(--color-yellow);
    margin-top: 15px;
    text-align: center;
    transform: rotate(-1deg);
}
.contact-action {
    margin-top: 30px;
    text-align: center;
}

/* Footer */
footer {
    background-color: var(--color-black);
    padding: 40px 5%;
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 0.9em;
    color: var(--color-accent-dark);
    border-top: 5px solid var(--color-red);
    margin-top: -50px; /* Overlap */
    position: relative;
    z-index: 10;
    transform: rotateX(2deg); /* Slightly tilted */
}
footer p {
    margin: 0;
    transform: rotate(-1deg);
}


/* Media Queries for Responsiveness */
@media (max-width: 1024px) {
    h1 { font-size: 4em; }
    h2 { font-size: 3em; }
    h3 { font-size: 1.8em; }

    .hero-section {
        flex-direction: column;
        text-align: center;
        padding-bottom: 50px;
    }
    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
    }
    .hero-image {
        margin-right: 0;
        height: 400px;
        width: 80%;
    }
    .hero-content p {
        margin-left: 0;
        transform: none;
    }
    .hero-action {
        left: 0;
    }
    
    .nav-links {
        padding: 10px 20px;
        right: 0;
    }
    .nav-links li {
        margin-left: 20px;
    }

    .service-grid, .portfolio-grid, .team-grid, .testimonials-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cards per row on medium screens */
        gap: 30px;
        transform: none; /* Less rotation on smaller screens */
    }

    .tab-button {
        margin: 5px;
        padding: 10px 15px;
        font-size: 1em;
        transform: none;
        box-shadow: 2px 2px 0 var(--color-yellow);
    }
    .tab-button.active {
        transform: scale(1.03);
        box-shadow: 4px 4px 0 var(--color-red);
    }
    .tab-buttons {
        transform: none;
    }

    .comparison-table {
        transform: none;
    }
    .table-header, .table-row {
        grid-template-columns: repeat(4, 1fr); /* Keep 4 columns but allow wrapping/scrolling if too narrow */
        font-size: 0.9em;
    }

    .contact-layout {
        flex-direction: column;
        transform: none;
    }
    .contact-text-area, .contact-map-area {
        transform: none;
    }
    .contact-map-area img {
        height: 250px;
    }

    .interactive-map {
        transform: none;
        margin-left: 0;
        margin-right: 0;
        padding: 20px;
    }
    .map-point span {
        top: -35px;
        padding: 5px 8px;
        font-size: 0.8em;
    }
    .gallery-section .slideshow-container {
        transform: none;
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 3em; }
    h2 { font-size: 2.5em; }
    h3 { font-size: 1.5em; }

    header {
        transform: none;
        padding: 15px 5%;
    }
    nav {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-brand {
        margin-bottom: 15px;
        font-size: 2em;
        background-color: var(--color-black); /* Keep background for contrast */
        padding: 5px 10px;
        transform: rotate(-3deg);
    }
    .nav-links {
        flex-direction: column;
        width: 100%;
        position: static; /* No absolute positioning */
        background-color: var(--color-teal);
        padding: 10px 0;
        transform: none; /* No rotation for mobile nav */
        border: none; /* No top/bottom border */
    }
    .nav-links li {
        margin: 5px 0;
        text-align: center;
    }
    .nav-links a {
        padding: 10px 0;
        display: block;
    }

    .hero-section, .about-section, .services-section, .portfolio-section,
    .gallery-section, .features-section, .team-section, .testimonials-section,
    .faq-section, .contact-section, footer {
        padding-left: 5%;
        padding-right: 5%;
        margin-top: -50px; /* Reduce overlap */
        border-width: 3px; /* Smaller borders */
    }
    .hero-image {
        width: 100%;
        transform: none;
        border-width: 5px;
        box-shadow: 5px 5px 0 var(--color-yellow);
    }
    .hero-image img {
        transform: none;
    }

    .service-grid, .portfolio-grid, .team-grid, .testimonials-grid {
        grid-template-columns: 1fr; /* 1 card per row on small screens */
        gap: 20px;
        transform: none;
    }
    .service-card, .portfolio-item, .testimonial-card, .team-member {
        padding: 20px;
        border-width: 3px;
        box-shadow: 5px 5px 0 var(--color-red);
        transform: none;
    }
    .service-card:hover, .portfolio-item:hover, .testimonial-card:hover, .team-member:hover {
        transform: translateY(-5px);
        box-shadow: 8px 8px 0 var(--color-teal);
    }
    .service-card img, .portfolio-item img, .testimonial-card img {
        transform: none;
    }
    .team-member .circular-photo {
        transform: none;
    }
    .team-member:hover .circular-photo {
        transform: scale(1.05);
    }

    .tab-buttons {
        flex-direction: column;
        margin-bottom: 20px;
        transform: none;
    }
    .tab-button {
        width: 100%;
        margin: 5px 0;
        transform: none;
    }
    .tab-button.active {
        transform: scale(1.02);
    }

    .comparison-table {
        padding: 10px;
        border-width: 3px;
        box-shadow: 5px 5px 0 var(--color-red);
        overflow-x: auto; /* Allow horizontal scroll for table if too narrow */
    }
    .table-header, .table-row {
        min-width: 600px; /* Ensure table doesn't shrink too much */
    }
    .table-header div, .table-row div {
        padding: 5px 0;
    }
    .table-header {
        transform: none;
        padding: 10px 0;
    }

    #faq-search {
        width: 90%;
        box-shadow: 3px 3px 0 var(--color-red);
    }
    .faq-list {
        padding: 20px;
        transform: none;
        border-width: 3px;
        box-shadow: 5px 5px 0 var(--color-yellow);
    }
    .faq-question {
        font-size: 1.1em;
        padding: 10px 15px;
        box-shadow: 2px 2px 0 var(--color-teal);
        transform: none;
    }
    .faq-question:hover, .faq-question.active {
        transform: translateY(-3px);
        box-shadow: 3px 3px 0 var(--color-red);
    }
    .faq-answer {
        font-size: 1em;
        transform: none;
    }
    
    .contact-text-area, .contact-map-area {
        padding: 25px;
        border-width: 3px;
        box-shadow: 5px 5px 0 var(--color-teal);
    }
    .contact-map-area img {
        height: 200px;
    }
}


javascript
/* 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; } }

/* Enhanced: Smooth scroll CSS fallback */
html { scroll-behavior: smooth; }

/* Enhanced: Missing animation classes from JS */
.animate-in {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Safe visibility overrides (auto-added) */
:root, html, body, main, header, footer, section, .container, .content {
  opacity: 1 !important;
  visibility: visible !important;
}
