:root {
    --background-dark: #0a0a0a;
    --background-light: #121212;
    --accent-red: #a7000c;
    --accent-gray: #2a2a2a;
    --text-primary: #f1f1f1;
    --text-secondary: #a0a0a0;
    --transition: all 0.3s ease;
    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 300;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Header styles */
header {
    position: fixed;
    width: 100%;
    z-index: 1000;
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

header.scrolled {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    transition: padding 0.3s ease;
}

header.scrolled .header-container {
    padding: 0.6rem 5%;
}

.logo {
    position: relative;
    z-index: 2;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--accent-red);
    border-radius: 50%;
    margin-right: 15px;
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotateY(180deg);
}

.logo h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
}

.logo h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-red);
    transition: width 0.3s ease;
}

.logo:hover h1::after {
    width: 100%;
}

/* Navigation */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 3.5rem;
    position: relative;
}

.nav-link {
    font-family: var(--font-heading);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.5rem;
    padding: 0.7rem 0;
    display: block;
    position: relative;
    transition: color 0.3s ease;
    letter-spacing: 0.5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-red);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-red);
}

.nav-link:hover::after,
.nav-link:focus::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Hero section */
.hero {
    min-height: 100vh; /* Changed from height to min-height */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 5% 100px; /* Added top and bottom padding */
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    background-image: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.4) 5%, transparent 5%, transparent 5%, rgba(0, 0, 0, 0.4) 5%, rgba(0, 0, 0, 0.4) 5%, transparent 5%, transparent),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%5' height='100%5' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-size: 50px 50px, 200px 200px;
    opacity: 0.20;
    z-index: 1;
    pointer-events: none;
}

/* Add additional striped overlay */
.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        -45deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 2px,
        transparent 2px,
        transparent 6px
    );
    z-index: 1;
    pointer-events: none;
}

.hero-background video,
.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease;
    z-index: 0;
}

.hero-background .active {
    opacity: 1;
}

.hero-content {
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem; /* Reduced gap from 3rem to 2rem */
    padding: 2rem 0; /* Added padding to create space */
}

.hero-text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

.title-line {
    font-size: calc(3rem + 2vw); /* Responsive font size instead of fixed 5.5rem */
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -2px;
    overflow: hidden;
    display: block;
    transform: translateY(100%);
    opacity: 0;
    animation: slideUp 0.8s forwards;
}

.title-line:first-child {
    animation-delay: 0.3s;
}

.title-line:last-child {
    animation-delay: 0.5s;
}

.accent {
    color: var(--accent-red);
    position: relative;
    display: inline-block;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2), -2px -2px 0 rgba(0, 0, 0, 0.2), -2px 2px 0 rgba(0, 0, 0, 0.2), 2px -2px 0 rgba(0, 0, 0, 0.2);
    padding: 0 0.1em;
}

.accent::after {
    content: '';
    position: absolute;
    bottom: 0.1em;
    left: -0.1em;
    width: 0;
    height: 0.1em;
    background-color: var(--accent-red);
    animation: lineExpand 1s 1s forwards;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-subtitle span {
    font-size: calc(1rem + 0.3vw); /* Responsive font size */
    font-weight: 300;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.line-1 {
    animation: fadeInUp 0.8s 0.7s forwards;
}

.line-2 {
    animation: fadeInUp 0.8s 0.9s forwards;
}

/* Hero action button */
.hero-action {
    margin-top: 0.5rem; /* Reduced from 1rem */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s 1.1s forwards, bounce 1s ease-in-out 2s infinite;
}

.btn {
    font-family: var(--font-heading);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-red);
    color: var(--text-primary);
    padding: 1rem 2.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transform: skewX(-25deg);
    transition: all 0.5s;
    z-index: -1;
}

.btn:hover {
    background-color: #c62f3b;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3);
}

.btn:hover::before {
    width: 100%;
}

.btn-text {
    margin-right: 0.8rem;
    font-size: 1.2rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateX(0);
    transition: transform 0.3s;
}

.btn:hover .btn-icon {
    transform: translateX(5px);
}

/* Hero stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: clamp(2rem, 4vw, 4rem); /* Responsive gap */
    margin-top: 0.5rem; /* Reduced from 1rem */
    width: 100%;
    opacity: 0;
    animation: fadeIn 1s 1.3s forwards;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: calc(2rem + 1vw); /* Responsive font size instead of fixed 3.8rem */
    font-weight: 700;
    color: var(--accent-red);
    line-height: 0.9;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    text-shadow: 2px 2px 0px rgb(0 0 0 / 70%);
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

/* Gallery section */
.gallery {
    padding: 6rem 5% 3rem;
    background-color: var(--background-light);
    position: relative; /* Added to ensure proper stacking context */
    z-index: 2; /* Added to ensure it's above hero section */
}

.gallery h2,
.details h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    letter-spacing: -0.5px;
}

.gallery h2::after,
.details h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 25%;
    width: 50%;
    height: 3px;
    background-color: var(--accent-red);
}

.filter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.filter-group h4 {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    font-family: var(--font-heading);
    background-color: transparent;
    border: 1px solid var(--accent-gray);
    color: var(--text-secondary);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--accent-red);
    border-color: var(--accent-red);
    color: var(--text-primary);
}

.color-btn.active[data-filter="red"] {
    background-color: #e63946;
    border-color: #e63946;
}

.color-btn.active[data-filter="black"] {
    background-color: #212121;
    border-color: #212121;
}

.masonry-gallery {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 10px;
    grid-gap: 15px;
    width: 100%;
}

.gallery-item {
    grid-column-end: span var(--col-span, 4);
    grid-row-end: span var(--row-span);
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--background-light);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.5s ease;
}

.gallery-item img.loaded {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.gallery-item-overlay p {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--text-secondary);
}

/* Loading states */
.placeholder-loading {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--background-light) 0%, var(--accent-gray) 50%, var(--background-light) 100%);
    background-size: 200% 100%;
    animation: loading-placeholder 1.5s infinite;
    border-radius: 8px;
    z-index: 1;
}

.loading-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-color: var(--background-light);
    color: var(--text-secondary);
    z-index: 1;
    border-radius: 8px;
}

.loading-error i {
    font-size: 2rem;
    color: var(--accent-red);
    margin-bottom: 1rem;
}

.image-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--text-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.image-loading-indicator i {
    font-size: 24px;
    color: var(--text-primary);
}

/* Car details section */
.details {
    padding: 6rem 5% 3rem;
    background-color: var(--background-dark);
}

.car-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 3rem;
}

.car-card {
    flex: 1 1 45%;
    min-width: 300px;
    margin: 1rem;
    background-color: var(--background-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: var(--transition);
}

.car-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.car-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.car-card:hover .car-image img {
    transform: scale(1.05);
}

.car-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    opacity: 0.2;
    pointer-events: none;
    z-index: 1;
}

.car-info {
    padding: 2rem;
}

.car-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.car-info p {
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.car-info ul {
    list-style: none;
}

.car-info ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--accent-gray);
    display: flex;
    justify-content: space-between;
}

.car-info ul li span:first-child {
    font-weight: 500;
    letter-spacing: 0.5px;
}

.car-info .features-list {
    background-color: #1a1a1a;
    margin-top: 10px;
    padding: 10px 20px;
}

/* Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    color: var(--text-primary);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--accent-red);
}

.modal-content {
    margin: 0 auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 70vh;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    object-fit: contain;
    transform: none !important;
}

.modal-caption {
    margin: 20px auto;
    width: 80%;
    max-width: 800px;
    text-align: center;
    color: var(--text-secondary);
    padding: 10px;
}

.modal-caption h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

/* Footer */
footer {
    background-color: var(--background-light);
    padding: 2rem 5%;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-icons a {
    color: var(--text-secondary);
    margin: 0 10px;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--accent-red);
    transform: translateY(-3px);
}

/* Flame animations for hero section */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Ensure content remains visible above animations */
.hero-content {
    position: relative;
    z-index: 10;
}

/* Animations */
@keyframes slideUp {
    0% { transform: translateY(100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes lineExpand {
    0% { width: 0; }
    100% { width: 110%; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes loading-placeholder {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Button bounce animation */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Mobile menu */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(10px);
        transition: right 0.4s ease;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 2rem 2rem;
        z-index: 1;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    }
    
    nav.active {
        right: 0;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .nav-links li {
        margin: 0.7rem 0;
        width: 100%;
        margin-left: 0;
    }
    
    .nav-link {
        font-size: 1.3rem;
        padding: 0.7rem 0;
        width: 100%;
    }
    
    .body-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 0;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .body-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .menu-open {
        overflow: hidden;
    }
}

/* Responsive styles */
@media (max-width: 1920px) {
    /* Specific adjustments for 1920x1080 and similar resolutions */
    .hero {
        padding: 80px 5% 80px;
    }
    
    .hero-content {
        gap: 1.5rem;
    }
    
    .title-line {
        font-size: calc(2.5rem + 1.5vw);
    }
    
    .hero-action {
        margin-top: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-stats {
        gap: 3rem;
    }
    
    .stat-number {
        font-size: calc(2rem + 0.8vw);
    }
}

@media (max-width: 1200px) {
    .gallery-item {
        grid-column-end: span var(--col-span-md, var(--col-span, 4));
    }
    
    .title-line {
        font-size: calc(2rem + 1.5vw);
    }
    
    .hero-content {
        gap: 1.2rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 70px 5% 70px;
    }
    
    .hero-content {
        gap: 1rem;
    }
    
    .title-line {
        font-size: calc(1.8rem + 1.2vw);
    }
    
    .hero-subtitle span {
        font-size: calc(0.8rem + 0.3vw);
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: calc(1.8rem + 0.5vw);
    }
    
    .masonry-gallery {
        grid-template-columns: repeat(6, 1fr);
        grid-gap: 10px;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 60vh;
    }
    
    .modal-caption {
        width: 95%;
        margin: 15px auto;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 60px 5% 60px;
    }
    
    .hero-content {
        gap: 0.8rem;
    }
    
    .title-line {
        font-size: calc(1.5rem + 1vw);
    }
    
    .hero-subtitle span {
        font-size: calc(0.7rem + 0.2vw);
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .stat-number {
        font-size: calc(1.8rem + 0.3vw);
    }
    
    .filter-buttons {
        gap: 0.3rem;
    }
    
    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
    
    .masonry-gallery {
        grid-template-columns: repeat(4, 1fr);
        grid-gap: 8px;
    }
    
    .gallery-item {
        grid-column-end: span var(--col-span-sm, 4);
    }
    
    .image-modal {
        padding: 40px 10px;
    }
    
    .modal-caption h3 {
        font-size: 1.2rem;
    }
    
    .modal-caption p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .masonry-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 8px;
    }
    
    .gallery-item {
        grid-column-end: span 2 !important;
        grid-row-end: span auto;
        margin-bottom: 8px;
    }
    
    .gallery-item-overlay {
        opacity: 1;
        padding: 10px;
        background: rgba(0,0,0,0.7);
        max-height: 40%;
    }
    
    .gallery-item-overlay h3 {
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
    }
    
    .gallery-item-overlay p {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .image-modal {
        padding: 40px 5px 10px;
    }
}

@media (max-width: 360px) {
    .masonry-gallery {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        grid-gap: 16px;
    }
    
    .gallery-item {
        grid-column-end: span 1 !important;
        height: auto !important;
        min-height: 250px !important;
        margin-bottom: 16px;
        display: flex;
        flex-direction: column;
    }
    
    .gallery-item img {
        height: 100%;
        min-height: 200px;
        aspect-ratio: 4/3;
        object-fit: cover;
    }
    
    .gallery-item-overlay {
        position: relative;
        max-height: 35%;
        background: var(--background-dark);
        padding: 10px;
    }
    
    .filter-container {
        margin-bottom: 1.5rem;
    }
    
    .filter-group {
        width: 100%;
        margin-bottom: 0.8rem;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
        margin: 0.2rem;
    }
}

/* Audio player styles */
.sound-samples {
    margin-top: 2rem;
    border-top: 1px solid var(--accent-gray);
    padding-top: 1.5rem;
}

.sound-samples h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.audio-players {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.audio-player-wrapper {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--accent-gray);
}

.audio-player-wrapper h5 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.audio-player-wrapper h5 i {
    margin-right: 0.5rem;
    color: var(--accent-red);
}

/* Plyr custom styling */
.plyr {
    border-radius: 4px;
    --plyr-color-main: var(--accent-red);
    --plyr-audio-controls-background: rgba(30, 30, 30, 0.6);
    --plyr-audio-control-color: var(--text-primary);
    --plyr-audio-control-color-hover: var(--text-primary);
}

.plyr--audio .plyr__control.plyr__tab-focus,
.plyr--audio .plyr__control:hover,
.plyr--audio .plyr__control[aria-expanded=true] {
    background: var(--accent-red);
    color: var(--text-primary);
}

.plyr__control--overlaid {
    background: var(--accent-red);
}

.plyr--full-ui input[type=range] {
    color: var(--accent-red);
}

/* Responsive styles for audio players */
@media (max-width: 576px) {
    .audio-players {
        gap: 1rem;
    }
    
    .audio-player-wrapper {
        padding: 0.8rem;
    }
    
    .audio-player-wrapper h5 {
        font-size: 0.9rem;
    }
}
/* linki na kolor czerwony pogrubiony */
a {
    color: var(--accent-red);
    font-weight: 600;
    text-decoration: none;
}
