/* --- Global Resets & Body --- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* --- 1. Header Hero Background --- */
.hero {
    /* Replace URL with your actual header image path */
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('/blog/gallery-back-img.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect for desktop */
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 20px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* --- 2. Gallery Grid System --- */
.gallery-grid {
    display: grid;
    gap: 25px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Desktop: 4 Columns */
@media (min-width: 1025px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet: 2 Columns */
@media (min-width: 601px) and (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (Android & iPhone): 1 Column */
@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* --- 3. Card Styling & Alignment --- */
.product-card-img,
.product-card-vid {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    /* Ensures all cards in a row are same height */
    border: 1px solid #eee;
}

/* Card Hover Effect */
.product-card-img:hover,
.product-card-vid:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* --- 4. Image/Video Alignment & Glow --- */
.product-gall-img,
.product-gall-vid {
    width: 100%;
    aspect-ratio: 4 / 3;
    /* Keeps all media perfectly aligned */
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.product-gall-img img,
.product-gall-vid video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Prevents stretching */
    transition: all 0.5s ease;
}

/* Image/Video Hover & Glow Effect */
.product-card-img:hover .product-gall-img img,
.product-card-vid:hover .product-gall-vid video {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.product-gall-img:hover {
    cursor: pointer;
    box-shadow: 0 0 20px 5px rgba(52, 152, 219, 0.6);
    /* The Glow Effect */
}

/* --- 5. Dynamic H2 Colors (Different for every card) --- */
/* This cycles through 6 colors automatically */
.gallery-grid>div:nth-child(6n+1) h2 {
    color: #e74c3c;
}

/* Red */
.gallery-grid>div:nth-child(6n+2) h2 {
    color: #2ecc71;
}

/* Green */
.gallery-grid>div:nth-child(6n+3) h2 {
    color: #3498db;
}

/* Blue */
.gallery-grid>div:nth-child(6n+4) h2 {
    color: #f1c40f;
}

/* Yellow/Gold */
.gallery-grid>div:nth-child(6n+5) h2 {
    color: #9b59b6;
}

/* Purple */
.gallery-grid>div:nth-child(6n+6) h2 {
    color: #e67e22;
}

/* Orange */

.titly {
    font-size: 1.25rem;
    margin: 15px 0 10px 0;
    line-height: 1.2;
    min-height: 3rem;
    /* Aligns titles across cards */
}

.product-name p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
    /* Pushes button to bottom if text is short */
}

/* --- 6. Button Hover Effect --- */
.enq {
    background-color: #2c3e50;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.enq:hover {
    background-color: #34495e;
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Proper alignment for the button container */
.d-flex {
    display: flex;
    margin-top: auto;
    /* Always sticks button to the bottom */
}