/*
Theme Name: Modern Portfolio
Theme URI: https://example.com/modern-portfolio
Author: Antigravity
Author URI: https://google.com
Description: A minimalist, high-performance portfolio theme.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: modern-portfolio
*/

:root {
    /* Color Palette: Strict Black & White */
    --color-bg: #ffffff;
    --color-text: #111111;
    --color-primary: #000000;
    --color-secondary: #666666;
    --color-border: #e5e5e5;

    /* Typography */
    --font-heading: 'Alata', sans-serif;
    --font-body: 'Roboto Slab', serif;

    /* Typography Sizes */
    --hero-title-size: 3.5rem;
    --hero-excerpt-size: 1.25rem;
    --section-title-size: 3rem;
    --section-subtitle-size: 1.2rem;
    --service-card-title: 1.25rem;
    --service-card-text: 0.95rem;

    /* Spacing */
    --section-padding: 4rem;
    --gap-large: 3rem;
    --gap-medium: 2rem;
    --gap-small: 1rem;

    --container-width: 1200px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #111111;
        --color-text: #ffffff;
        --color-primary: #ffffff;
        --color-secondary: #a0a0a0;
        --color-border: #333333;
    }
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.7;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-top: 0;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    /* Ensure container takes available width up to max */
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */
/* Header Structure */
.header-container {
    position: relative;
    display: flex;
    justify-content: center;
    /* Center logo by default */
    align-items: center;
    height: 60px;
    /* Fixed height for calculations */
    width: 100%;
}

.site-header {
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: background-color 0.4s ease, padding 0.3s ease;
    border-bottom: none;
}

.site-header.scrolled {
    background-color: var(--color-bg);
    padding: 0.5rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-bottom: none;
}

/* Logo Styling */
.site-branding {
    position: absolute;
    left: 50%;
    top: 50%;
    /* Vertically center */
    transform: translate(-50%, -50%);
    /* Center exact point */
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1002;
    white-space: nowrap;
    line-height: 1;
}

.site-title a {
    text-decoration: none;
    font-weight: 700;
    font-size: 1.8rem;
    transition: color 0.3s ease;
    display: block;
}

/* Menu Toggle (Hamburger) */
.menu-toggle {
    display: block;
    position: absolute;
    right: 1rem;
    top: 50%;
    /* Vertically center */
    transform: translateY(-50%);
    /* Adjust for height itself */
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1003;
    padding: 10px;
    font-size: 1.5rem;
    color: #fff;
    transition: color 0.3s ease, transform 0.3s ease;
    line-height: 1;
}

.menu-toggle:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Main Navigation (The Menu Items) */
.main-navigation {
    position: absolute;
    top: 50%;
    right: 4rem;
    /* Position correctly next to toggle (which is at right: 1rem) */
    left: auto;
    /* Reset left */
    transform: translate(-30px, -50%);
    /* Start slightly left for animation */
    opacity: 0;
    visibility: hidden;
    width: auto;
    transition: all 0.4s ease;
    z-index: 1001;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
    justify-content: flex-end;
    /* Align items to right */
}

.main-navigation ul li {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.4s ease;
}

.main-navigation a {
    font-family: 'Alata', sans-serif;
    /* User Request */
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    /* Alata is usually 400 */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================
   Active State (.menu-open)
   ============================ */

/* 1. Logo Slides Left */
.site-header.menu-open .site-branding {
    left: 1rem;
    /* Move to left edge padded */
    transform: translate(0, -50%);
    /* Preserve Top 50% shift */
}

/* 2. Menu Appears (Stays Right) */
.site-header.menu-open .main-navigation {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
    /* Move to final position */
}

/* 3. Menu Items Stagger In */
.site-header.menu-open .main-navigation ul li {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger delays */
.site-header.menu-open .main-navigation ul li:nth-child(1) {
    transition-delay: 0.2s;
}

.site-header.menu-open .main-navigation ul li:nth-child(2) {
    transition-delay: 0.3s;
}

.site-header.menu-open .main-navigation ul li:nth-child(3) {
    transition-delay: 0.4s;
}

.site-header.menu-open .main-navigation ul li:nth-child(4) {
    transition-delay: 0.5s;
}

.site-header.menu-open .main-navigation ul li:nth-child(5) {
    transition-delay: 0.6s;
}


/* Color Logic for States */

/* Default (Transparent/Dark Bg) - Always White unless scrolled */
.site-header:not(.scrolled) .site-title a,
.site-header:not(.scrolled) .menu-toggle,
.site-header:not(.scrolled) .main-navigation a {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Scrolled -> Dark Text */
.site-header.scrolled .site-title a,
.site-header.scrolled .menu-toggle,
.site-header.scrolled .main-navigation a {
    color: var(--color-text);
    text-shadow: none;
}

/* Ensure Logo keeps color on interaction */
.site-title a:hover,
.site-title a:focus,
.site-title a:active,
.site-title a:visited {
    color: inherit;
    /* Inherit from the parent rule above */
}

/* Unused post grid styles removed for cleaner codebase */

/* =========================
   Hero Slider Styles
   ========================= */
.hero-slider {
    position: relative;
    height: 100vh;
    /* Already full height */
    width: 100%;
    overflow: hidden;
    background-color: var(--color-bg);
    /* For consistency with other fullpage sections */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.slide-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #ffffff;
    padding: 0 1rem;
    max-width: 800px;
    animation: slideUp 1s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-excerpt {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.slide-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #ffffff;
    color: #111111;
    text-decoration: none;
    font-weight: 700;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.slide-btn:hover {
    background-color: #111111;
    color: #ffffff;
}

/* Slider Navigation */
/* Slider Navigation */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    /* Transparent background */
    border: none;
    /* No Border */
    color: white;
    /* Only white arrow */
    font-size: 3rem;
    /* Larger icon since no box */
    padding: 0 1rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    opacity: 0.7;
    /* Slight transparency by default */
}

.slider-nav:hover {
    background: transparent;
    /* Keep transparent on hover */
    color: white;
    opacity: 1;
    /* Full visibility on hover */
    transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev {
    left: 2rem;
}

.slider-nav.next {
    right: 2rem;
}


/* =========================
   New Sections Styling - FULL PAGE
   ========================= */

/* Common Section Styles for Full Page Effect */
.section-padding,
.dark-section {
    min-height: 100vh;
    /* Force full viewport height */
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center content vertically */
    padding: 4rem 0;
    /* Add padding for safe areas */
    box-sizing: border-box;
    position: relative;
}

.text-center {
    text-align: center;
}

.mb-5 {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 4rem;
}

/* Darker grey */
.bg-light {
    background-color: #f9f9f9;
    color: #111111;
    /* Force dark text explicitly */
}

/* Explicitly target headings inside light bg to override dark mode vars */
.bg-light h1,
.bg-light h2,
.bg-light h3,
.bg-light h4,
.bg-light h5,
.bg-light h6,
.bg-light .section-title,
.bg-light .section-subtitle {
    color: #000000 !important;
}

/* Dark Section (Stats & CTA) */
.dark-section {
    background-color: #111;
    color: #ffffff;
}

.dark-section h2,
.dark-section .stat-number {
    color: #ffffff;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.service-card {
    background: #fff;
    padding: 1.5rem;
    /* Reduced padding */
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    text-align: left;
    transition: transform 0.3s ease;
    border: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
    /* justify-content: space-between; Removed to prevent stretching */
}

.service-card:hover {
    transform: translateY(-5px);
    /* Reduced hover movement */
    border-color: #ccc;
}

.service-icon {
    font-size: 2rem;
    color: #000;
    background: #f4f4f4;
    width: 60px;
    /* Smaller icon box */
    height: 60px;
    line-height: 60px;
    text-align: center;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #111;
}

.service-card p {
    color: #444;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    /* flex-grow: 1; Removed to compact height */
}

.service-link {
    text-decoration: none;
    color: #000;
    font-weight: 700;
    font-size: 0.9rem;
    transition: color 0.2s;
    border-bottom: 2px solid transparent;
    margin-top: auto;
    /* Push to bottom if height exists, otherwise just space */
}

.service-link:hover {
    color: #444;
    border-bottom-color: #000;
}

.service-link i {
    margin-left: 5px;
    font-size: 0.8rem;
}


/* Stats Grid */
.stats-grid {
    display: grid;
    /* Smart Grid: Adapts columns based on available width */
    /* minmax(220px, 1fr) ensures a good balance between density and readability */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    text-align: center;
    width: 100%;
    align-items: center;
}

.stat-item {
    padding: 1.5rem;
    transition: transform 0.3s ease;
    /* Enable Container Queries: The element measures itself */
    container-type: inline-size;
    container-name: stat-card;
    width: 100%;
    /* Ensure it fills the grid cell */
    box-sizing: border-box;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    display: block;
    /* Fluid Type: 25% of the container width, clamped for safety */
    /* This automatically scales text down if there are more items (smaller columns) 
       and scales up if there are fewer items (wider columns). */
    font-size: clamp(2rem, 25cqw, 5rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.stat-label {
    font-size: clamp(0.9rem, 6cqw, 1.25rem);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ccc;
    font-weight: 500;
}


/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    width: 100%;
}

.about-content p {
    font-size: 1.15rem;
    /* Slightly larger */
    font-weight: 400;
    /* Normal weight, not 300 */
    color: #000000;
    /* Absolute black */
    margin-bottom: 1.5rem;
    line-height: 1.8;
    /* Better line spacing */
}

@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.check-list {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.check-list li {
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    color: #222;
}

.check-list i {
    color: #000;
    font-size: 1.2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.gallery-grid img {
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


/* Brands Section */
.brands-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    /* Reduced from 4rem */
    flex-wrap: wrap;
    align-items: center;
    opacity: 0.8;
    /* Increased opacity slightly for visibility */
    width: 100%;
}

.brand-item {
    /* Removed border and padding */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    /* Base width for larger logos */
    height: 100px;
    /* Fixed container height for alignment */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.brand-logo {
    max-width: 100%;
    /* Responsive to container */
    max-height: 80%;
    /* Ensure it fits nicely vertically */
    height: auto;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    /* Optional: clean look */
    transition: filter 0.3s ease;
}

.brand-item:hover {
    transform: scale(1.05);
    /* Subtle pop */
}

.brand-item:hover .brand-logo {
    filter: grayscale(0%);
    /* Color on hover */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .brands-grid {
        gap: 1rem;
    }

    .brand-item {
        width: 120px;
        /* Smaller on mobile */
        height: 80px;
    }
}


/* CTA Section */
.cta-section h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.cta-section p {
    color: #ddd;
    margin-bottom: 3rem;
    font-size: 1.25rem;
}

.contact-preview {
    margin-bottom: 3rem;
    font-size: 1.2rem;
    color: #fff;
}

.contact-preview span {
    margin: 0 1.5rem;
    display: inline-block;
}

.contact-preview i {
    margin-right: 10px;
}

.btn-outline-white {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    border: 2px solid #fff;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.btn-outline-white:hover {
    background: #fff;
    color: #000;
}

/* =========================
   Single Service Template Styling
   ========================= */

/* Service Hero */
.service-hero {
    position: relative;
    height: 100vh;
    /* Full Screen Impact */
    width: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-top: 0;
    /* Header is fixed/transparent */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-icon-wrapper {
    display: inline-block;
    background: #fff;
    color: #000;
    width: 80px;
    height: 80px;
    line-height: 80px;
    font-size: 2.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.service-hero .entry-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.service-excerpt {
    font-size: 1.25rem;
    color: #ddd;
    line-height: 1.6;
}

/* Service Body Content Styling */
.service-body {
    padding: 5rem 0;
    min-height: auto;
    /* Allow auto height for content */
}

/* Custom List Styles for Content (Simulate Screenshots) */
/* Use Gutenberg List Block with custom classes if possible, or target standard lists */

/* Checkbox Grid (Reference: "Neler Sunuyoruz") */
/* Users should use Unordered List */
.service-content-wrapper ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 3rem 0;
}

.service-content-wrapper ul li {
    background: #fff;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    font-weight: 500;
    display: flex;
    align-items: center;
    color: #333;
}

.service-content-wrapper ul li::before {
    content: '\f00c';
    /* FontAwesome Check */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 1rem;
    color: #000;
    font-size: 1.2rem;
    background: #f0f0f0;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
}

@media (max-width: 768px) {
    .service-content-wrapper ul {
        grid-template-columns: 1fr;
    }
}


/* Process Steps (Reference: "Çalışma Sürecimiz") */
/* Users should use Ordered List */
.service-content-wrapper ol {
    list-style: none;
    counter-reset: step-counter;
    padding: 0;
    margin: 3rem 0;
}

.service-content-wrapper ol li {
    position: relative;
    background: #fff;
    padding: 2rem 2rem 2rem 5rem;
    /* Left padding for number */
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    font-size: 1.1rem;
    color: #444;
}

.service-content-wrapper ol li strong {
    display: block;
    font-size: 1.25rem;
    color: #000;
    margin-bottom: 0.5rem;
}

.service-content-wrapper ol li::before {
    counter-increment: step-counter;
    content: counter(step-counter) ".";
    position: absolute;
    left: 1.5rem;
    top: 1.8rem;
    font-size: 2rem;
    font-weight: 900;
    color: #000;
    opacity: 0.2;
}

/* Headings in content */
.service-content-wrapper h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-top: 4rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.service-content-wrapper h2:first-child {
    margin-top: 0;
}

/* =========================
   Block Patterns Styling
   ========================= */

/* Info Cards (Why Choose Us) */
.info-card-section {
    padding: 2rem 0;
}

.info-card-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    /* Flex gap is very reliable */
    max-width: 1000px;
    margin: 0 auto;
}

.info-card {
    background: #fff;
    padding: 2.5rem;
    /* Increased padding for chunkier look */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 2rem;
    /* Fallback spacing */
    width: 100%;
    /* Ensure full width */
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.info-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #111;
}

.info-card p {
    font-size: 1rem;
    color: #555;
    margin: 0;
    line-height: 1.6;
}

/* Custom Icon Block/Shortcode Styling */
.theme-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #f5f5f5;
    color: #111;
    border-radius: 50%;
    font-size: 1.5rem;
    margin-right: 15px;
    margin-bottom: 1rem;
    /* Spacing if block */
}

/* =========================
   About Gallery Grid
   ========================= */
.about-gallery {
    display: grid;
    gap: 1.5rem;
    width: 100%;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: block;
    /* Remove bottom space */
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 100%;
}

/* Hover Overlay - Bottom Label Style */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    top: auto;
    background: transparent;
    /* No curtain */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    padding: 1.5rem 1rem;
    box-sizing: border-box;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-title {
    color: #fff;
    font-size: 0.85rem;
    /* Smaller font */
    font-weight: 600;
    text-align: center;
    border: none;
    padding: 0.4rem 1.2rem;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.75);
    /* Semi-transparent bg behind text */
    backdrop-filter: blur(4px);
    border-radius: 50px;
    /* Pill shape */
    transform: translateY(10px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.gallery-item:hover .gallery-title {
    transform: translateY(0);
}

.gallery-img:hover {
    transform: scale(1.05);
    /* Slightly stronger zoom */
}

/* Dynamic Grid Layouts based on Image Count */
.gallery-count-1 .about-gallery {
    grid-template-columns: 1fr;
}

.gallery-count-1 .gallery-img {
    max-height: 500px;
}

.gallery-count-2 .about-gallery {
    grid-template-columns: 1fr 1fr;
}

.gallery-count-3 .about-gallery {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.gallery-count-3 .item-1 {
    grid-row: span 2;
    height: 100%;
}

.gallery-count-4 .about-gallery {
    grid-template-columns: 1fr 1fr;
}

.gallery-count-5 .about-gallery {
    display: flex;
    /* Fallback for 5 items */
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.gallery-count-5 .gallery-item {
    width: calc(33.33% - 1rem);
    height: 250px;
    flex-grow: 1;
}

.gallery-count-6 .about-gallery {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .about-gallery {
        grid-template-columns: 1fr !important;
    }

    .gallery-count-5 .gallery-item {
        width: 100%;
    }
}

/* =========================
   Brands Grid (Dynamic)
   ========================= */
.brands-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    padding: 2rem 0;
}

.brand-item {
    flex: 0 1 150px;
    /* Base width */
    text-align: center;
    transition: transform 0.3s ease;
}

.brand-item a {
    display: block;
    opacity: 0.6;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.brand-item a:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.1);
}

.brand-logo {
    max-width: 100%;
    height: auto;
    max-height: 50px;
    /* Uniform height constraint */
    object-fit: contain;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .brands-grid {
        gap: 2rem;
    }

    .brand-item {
        flex: 0 1 120px;
    }
}