/*
    =====================================================================
    BRANDS PAGE STYLESHEET
    ---------------------------------------------------------------------
    Purpose:
    - Defines brands.html-specific UI/UX and responsive behavior.
    - Covers hero, expandable brand tiles, and product category cards.
    - Accordion open/close behavior is controlled by inline JS in brands.html.
    =====================================================================
*/

/* ── HERO ───────────────────────────────────────────────── */
/* Hero banner introducing distributed brand portfolio. */
.brands-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 100px 8% 0;
    position: relative;
    overflow: hidden;
}

/* Decorative radial accent to add depth to the hero background. */
.brands-hero::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(78, 179, 246, 0.12) 0%,
        transparent 70%
    );
    pointer-events: none;
}

/* Z-indexed content wrapper above decorative background layer. */
.brands-hero-content {
    position: relative;
    z-index: 1;
    max-width: 620px;
    padding-bottom: 60px;
}

/* Hero eyebrow text style. */
.brands-hero-eyebrow {
    font-size: 16px;
    font-weight: 600;
    color: #4eb3f6;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Hero main title with responsive scaling. */
.brands-hero-title {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 700;
    color: white;
    line-height: 1.1;
    margin-bottom: 20px;
}

/* Emphasis style for highlighted hero text. */
.brands-hero-title em {
    font-style: italic;
    color: #4eb3f6;
}

/* Hero supporting paragraph. */
.brands-hero-sub {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    max-width: 500px;
}

/* Stats shelf */
/* Docked stats row beneath hero content. */
.brands-hero-stats {
    position: relative;
    z-index: 1;
    display: flex;
    background: white;
    border-radius: 12px 12px 0 0;
    margin: 0 -8% -1px;
    padding: 0 8%;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

/* Individual stat tile with divider and hover tint. */
.brands-hero-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 16px;
    border-right: 1px solid #eee;
    transition: background 0.25s;
}

/* Remove divider on final stat tile. */
.brands-hero-stat:last-child {
    border-right: none;
}
/* Hover feedback for stat tiles. */
.brands-hero-stat:hover {
    background: #f0f8ff;
}

/* Stat number style shared within this page. */
.stat-num {
    font-size: 32px;
    font-weight: 700;
    color: #4eb3f6;
    line-height: 1;
}

/* Stat label style shared within this page. */
.stat-label {
    font-size: 12px;
    color: #888;
    font-weight: 500;
    margin-top: 6px;
    text-align: center;
}

/* ── BRAND GRID SECTION ─────────────────────────────────── */
/* Main section containing expandable brand tiles. */
.brands-section {
    padding: 100px 8% 80px;
    background: #ffffff;
}

/* Centered heading group above tile grid. */
.brands-section-header {
    text-align: center;
    margin-bottom: 60px;
}

/* Section eyebrow style. */
.brands-eyebrow {
    font-size: 16px;
    font-weight: 600;
    color: #4eb3f6;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: -10px;
}

/* Section headline style. */
.brands-headline {
    font-size: clamp(28px, 3.5vw, 44px);
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

/* Emphasis style for highlighted words in section heading. */
.brands-headline em {
    font-style: italic;
    color: #4eb3f6;
}

/* ── BRAND GRID ─────────────────────────────────────────── */
/* 4-column grid for brand tiles on desktop widths. */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
    align-items: start;
}

/* Each tile is a two-part component: logo card + expandable panel. */
.brand-tile {
    display: flex;
    flex-direction: column;
    border: 1px solid #e8eef4;
    border-radius: 16px;
    overflow: hidden;
}

/* ── LOGO CARD ──────────────────────────────────────────── */
/* Tile top area showing brand mark and toggle control. */
.brand-tile-inner {
    position: relative;
    background: white;
    padding: 60px 48px 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    cursor: pointer;
    transition: background 0.25s ease;
}

/* Open or hover states tint tile background for affordance. */
.brand-tile.is-open .brand-tile-inner,
.brand-tile-inner:hover {
    background: #f0f8ff;
}

/* Logo alignment wrapper ensuring consistent centering. */
.brand-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 170px;
    width: 100%;
    overflow: hidden;
}

/* Logo rendering defaults with subtle grayscale until interaction. */
.brand-logo-wrap img {
    max-width: 90%;
    max-height: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(15%);
    opacity: 0.88;
    transition: all 0.3s ease;
}

/* Interactive logo state (full color + slight scale). */
.brand-tile-inner:hover .brand-logo-wrap img,
.brand-tile.is-open .brand-logo-wrap img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.06);
}

/* BBQ text logo fallback */
/* Optional fallback styles when SVG/image mark is not used. */
.brand-logo-text {
    flex-direction: column;
    gap: 10px;
}

/* Fallback logo stack layout. */
.bbq-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Fallback logo icon dimensions. */
.bbq-logo svg {
    width: 70px;
    height: 70px;
}

/* Fallback logo text styling. */
.bbq-logo span {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── TOGGLE BUTTON ──────────────────────────────────────── */
/* Circular expand/collapse trigger in lower-right tile corner. */
.brand-toggle {
    position: absolute;
    bottom: 16px;
    right: 18px;
    width: 32px;
    height: 32px;
    background: none;
    border: 1.5px solid #c8d8e8;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    color: #888;
}

/* Plus/close symbol styling inside toggle button. */
.toggle-icon {
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    display: block;
    margin-top: -1px;
}

/* Open state button styling for active tile. */
.brand-tile.is-open .brand-toggle {
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: white;
}

/* Hover accent when tile is not yet open. */
.brand-tile-inner:hover .brand-toggle {
    border-color: #4eb3f6;
    color: #4eb3f6;
}

/* Ensure open-state visuals win over hover state specificity. */
.brand-tile.is-open .brand-tile-inner .brand-toggle {
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: white;
}

/* ── EXPAND PANEL ───────────────────────────────────────── */
/* Collapsible content panel; max-height animated via JS-set values. */
.brand-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    background: #1a1a2e;
}

/* Inner padding wrapper for expanded tile content. */
.brand-panel-inner {
    padding: 32px 36px 40px;
}

/* Category tag (e.g., Beverages, Food, Fuel Solutions). */
.brand-panel-tag {
    display: inline-block;
    background: rgba(78, 179, 246, 0.15);
    color: #4eb3f6;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 14px;
}

/* Expanded panel heading style. */
.brand-panel-inner h3 {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    line-height: 1.3;
}

/* Expanded panel descriptive paragraph style. */
.brand-panel-inner p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* External reference link style in panel body. */
.brand-panel-link {
    display: inline-block;
    color: white;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    border-bottom: 1px solid rgba(78, 179, 246, 0.5);
    padding-bottom: 2px;
    transition:
        border-color 0.2s,
        color 0.2s;
}

/* Panel link hover accent. */
.brand-panel-link:hover {
    color: #4eb3f6;
    border-bottom-color: #4eb3f6;
}

/* ── CATEGORIES ─────────────────────────────────────────── */
/* Follow-up section summarizing product categories served. */
.brands-categories {
    padding: 100px 8%;
    background: #f7f9fc;
    text-align: center;
}

/* Centered inner wrapper for category content. */
.brands-categories-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* Increase bottom spacing under category section headline. */
.brands-categories .brands-headline {
    margin-bottom: 60px;
}

/* 3-column category card grid on desktop. */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* Category card base style with hover interactions. */
.cat-card {
    background: white;
    border-radius: 14px;
    padding: 36px 28px;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Hidden top accent line revealed on hover. */
.cat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #4eb3f6;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

/* Category card hover lift and shadow. */
.cat-card:hover {
    box-shadow: 0 12px 40px rgba(78, 179, 246, 0.15);
    transform: translateY(-6px);
}

/* Reveal the top accent line on hover. */
.cat-card:hover::before {
    transform: scaleX(1);
}

/* Icon chip within each category card. */
.cat-icon {
    width: 52px;
    height: 52px;
    background: #eaf5fe;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #4eb3f6;
    transition: all 0.3s ease;
}

/* Icon size normalization. */
.cat-icon svg {
    width: 26px;
    height: 26px;
}
/* Icon chip color inversion on hover. */
.cat-card:hover .cat-icon {
    background: #4eb3f6;
    color: white;
}

/* Category card heading style. */
.cat-card h4 {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
}

/* Category card paragraph style. */
.cat-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.65;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
/* Medium screens: reduce brand tile grid to 2 columns. */
@media (max-width: 1024px) {
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet screens: wrap hero stats and reduce category columns. */
@media (max-width: 768px) {
    .brands-hero-stats {
        flex-wrap: wrap;
    }
    .brands-hero-stat {
        flex: 0 0 50%;
        border-bottom: 1px solid #eee;
    }
    .categories-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Small phones: single-column tiles and tighter tile dimensions. */
@media (max-width: 580px) {
    .brands-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .brand-tile-inner {
        min-height: 240px;
        padding: 40px 32px 36px;
    }
    .brand-logo-wrap {
        height: 130px;
        overflow: hidden;
    }
    .brand-logo-wrap img {
        max-height: 120px;
    }
    .brands-hero-stat {
        flex: 0 0 50%;
    }
    .categories-grid {
        grid-template-columns: 1fr;
    }
}