:root {
    --charcoal: #2F2F2F;
    --rust: #8B3A2D;
    --moss-green: #4A5B4A;
    --tan: #C8B8A6;
    --off-white: #E0E0E0;
    --dark-gray-text: #555555;
    --text-color: var(--off-white);
    --heading-color: var(--tan);
    --accent-color: var(--rust);
    --background-dark: var(--charcoal);

    --font-heading: 'Bebas Neue', sans-serif;
    --font-body: 'Special Elite', cursive;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-dark);
    overflow-x: hidden; /* Prevent horizontal scroll from torn edges */
}

/* Global Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative; /* For z-index stacking context */
    z-index: 2; /* Ensure content is above background textures */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    margin-bottom: 1rem;
    line-height: 1.2;
    text-transform: uppercase;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.8rem; margin-top: 2rem; }
h3 { font-size: 2.2rem; margin-top: 1.5rem; }

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

a:hover {
    color: var(--off-white);
    transform: translateY(-2px);
}

ul {
    list-style: none;
    margin-bottom: 1rem;
    padding-left: 20px; /* Indent lists */
}

ul li {
    margin-bottom: 0.5rem;
    position: relative;
}

ul li::before {
    content: '-'; /* Using hyphen instead of icon */
    color: var(--accent-color);
    position: absolute;
    left: -20px;
}

.button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--off-white);
    font-family: var(--font-heading);
    padding: 12px 25px;
    border: none;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}

.button:hover {
    background-color: var(--tan);
    transform: translateY(-3px) scale(1.02);
}

/* Header */
.header {
    background-color: rgba(47, 47, 47, 0.9); /* Semi-transparent charcoal */
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--moss-green);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    margin: 0;
}

.site-logo a {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--tan);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease;
}

.site-logo a:hover {
    color: var(--off-white);
    transform: none; /* Override general link transform */
}

.main-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-nav ul li {
    margin-left: 30px;
    position: relative; /* For hover effect */
}

.main-nav ul li::before {
    content: none; /* Remove list item before for nav */
}

.main-nav a {
    color: var(--off-white);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    padding-bottom: 5px;
}

.main-nav a:hover {
    color: var(--tan);
    transform: translateY(-2px);
    border-bottom: 2px solid var(--accent-color); /* Subtle grunge underline */
}

/* Grunge Backgrounds and Textures */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4" viewBox="0 0 4 4"><filter id="n" x="0" y="0"><feTurbulence type="fractalNoise" baseFrequency="0.75" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="0.07"/></svg>');
    background-size: 100px;
    pointer-events: none;
    z-index: 0;
}

section {
    position: relative;
    padding: 80px 0;
    overflow: hidden; /* To contain torn edges or other overflows */
}

/* Torn Edge Effect */
.torn-edge-bottom::after,
.torn-edge-top::before {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 30px; /* Height of the torn edge */
    background-color: var(--background-dark); /* Match background of next section */
    z-index: 1; /* Below content but above section background */
}

.torn-edge-bottom::after {
    bottom: -15px; /* Halfway over */
    clip-path: polygon(0 0, 100% 0, 100% 50%, 95% 70%, 85% 60%, 70% 80%, 50% 65%, 30% 90%, 15% 75%, 5% 85%, 0% 60%);
    transform: scaleY(-1); /* Flip for bottom edge */
    background: linear-gradient(to top, var(--background-dark), var(--background-dark) 50%, transparent 50%), /* simulate tear */
                url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 100 30"><path fill="%232F2F2F" d="M0,15 Q25,0 50,15 T100,15 V30 H0 Z" /></svg>') center/cover;
    background-size: 100% 30px;
}

.torn-edge-top::before {
    top: -15px; /* Halfway over */
    clip-path: polygon(0 0, 100% 0, 100% 50%, 95% 70%, 85% 60%, 70% 80%, 50% 65%, 30% 90%, 15% 75%, 5% 85%, 0% 60%);
    background: linear-gradient(to bottom, var(--background-dark), var(--background-dark) 50%, transparent 50%),
                url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 100 30"><path fill="%232F2F2F" d="M0,15 Q25,0 50,15 T100,15 V30 H0 Z" /></svg>') center/cover;
    background-size: 100% 30px;
}

/* Layered Texture Effect for sections */
.textured-layer {
    background-image: 
        linear-gradient(rgba(47, 47, 47, 0.95), rgba(47, 47, 47, 0.95)), /* Dark overlay */
        url('images/image_22.jpg'), /* A subtle textured image from picsum for background */
        url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAACzNDidAAAAI0lEQVQIW2NkYGDQgBHqgBhOACIEBv+HGI4A4gwgLQDjXgBfA1G7pQAAAABJRU5ErkJggg=='); /* Tiny noise pattern */
    background-size: cover, cover, 5px 5px;
    background-blend-mode: overlay, normal, multiply;
    background-position: center center, center center, 0 0;
}

/* Hero Section */
.hero-section {
    min-height: 50vh; /* Compact height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-image: url('images/image_23.jpg'); /* Subtle background */
    background-size: cover;
    background-position: center;
    overflow: hidden;
    padding: 100px 0; /* Add padding for content */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(47, 47, 47, 0.7); /* Dark overlay */
    z-index: 1;
}

.noise-overlay {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4" viewBox="0 0 4 4"><filter id="n" x="0" y="0"><feTurbulence type="fractalNoise" baseFrequency="0.75" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="0.07"/></svg>');
    background-size: 100px;
    pointer-events: none;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 4.5rem;
    color: var(--tan);
    margin-bottom: 20px;
    text-shadow: 4px 4px 6px rgba(0, 0, 0, 0.6);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--off-white);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

/* About Section */
.about-section {
    background-color: var(--background-dark); /* Ensure background for torn edge */
    padding-bottom: 120px; /* Extra padding for torn edge */
}

.about-section .two-column-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.about-text-column {
    flex: 2;
}

.about-image-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-image-column img {
    width: 100%;
    height: auto;
    display: block;
    border: 3px solid var(--moss-green);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease-in-out;
}

.about-image-column img:hover {
    transform: scale(1.03) rotate(-2deg);
    border-color: var(--rust);
}

/* Services Section */
.services-section {
    padding-top: 100px; /* Account for torn edge */
    text-align: center;
}

.services-section h2 {
    margin-bottom: 2rem;
}

.service-blocks {
    display: flex;
    flex-direction: column;
    gap: 60px;
    margin-top: 3rem;
}

.service-block {
    display: flex;
    align-items: center;
    gap: 40px;
    background-color: rgba(55, 55, 55, 0.8);
    padding: 30px;
    border: 1px dashed var(--moss-green);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.service-block::before { /* Torn paper overlay */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="n" x="0" y="0"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="0.1"/></svg>');
    background-size: cover;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.service-block.reverse {
    flex-direction: row-reverse;
}

.service-image {
    flex: 1;
    min-width: 300px;
}

.service-image img {
    width: 100%;
    height: auto;
    display: block;
    border: 4px double var(--rust);
    filter: saturate(0.8) contrast(1.1);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.service-image img:hover {
    filter: saturate(1) contrast(1.2) brightness(1.1);
    transform: scale(1.02);
}

.service-text {
    flex: 2;
    text-align: left;
}

/* Programs Section (with Tabs) */
.programs-section {
    background-color: var(--charcoal);
    padding-bottom: 100px; /* Account for torn edge */
}

.programs-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.tab-container {
    margin-top: 3rem;
    background-color: rgba(55, 55, 55, 0.8);
    border: 1px solid var(--moss-green);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    padding: 30px;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--dark-gray-text);
}

.tab-button {
    background-color: transparent;
    border: none;
    padding: 15px 30px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--off-white);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    position: relative;
    z-index: 2;
}

.tab-button::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background-color: var(--moss-green);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-button:hover,
.tab-button.active {
    color: var(--accent-color);
}

.tab-button.active::after {
    transform: scaleX(1);
    background-color: var(--accent-color);
}

.tab-pane {
    display: none;
    padding: 20px 0;
}

.tab-pane.active {
    display: block;
}

.program-content.two-column-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.program-text {
    flex: 2;
}

.program-image {
    flex: 1;
    min-width: 300px;
}

.program-image img {
    width: 100%;
    height: auto;
    display: block;
    border: 3px solid var(--rust);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.4);
    filter: grayscale(0.2) contrast(1.1);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.program-image img:hover {
    filter: grayscale(0) contrast(1.2) brightness(1.1);
    transform: scale(1.03);
}


/* Gallery Section */
.gallery-section {
    background-color: var(--background-dark); /* Ensure background for torn edge */
    padding-bottom: 120px; /* Extra padding for torn edge */
    text-align: center;
}

.filter-buttons {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-button {
    background-color: var(--moss-green);
    border: 2px solid var(--moss-green);
    color: var(--off-white);
    padding: 10px 25px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.filter-button:hover,
.filter-button.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--off-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Exactly 3 cards per row */
    gap: 30px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--dark-gray-text);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    filter: grayscale(0.5) brightness(0.8) contrast(1.1);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: grayscale(0) brightness(1) contrast(1.2);
}

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(139, 58, 45, 0.7); /* Rust color overlay */
    color: var(--off-white);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    text-transform: uppercase;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(100%);
}

.gallery-item:hover .overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Lightbox */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    padding-top: 60px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.9); /* Black w/ opacity */
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    border: 5px solid var(--tan);
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 1; }
    to { transform: scale(1); opacity: 1; }
}

.close-button {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--off-white);
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: var(--off-white);
    cursor: pointer;
    padding: 16px;
    transition: 0.3s;
    user-select: none;
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.lightbox-nav:hover {
    color: var(--accent-color);
}

/* Testimonials Section */
.testimonials-section {
    padding-top: 100px;
    text-align: center;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Exactly 3 cards per row */
    gap: 30px;
    margin-top: 40px;
}

.testimonial-card {
    background-color: rgba(55, 55, 55, 0.9);
    padding: 30px;
    border: 1px solid var(--moss-green);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.testimonial-card::before { /* Ink splatter effect */
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 120%;
    height: 120%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><filter id="splatter"><feTurbulence type="fractalNoise" baseFrequency="0.05" numOctaves="2" result="noise"/><feDiffuseLighting in="noise" lightingColor="%234A5B4A" surfaceScale="5"><feDistantLight azimuth="225" elevation="45"/></feDiffuseLighting></filter><rect width="100%" height="100%" fill="none" filter="url(%23splatter)" opacity="0.3"/></svg>');
    background-size: cover;
    pointer-events: none;
    mix-blend-mode: overlay;
    z-index: 0;
}

.testimonial-card > * {
    position: relative;
    z-index: 1; /* Ensure content is above splatter */
}

.testimonial-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--rust);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.testimonial-card h3 {
    font-size: 1.8rem;
    color: var(--tan);
    margin-bottom: 0.5rem;
}

.testimonial-card .rating {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.testimonial-card p {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--off-white);
}

/* Newsletter Section */
.newsletter-section {
    background-color: var(--background-dark); /* Ensure background for torn edge */
    padding-bottom: 120px; /* Extra padding for torn edge */
}

.newsletter-layout {
    display: flex;
    gap: 40px;
}

.main-content-area {
    flex: 2;
}

.sidebar-newsletter {
    flex: 1;
    background-color: rgba(55, 55, 55, 0.9);
    padding: 30px;
    border: 1px dashed var(--rust);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.sidebar-newsletter::before { /* Worn paper background */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="n" x="0" y="0"><feTurbulence type="fractalNoise" baseFrequency="0.5" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="0.15"/></svg>');
    background-size: cover;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.sidebar-newsletter > * {
    position: relative;
    z-index: 1;
}

.sidebar-newsletter h3 {
    color: var(--tan);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.sidebar-newsletter p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--off-white);
}

.sidebar-cta-text {
    font-style: italic;
    margin-top: 2rem;
    font-size: 1.1rem;
    color: var(--tan);
}


/* Contact Section */
.contact-section {
    padding-top: 100px;
    text-align: center;
}

.map-container {
    position: relative;
    width: 100%;
    height: 400px; /* Large map height */
    margin-top: 40px;
    border: 4px solid var(--moss-green);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.map-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.7) contrast(1.1) brightness(0.7); /* Grunge map look */
}

.contact-info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(47, 47, 47, 0.85); /* Dark semi-transparent overlay */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    text-align: center;
    backdrop-filter: blur(2px);
}

.contact-info-overlay h3 {
    color: var(--tan);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.contact-info-overlay p {
    font-size: 1.1rem;
    color: var(--off-white);
    max-width: 600px;
}

.generic-location {
    font-style: italic;
    margin-top: 20px;
    font-size: 1rem;
    color: var(--moss-green);
}

/* Footer */
.footer {
    background-color: var(--dark-gray-text);
    padding: 30px 0;
    text-align: center;
    color: var(--tan);
    font-family: var(--font-body);
    border-top: 1px solid var(--moss-green);
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
}

.footer-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav ul li {
    margin-left: 20px;
}

.footer-nav ul li::before {
    content: none;
}

.footer-nav a {
    color: var(--tan);
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--off-white);
    transform: none; /* Override general link transform */
}


/* Responsive Design */
@media (max-width: 992px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.2rem; }
    h3 { font-size: 1.8rem; }

    .header .container {
        flex-direction: column;
        text-align: center;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 15px;
    }

    .main-nav ul li {
        margin: 0 10px 10px 10px;
    }

    .about-section .two-column-layout,
    .service-block,
    .service-block.reverse,
    .program-content.two-column-layout,
    .newsletter-layout {
        flex-direction: column;
    }

    .about-image-column,
    .service-image,
    .program-image {
        min-width: unset;
        width: 100%;
    }

    .gallery-grid,
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.6rem; }

    .hero-content p {
        font-size: 1rem;
    }

    .main-nav a {
        font-size: 1rem;
    }

    .tab-buttons {
        flex-wrap: wrap;
    }

    .tab-button {
        padding: 10px 15px;
        font-size: 1.2rem;
    }

    .gallery-grid,
    .testimonial-grid {
        grid-template-columns: 1fr; /* Stacks cards on mobile */
    }

    .filter-buttons {
        flex-direction: column;
    }

    .filter-button {
        width: 100%;
        margin-bottom: 10px;
    }

    .footer .container {
        flex-direction: column;
    }

    .footer-nav ul {
        margin-top: 15px;
    }

    .footer-nav ul li {
        margin: 0 10px;
    }

    .contact-info-overlay h3 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .site-logo a {
        font-size: 2rem;
    }

    .main-nav ul li {
        margin: 0 5px 10px 5px;
    }

    .main-nav a {
        font-size: 0.9rem;
    }

    .tab-button {
        font-size: 1rem;
        padding: 8px 10px;
    }

    .contact-info-overlay h3 {
        font-size: 1.8rem;
    }
}

/* 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: Smooth scroll CSS fallback */
html { scroll-behavior: smooth; }

/* Safe visibility overrides (auto-added) */
:root, html, body, main, header, footer, section, .container, .content {
  opacity: 1 !important;
  visibility: visible !important;
}
