/**
 * components.css — Reusable UI Components
 * TradeUp BC — Homepage Redesign v2
 *
 * Contents:
 *  1. Buttons
 *  2. Section Title
 *  3. Cards (Category / Feature / Story)
 *  4. Badges / Tags
 *  5. Accordion (FAQ)
 *  6. Form Elements
 *  7. Slick Slider Dots (custom)
 */


/* =============================================================================
   1. BUTTONS
   ============================================================================= */

/* Base button reset + shared styles */
.v2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 14px 34px;
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--ease);
    border: 2px solid transparent;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
}

/* Gold / Primary */
.v2-btn--primary {
    background-color: var(--c-gold);
    color: var(--c-dark);
    border-color: var(--c-gold);
}

.v2-btn--primary:hover,
.v2-btn--primary:focus {
    background-color: var(--c-gold-dk);
    border-color: var(--c-gold-dk);
    color: var(--c-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200,136,25,0.35);
}

/* Dark / Secondary */
.v2-btn--secondary {
    background-color: var(--c-green-dk);
    color: var(--c-white);
    border-color: var(--c-green-dk);
}

.v2-btn--secondary:hover,
.v2-btn--secondary:focus {
    background-color: var(--c-green-md);
    border-color: var(--c-green-md);
    color: var(--c-white);
    transform: translateY(-2px);
}

/* Outline */
.v2-btn--outline {
    background-color: transparent;
    color: var(--c-green-dk);
    border-color: var(--c-green-dk);
}

.v2-btn--outline:hover,
.v2-btn--outline:focus {
    background-color: var(--c-green-dk);
    color: var(--c-white);
    transform: translateY(-2px);
}

/* Outline on dark backgrounds */
.v2-btn--outline-white {
    background-color: transparent;
    color: var(--c-white);
    border-color: var(--c-white);
}

.v2-btn--outline-white:hover,
.v2-btn--outline-white:focus {
    background-color: var(--c-white);
    color: var(--c-green-dk);
}

/* Red */
.v2-btn--red {
    background-color: var(--c-red);
    color: var(--c-white);
    border-color: var(--c-red);
}

.v2-btn--red:hover,
.v2-btn--red:focus {
    background-color: #7a2400;
    border-color: #7a2400;
    color: var(--c-white);
    transform: translateY(-2px);
}

/* Small variant */
.v2-btn--sm {
    padding: 10px 22px;
    font-size: var(--text-sm);
}

/* Large variant */
.v2-btn--lg {
    padding: 18px 44px;
    font-size: var(--text-lg);
}

/* Icon inside button */
.v2-btn i,
.v2-btn svg { font-size: 1em; }


/* =============================================================================
   2. SECTION TITLE
   ============================================================================= */

.v2-section-title {
    margin-bottom: var(--space-12);
}

.v2-section-title__pretitle {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-red);
    margin-bottom: var(--space-3);
}

.v2-section-title__heading {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-4xl);
    text-transform: uppercase;
    color: var(--c-dark);
    line-height: 1.15;
}

.v2-section-title__heading--white { color: var(--c-white); }
.v2-section-title__heading--red   { color: var(--c-red); }
.v2-section-title__heading--gold  { color: var(--c-gold); }

.v2-section-title__sub {
    font-family: var(--font-body);
    font-size: var(--text-md);
    color: var(--c-gray);
    margin-top: var(--space-4);
    max-width: 680px;
    margin-inline: auto;
    line-height: 1.6;
}

.v2-section-title__sub--white { color: rgba(255,255,255,0.85); }

/* Centered variant */
.v2-section-title.is-centered { text-align: center; }
.v2-section-title.is-centered .v2-section-title__sub { margin-inline: auto; }

/* Accent bar under heading */
.v2-section-title--bar .v2-section-title__heading::after {
    content: '';
    display: block;
    width: 56px;
    height: 4px;
    background-color: var(--c-gold);
    margin-top: var(--space-4);
    border-radius: 2px;
}

.v2-section-title.is-centered.v2-section-title--bar .v2-section-title__heading::after {
    margin-inline: auto;
}

@media (max-width: 767px) {
    .v2-section-title__heading { font-size: var(--text-3xl); }
    .v2-section-title { margin-bottom: var(--space-8); }
}

@media (max-width: 575px) {
    .v2-section-title__heading { font-size: var(--text-2xl); }
}


/* =============================================================================
   3. CARDS
   ============================================================================= */

/* --- Category / Explore Card --- */
.v2-card-cat {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    display: block;
    text-decoration: none;
    aspect-ratio: 3/2;
    background-color: var(--c-gray-lt);
}

.v2-card-cat figure {
    width: 100%;
    height: 100%;
}

.v2-card-cat figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms ease;
}

.v2-card-cat:hover figure img {
    transform: scale(1.06);
}

.v2-card-cat__label {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--c-white);
    color: var(--c-green-dk);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: var(--space-3) var(--space-5);
    transition: var(--ease);
    max-width: 75%;
    text-align: right;
    line-height: 1.3;
}

.v2-card-cat:hover .v2-card-cat__label {
    background-color: var(--c-green-dk);
    color: var(--c-white);
}


/* --- Story / Success Card --- */
.v2-card-story {
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--c-white);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    transition: var(--ease);
}

.v2-card-story:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.v2-card-story__media {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    flex-shrink: 0;
}

.v2-card-story__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms ease;
}

.v2-card-story:hover .v2-card-story__media img {
    transform: scale(1.05);
}

.v2-card-story__badge {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    background-color: var(--c-red);
    color: var(--c-white);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 3px;
}

.v2-card-story__body {
    padding: var(--space-6);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.v2-card-story__tag {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-green-md);
    margin-bottom: var(--space-3);
}

.v2-card-story__name {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--c-dark);
    margin-bottom: var(--space-2);
    line-height: 1.25;
}

.v2-card-story__role {
    font-size: var(--text-sm);
    color: var(--c-gray);
    margin-bottom: var(--space-4);
    font-weight: 500;
}

.v2-card-story__excerpt {
    font-size: var(--text-sm);
    color: var(--c-dark);
    line-height: 1.6;
    flex: 1;
    margin-bottom: var(--space-5);
}

.v2-card-story__cta { margin-top: auto; }


/* --- Event Card --- */
.v2-card-event {
    display: flex;
    gap: var(--space-5);
    align-items: flex-start;
    padding: var(--space-6) 0;
    border-bottom: 1px solid var(--c-gray-lt);
}

.v2-card-event:last-child { border-bottom: none; }

.v2-card-event__date {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background-color: var(--c-red);
    color: var(--c-white);
    border-radius: var(--radius-sm);
    text-align: center;
}

.v2-card-event__date-day {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: 1;
}

.v2-card-event__date-month {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-top: 2px;
}

.v2-card-event__body {}

.v2-card-event__title {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--c-dark);
    margin-bottom: var(--space-2);
    line-height: 1.3;
}

.v2-card-event__meta {
    font-size: var(--text-sm);
    color: var(--c-gray);
    margin-bottom: var(--space-3);
}

.v2-card-event__meta i { margin-right: 4px; }


/* --- Feature / Partner Card --- */
.v2-card-partner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-5);
    filter: grayscale(100%);
    opacity: 0.6;
    transition: var(--ease);
}

.v2-card-partner:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.v2-card-partner img {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}


/* =============================================================================
   4. BADGES / TAGS
   ============================================================================= */

.v2-badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: 3px;
    line-height: 1.4;
}

.v2-badge--red   { background-color: var(--c-red);      color: var(--c-white); }
.v2-badge--green { background-color: var(--c-green-dk);  color: var(--c-white); }
.v2-badge--gold  { background-color: var(--c-gold);      color: var(--c-dark); }
.v2-badge--gray  { background-color: var(--c-gray-lt);   color: var(--c-dark); }


/* =============================================================================
   5. ACCORDION (FAQ)
   ============================================================================= */

.v2-accordion {}

.v2-accordion__item {
    border-bottom: 1px solid var(--c-gray-lt);
}

.v2-accordion__item:first-child {
    border-top: 1px solid var(--c-gray-lt);
}

.v2-accordion__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-5) 0;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: var(--space-4);
    transition: var(--ease);
}

.v2-accordion__trigger:hover .v2-accordion__question {
    color: var(--c-red);
}

.v2-accordion__question {
    font-family: var(--font-body);
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--c-dark);
    line-height: 1.4;
    transition: var(--ease);
}

.v2-accordion__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--c-gray-bg);
    border-radius: 50%;
    color: var(--c-dark);
    font-size: 18px;
    transition: var(--ease);
}

.v2-accordion__item.is-active .v2-accordion__icon {
    background-color: var(--c-red);
    color: var(--c-white);
    transform: rotate(45deg);
}

.v2-accordion__item.is-active .v2-accordion__question {
    color: var(--c-red);
}

.v2-accordion__panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 400ms ease;
}

.v2-accordion__panel-inner {
    padding-bottom: var(--space-6);
    font-size: var(--text-base);
    color: var(--c-dark);
    line-height: 1.7;
}

.v2-accordion__item.is-active .v2-accordion__panel {
    max-height: 800px;
}


/* =============================================================================
   6. FORM ELEMENTS
   ============================================================================= */

.v2-input {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--c-dark);
    background-color: var(--c-white);
    border: 1px solid var(--c-gray-lt);
    border-radius: var(--radius-sm);
    transition: border-color 200ms ease;
    outline: none;
}

.v2-input:focus { border-color: var(--c-green-md); }

.v2-input::placeholder { color: var(--c-gray); }

.v2-input-group {
    display: flex;
    gap: 0;
}

.v2-input-group .v2-input {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    border-right: none;
}

.v2-input-group .v2-btn {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}


/* =============================================================================
   7. SLICK SLIDER DOTS (custom overrides)
   ============================================================================= */

.v2-slider .slick-dots {
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    display: flex !important;
    gap: var(--space-2);
    width: auto;
}

.v2-slider .slick-dots li { width: auto; height: auto; margin: 0; }

.v2-slider .slick-dots li button {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    border: 2px solid var(--c-white);
    transition: var(--ease);
}

.v2-slider .slick-dots li button::before { display: none; }

.v2-slider .slick-dots li.slick-active button {
    background-color: var(--c-gold);
    border-color: var(--c-gold);
    transform: scale(1.2);
}
