:root {
    --primary-red: #E74C3C;
    --primary-blue: #3498DB;
    --primary-yellow: #F1C40F;
    --dark-outline: #2C3E50;
    --background-light: #ECF0F1;
    --text-color: #2C3E50;
    --white: #FFFFFF;
    --grey-light: #BDC3C7;
    --shadow-offset: 8px; /* Exaggerated comic shadow */
    --border-thickness: 4px;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Comic Neue', cursive;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--background-light);
    overflow-x: hidden; /* Prevent horizontal scroll due to comic overlaps */
}

h1, h2, h3 {
    font-family: 'Bangers', cursive;
    text-transform: uppercase;
    color: var(--dark-outline);
    margin-bottom: 0.8em;
    line-height: 1.2;
    -webkit-text-stroke: 1px var(--dark-outline); /* Text outline effect */
    text-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-red);
}

h1 { font-size: 3.5em; text-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-yellow); }
h2 { font-size: 2.8em; text-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-blue); }
h3 { font-size: 1.8em; text-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-red); }

strong {
    font-family: 'Luckiest Guy', cursive;
    font-size: 1.1em;
    color: var(--dark-outline);
    -webkit-text-stroke: 0.5px var(--dark-outline);
}

p {
    margin-bottom: 1em;
    font-size: 1.1em;
}

a {
    color: var(--primary-red);
    text-decoration: none;
    transition: color 0.3s ease-out, transform 0.2s ease-out;
}

a:hover {
    color: var(--primary-blue);
    transform: translateY(-2px);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border: var(--border-thickness) solid var(--dark-outline);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-red);
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2em 1.5em;
}

.section-title {
    text-align: center;
    margin-bottom: 1.5em;
    position: relative;
    z-index: 2; /* Ensure title is above halftone */
}

.section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2.5em;
    font-size: 1.2em;
    line-height: 1.8;
}

/* Comic Panel Styling */
.comic-panel {
    position: relative;
    padding: 4em 0;
    margin-bottom: 3em; /* Spacing between sections */
    background-color: var(--background-light);
    border: var(--border-thickness) solid var(--dark-outline);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--dark-outline);
    overflow: hidden;
    margin: 0 2em 3em; /* Exaggerated spacing */
    transition: transform 0.3s ease-out;
}

.comic-panel:nth-of-type(odd) {
    transform: rotate(-1deg);
    margin-left: 3em;
}

.comic-panel:nth-of-type(even) {
    transform: rotate(1deg);
    margin-right: 3em;
}

.comic-panel:hover {
    transform: scale(1.005);
    box-shadow: calc(var(--shadow-offset) * 1.2) calc(var(--shadow-offset) * 1.2) 0 var(--primary-blue);
}


/* Halftone Background Effect (Applied to specific sections for variation) */
.story-section::before,
.products-section::before,
.features-section::before,
.reviews-section::before,
.portfolio-section::before,
.team-section::before,
.location-section::before,
.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, var(--text-color) 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 1;.05;
    z-index: 1;
    pointer-events: none;
}

/* Comic Bubble & Speech Bubble Base */
.comic-bubble {
    position: relative;
    padding: 1.5em;
    background-color: var(--white);
    border: var(--border-thickness) solid var(--dark-outline);
    border-radius: 15px;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-blue);
    margin-bottom: 1.5em;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.comic-bubble:hover {
    transform: translateY(-5px);
    box-shadow: calc(var(--shadow-offset) + 2px) calc(var(--shadow-offset) + 2px) 0 var(--primary-yellow);
}

.comic-speech-bubble {
    position: relative;
    padding: 1.5em;
    background-color: var(--white);
    border: var(--border-thickness) solid var(--dark-outline);
    border-radius: 15px;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-red);
    margin-bottom: 1.5em;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.comic-speech-bubble:hover {
    transform: translateY(-5px);
    box-shadow: calc(var(--shadow-offset) + 2px) calc(var(--shadow-offset) + 2px) 0 var(--primary-blue);
}

.comic-speech-bubble::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 20px solid transparent;
    border-top-color: var(--dark-outline);
    border-right-color: var(--dark-outline);
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-red); /* Speech bubble tail shadow */
    z-index: 1; /* Ensure tail outline is on top */
}

.comic-speech-bubble::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 16px solid transparent;
    border-top-color: var(--white);
    border-right-color: var(--white);
    bottom: -16px; /* Adjust to match border thickness */
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    z-index: 2; /* Ensure white fill is above outline */
}

/* Comic shadow for images and elements */
.comic-shadow {
    position: absolute;
    bottom: calc(var(--shadow-offset) * -1);
    right: calc(var(--shadow-offset) * -1);
    width: 100%;
    height: 100%;
    background: var(--dark-outline);
    border-radius: inherit;
    z-index: -1;
    transition: all 0.3s ease-out;
}


/* Animations and Effects */
@keyframes popBurst {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.pop-burst:hover {
    animation: popBurst 0.5s ease-out;
}

.zoom-effect:hover img, .zoom-effect:hover .comic-shadow {
    transform: scale(1.03);
    box-shadow: calc(var(--shadow-offset) * 1.2) calc(var(--shadow-offset) * 1.2) 0 var(--primary-yellow);
}

.zoom-effect img, .zoom-effect .comic-shadow {
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

/* Bounce in effect for hero cards */
@keyframes bounceIn {
    0% {
        opacity: 1;
        transform: translateY(-50px) scale(0.8);
    }
    60% {
        opacity: 1;
        transform: translateY(10px) scale(1.05);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

.bounce-in {
    animation: bounceIn 0.8s ease-out forwards;
    opacity: 1;
}

.bounce-in.delay-1 {
    animation-delay: 0.3s;
}

/* Header & Navigation */
.main-header {
    background-color: var(--primary-blue);
    padding: 1em 0;
    border-bottom: var(--border-thickness) solid var(--dark-outline);
    position: sticky;
    top: 0;
    z-index: 1000;
    transform: rotate(0) !important; /* Override comic-panel rotation */
    margin: 0 !important; /* Override comic-panel margin */
    box-shadow: 0 var(--shadow-offset) 0 var(--dark-outline);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5em;
}

.logo {
    font-family: 'Bangers', cursive;
    font-size: 2.5em;
    color: var(--white);
    text-shadow: 3px 3px 0 var(--dark-outline);
    -webkit-text-stroke: 1px var(--dark-outline);
    transition: transform 0.2s ease-out;
}

.logo:hover {
    transform: scale(1.05) rotate(-2deg);
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 1.5em;
}

.nav-links a {
    color: var(--white);
    font-family: 'Luckiest Guy', cursive;
    font-size: 1.2em;
    padding: 0.5em 1em;
    border: var(--border-thickness) solid transparent;
    transition: all 0.3s ease-out;
}

.nav-links a:hover {
    color: var(--primary-yellow);
    border-color: var(--primary-yellow);
    background-color: var(--dark-outline);
    transform: scale(1.1) translateY(-2px);
    border-radius: 5px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1001;
    padding: 0;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--white);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 80vh; /* Adjust as needed */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-bottom: 3em;
    border: var(--border-thickness) solid var(--dark-outline);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--dark-outline);
    margin: 0 2em 3em;
    transform: rotate(0) !important;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%; /* Larger height for parallax effect */
    background-image: url('images/image_25.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    z-index: -1;
    filter: brightness(0.7);
    transition: transform 0.3s ease-out;
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2em;
    position: relative;
    z-index: 2;
}

.hero-card {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2em;
    border-radius: 15px;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-blue);
    max-width: 450px;
    color: var(--text-color);
    border-color: var(--dark-outline);
    position: relative;
    z-index: 5;
    transform: rotate(2deg); /* Floating effect */
}

.hero-card:nth-child(even) {
    transform: rotate(-3deg);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-red);
}

.hero-card h1, .hero-card h2 {
    color: var(--dark-outline);
    text-shadow: 4px 4px 0 var(--primary-yellow);
    font-size: 2.5em;
    -webkit-text-stroke: 0.5px var(--dark-outline);
}

.hero-card p {
    font-size: 1.2em;
    font-family: 'Comic Neue', cursive;
}

/* Story Section */
.story-section {
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2em;
    margin-top: 3em;
    position: relative;
    z-index: 2; /* Above halftone */
}

.stat-card {
    background-color: var(--primary-yellow);
    color: var(--dark-outline);
    padding: 1.5em;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--dark-outline);
    border: var(--border-thickness) solid var(--dark-outline);
    font-family: 'Luckiest Guy', cursive;
    transition: transform 0.3s ease-out;
}
.stat-card.comic-speech-bubble::before { bottom: -16px; border-top-color: var(--primary-yellow); border-right-color: var(--primary-yellow); }
.stat-card.comic-speech-bubble::after { bottom: -20px; border-top-color: var(--dark-outline); border-right-color: var(--dark-outline); }

.stat-number {
    display: block;
    font-size: 3em;
    margin-bottom: 0.2em;
    line-height: 1;
    -webkit-text-stroke: 1px var(--dark-outline);
    text-shadow: 3px 3px 0 var(--primary-red);
}

.stat-label {
    font-size: 1.3em;
    font-weight: bold;
}

.story-description, .story-conclusion {
    max-width: 900px;
    margin: 1.5em auto;
    font-size: 1.2em;
}

/* Products Section - Tabbed Interface */
.tab-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 2em;
    flex-wrap: wrap;
    gap: 1em;
    position: relative;
    z-index: 2;
}

.comic-button {
    font-family: 'Luckiest Guy', cursive;
    font-size: 1.2em;
    padding: 0.8em 1.5em;
    border: var(--border-thickness) solid var(--dark-outline);
    border-radius: 10px;
    background-color: var(--primary-blue);
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease-out;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--dark-outline);
    transform: rotate(-1deg);
}

.comic-button:hover {
    transform: translateY(-5px) rotate(2deg) scale(1.05);
    background-color: var(--primary-red);
    box-shadow: calc(var(--shadow-offset) + 2px) calc(var(--shadow-offset) + 2px) 0 var(--primary-yellow);
}

.tab-button.active {
    background-color: var(--primary-red);
    transform: translateY(-3px) rotate(1deg) scale(1.03);
    box-shadow: calc(var(--shadow-offset) + 2px) calc(var(--shadow-offset) + 2px) 0 var(--primary-yellow);
}

.tab-content {
    margin-top: 1.5em;
    position: relative;
    z-index: 2;
}

.tab-pane {
    display: none;
    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); }
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2em;
}

.product-card {
    text-align: center;
    background-color: var(--white);
}

.product-card img {
    border-radius: 5px;
    margin-bottom: 1em;
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    object-position: center;
}
.product-card h3 {
    margin-bottom: 0.5em;
    font-size: 1.5em;
    text-shadow: 2px 2px 0 var(--primary-blue);
}
.product-card p {
    font-size: 1em;
    line-height: 1.4;
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2em;
    position: relative;
    z-index: 2;
}

.feature-card {
    text-align: center;
    background-color: var(--primary-red);
    color: var(--white);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--dark-outline);
    border: var(--border-thickness) solid var(--dark-outline);
    position: relative;
    transform: rotate(2deg);
}
.feature-card:nth-child(even) {
    transform: rotate(-2deg);
    background-color: var(--primary-blue);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-yellow);
}
.feature-card p {
    font-size: 1em;
    color: var(--background-light);
}

/* Reviews Section */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2em;
    position: relative;
    z-index: 2;
}

.review-card {
    text-align: center;
    background-color: var(--background-light);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-red);
    position: relative;
    transform: rotate(-1deg);
}

.review-card:nth-child(even) {
    transform: rotate(1deg);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-blue);
}
.review-card.comic-speech-bubble::before { bottom: -16px; border-top-color: var(--background-light); border-right-color: var(--background-light); }
.review-card.comic-speech-bubble::after { bottom: -20px; border-top-color: var(--dark-outline); border-right-color: var(--dark-outline); }


.video-placeholder {
    position: relative;
    width: 100%;
    padding-bottom: 60%; /* Aspect ratio 5:3 for 400x250 */
    margin-bottom: 1em;
    background-color: var(--dark-outline);
    border-radius: 5px;
    overflow: hidden;
    border: var(--border-thickness) solid var(--dark-outline);
}

.video-placeholder img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    box-shadow: none;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 0;
    height: 0;
    border-left: 30px solid var(--primary-yellow);
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s ease-out;
    box-shadow: 5px 5px 0 var(--dark-outline);
}

.play-button:hover {
    transform: translate(-50%, -50%) scale(1.2);
    border-left-color: var(--primary-red);
}
.review-card strong {
    font-size: 1.2em;
    margin-bottom: 0.5em;
    display: block;
}
.review-card p {
    font-size: 1em;
}

/* Portfolio/Gallery Section */
.filter-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 2em;
    flex-wrap: wrap;
    gap: 1em;
    position: relative;
    z-index: 2;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2em;
    position: relative;
    z-index: 2;
}

.gallery-item {
    background-color: var(--white);
    padding: 1em;
    text-align: center;
    border-radius: 10px;
    border: var(--border-thickness) solid var(--dark-outline);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-blue);
    position: relative;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
    transform: rotate(1deg);
    overflow: hidden;
}
.gallery-item:nth-child(even) {
    transform: rotate(-1deg);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-red);
}

.gallery-item figcaption {
    padding-top: 1em;
}
.gallery-item figcaption h3 {
    margin-bottom: 0.2em;
    font-size: 1.4em;
    text-shadow: 2px 2px 0 var(--primary-red);
}
.gallery-item figcaption p {
    font-size: 0.9em;
    line-height: 1.3;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2em;
    position: relative;
    z-index: 2;
}

.team-member {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background-color: var(--primary-yellow);
    padding: 0; /* Remove padding as content is in overlay */
    transition: transform 0.3s ease-out;
}
.team-member.comic-bubble {
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--dark-outline);
    transform: rotate(-2deg);
}
.team-member:nth-child(even) {
    transform: rotate(2deg);
    background-color: var(--primary-red);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-blue);
}
.team-member:hover {
    transform: translateY(-5px) scale(1.05);
}

.team-member img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border: none;
    box-shadow: none;
    transition: transform 0.3s ease-out;
}

.team-member .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(var(--dark-outline-rgb, 44, 62, 80), 0.8);
    color: var(--white);
    padding: 1em;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: 'Comic Neue', cursive;
    border-top: var(--border-thickness) solid var(--dark-outline);
}
.team-member:hover .overlay {
    transform: translateY(0);
}
.team-member .overlay h3 {
    color: var(--white);
    font-size: 1.4em;
    margin-bottom: 0.2em;
    -webkit-text-stroke: 0; /* Remove stroke for readability */
    text-shadow: 2px 2px 0 var(--primary-blue);
}
.team-member .overlay p {
    font-family: 'Luckiest Guy', cursive;
    font-size: 1em;
    color: var(--primary-yellow);
}

/* Location Section */
.location-section {
    text-align: center;
}

.location-intro {
    max-width: 800px;
    margin: 0 auto 2.5em;
    font-size: 1.2em;
    line-height: 1.8;
}
.location-intro.comic-speech-bubble {
    background-color: var(--primary-yellow);
    color: var(--dark-outline);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-red);
    border: var(--border-thickness) solid var(--dark-outline);
}
.location-intro.comic-speech-bubble::before { border-top-color: var(--primary-yellow); border-right-color: var(--primary-yellow); }
.location-intro.comic-speech-bubble::after { border-top-color: var(--dark-outline); border-right-color: var(--dark-outline); }


.contact-form-placeholder {
    max-width: 600px;
    margin: 3em auto;
    padding: 2.5em;
    text-align: left;
    background-color: var(--white);
    border: var(--border-thickness) solid var(--dark-outline);
    border-radius: 15px;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary-blue);
    position: relative;
    z-index: 2;
    transform: rotate(2deg);
}
.contact-form-placeholder.comic-speech-bubble::before { bottom: -16px; border-top-color: var(--white); border-right-color: var(--white); }
.contact-form-placeholder.comic-speech-bubble::after { bottom: -20px; border-top-color: var(--dark-outline); border-right-color: var(--dark-outline); }


.contact-form-placeholder p strong {
    font-size: 1.5em;
    display: block;
    margin-bottom: 0.5em;
    text-align: center;
    color: var(--dark-outline);
    text-shadow: 2px 2px 0 var(--primary-yellow);
}

.contact-form-placeholder p {
    margin-bottom: 1.5em;
    font-size: 1.1em;
    text-align: center;
}

.form-field-group {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

.form-field {
    background-color: var(--background-light);
    border: 2px dashed var(--dark-outline);
    padding: 1em;
    border-radius: 8px;
    font-size: 1.1em;
    color: var(--text-color);
    font-family: 'Comic Neue', cursive;
    position: relative;
}
.placeholder-input {
    color: var(--grey-light);
    font-style: italic;
    display: block;
    margin-top: 0.5em;
}

.submit-button {
    width: 100%;
    margin-top: 1.5em;
    background-color: var(--primary-red);
    color: var(--white);
    text-shadow: 2px 2px 0 var(--dark-outline);
    border-color: var(--dark-outline);
    font-size: 1.5em;
    padding: 0.8em 1.5em;
}
.submit-button:hover {
    background-color: var(--primary-yellow);
    color: var(--dark-outline);
    box-shadow: calc(var(--shadow-offset) + 2px) calc(var(--shadow-offset) + 2px) 0 var(--primary-blue);
}

.form-note {
    font-size: 0.9em;
    color: var(--grey-light);
    margin-top: 1em;
    text-align: center;
}

/* FAQ Section */
.faq-section {
    text-align: center;
}

.chat-faq-container {
    max-width: 700px;
    margin: 3em auto;
    background-color: var(--primary-blue);
    border: var(--border-thickness) solid var(--dark-outline);
    border-radius: 15px;
    padding: 2em;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--dark-outline);
    position: relative;
    z-index: 2;
    transform: rotate(-1deg);
}
.chat-faq-container.comic-bubble::before { bottom: -16px; border-top-color: var(--primary-blue); border-right-color: var(--primary-blue); }
.chat-faq-container.comic-bubble::after { bottom: -20px; border-top-color: var(--dark-outline); border-right-color: var(--dark-outline); }

.chat-message {
    padding: 1em 1.5em;
    margin-bottom: 1.5em;
    border-radius: 10px;
    font-size: 1.1em;
    text-align: left;
    position: relative;
}

.user-message {
    background-color: var(--primary-yellow);
    border: var(--border-thickness) solid var(--dark-outline);
    color: var(--dark-outline);
    margin-left: auto;
    width: 80%;
    cursor: pointer;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    box-shadow: 4px 4px 0 var(--dark-outline);
    transform: rotate(2deg);
    position: relative;
    z-index: 5;
}
.user-message:hover {
    transform: translateY(-5px) scale(1.02) rotate(0deg);
    box-shadow: 6px 6px 0 var(--primary-red);
}
.user-message.active-question {
    background-color: var(--primary-red);
    color: var(--white);
    transform: translateY(-2px) scale(1.01) rotate(0deg);
    box-shadow: 4px 4px 0 var(--primary-blue);
}
.user-message p strong {
    font-size: 1.1em;
    -webkit-text-stroke: 0;
    text-shadow: none;
}
.user-message.active-question p strong {
    color: var(--white);
    text-shadow: none;
}
.user-message.comic-bubble::before { bottom: -16px; border-top-color: var(--primary-yellow); border-right-color: var(--primary-yellow); }
.user-message.comic-bubble::after { bottom: -20px; border-top-color: var(--dark-outline); border-right-color: var(--dark-outline); }
.user-message.active-question.comic-bubble::before { border-top-color: var(--primary-red); border-right-color: var(--primary-red); }


.bot-message {
    background-color: var(--white);
    border: var(--border-thickness) solid var(--dark-outline);
    color: var(--text-color);
    margin-right: auto;
    width: 80%;
    box-shadow: 4px 4px 0 var(--dark-outline);
    display: none; /* Hidden by default */
    animation: slideInFromLeft 0.4s ease-out forwards;
    transform: rotate(-1deg);
    position: relative;
    z-index: 4;
}
.bot-message.show {
    display: block;
}
.bot-message p {
    margin: 0;
    font-size: 1em;
}
.bot-message.comic-speech-bubble::before { border-top-color: var(--white); border-right-color: var(--white); }
.bot-message.comic-speech-bubble::after { border-top-color: var(--dark-outline); border-right-color: var(--dark-outline); }


@keyframes slideInFromLeft {
    from { opacity: 1; transform: translateX(-50px) rotate(-1deg); }
    to { opacity: 1; transform: translateX(0) rotate(-1deg); }
}

.faq-instruction {
    font-size: 1em;
    color: var(--text-color);
    margin-top: 2em;
}

/* Footer */
.main-footer {
    background-color: var(--dark-outline);
    color: var(--white);
    padding: 2em 0;
    text-align: center;
    border-top: var(--border-thickness) solid var(--dark-outline);
    box-shadow: 0 -var(--shadow-offset) 0 var(--dark-outline);
    position: relative;
    z-index: 1000;
    margin: 0 !important;
    transform: rotate(0) !important;
}

.main-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
}

.footer-nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
}

.footer-nav-links a {
    color: var(--primary-yellow);
    font-family: 'Comic Neue', cursive;
    font-weight: bold;
}

.footer-nav-links a:hover {
    color: var(--primary-red);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    h1 { font-size: 2.8em; }
    h2 { font-size: 2.2em; }
    h3 { font-size: 1.5em; }

    .nav-links {
        margin-left: 0;
    }
    .nav-links li {
        margin-left: 1em;
    }
    .main-nav {
        padding: 0 1em;
    }
    .container {
        padding: 1.5em 1em;
    }
    .comic-panel {
        margin: 0 1em 2em;
    }

    .hero-content {
        flex-direction: column;
        gap: 1em;
    }
    .hero-card {
        transform: rotate(0deg) !important; /* Remove rotation on smaller screens */
    }

    .stats-grid,
    .product-grid,
    .features-grid,
    .reviews-grid,
    .gallery-grid,
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5em;
    }

    .user-message, .bot-message {
        width: 95%;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.3em; }

    .logo {
        font-size: 2em;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-blue);
        border-top: var(--border-thickness) solid var(--dark-outline);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0;
        text-align: center;
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 1em;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .nav-links a:hover {
        transform: none; /* Override hover transform for mobile menu */
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 1; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    .hero-section {
        height: 60vh;
    }

    .hero-card {
        padding: 1.5em;
        margin: 0 1em;
    }
    .hero-card h1 {
        font-size: 2em;
    }
    .hero-card h2 {
        font-size: 1.5em;
    }
    .section-description {
        font-size: 1em;
    }

    .comic-panel {
        margin: 0 0.5em 1.5em;
        transform: rotate(0deg) !important; /* Remove all rotation on mobile */
    }

    .stats-grid,
    .product-grid,
    .features-grid,
    .reviews-grid,
    .gallery-grid,
    .team-grid {
        grid-template-columns: 1fr; /* Stack cards vertically on mobile */
        gap: 1.5em;
    }

    .tab-buttons {
        flex-direction: column;
    }
    .tab-button {
        transform: rotate(0deg) !important;
    }

    .review-card, .gallery-item, .team-member, .feature-card, .stat-card, .product-card {
        transform: rotate(0deg) !important;
    }

    .contact-form-placeholder {
        padding: 1.5em;
        transform: rotate(0deg);
    }
    .contact-form-placeholder p {
        font-size: 1em;
    }
    .form-field {
        font-size: 1em;
    }

    .chat-faq-container {
        padding: 1.5em;
        transform: rotate(0deg);
    }
    .user-message, .bot-message {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        transform: rotate(0deg);
    }
}

/* 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;}
