/**
 * Zooptimal Blocks Library
 * Reusable UI components inspired by Ecolive theme
 *
 * @package Zooptimal
 */

/* ============================================
   CSS VARIABLES - BLOCK SPECIFIC
   ============================================ */
:root {
    /* Organic border radius */
    --zo-radius-organic: 12px 12px 28px 12px;
    --zo-radius-organic-alt: 28px 12px 12px 12px;
    --zo-radius-card: 20px;
    --zo-radius-lg: 24px;

    /* Shadows */
    --zo-shadow-card: 0 2px 20px rgba(0, 0, 0, 0.06);
    --zo-shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.1);
    --zo-shadow-button: 0 4px 15px rgba(52, 119, 88, 0.25);

    /* Transitions */
    --zo-transition-card: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --zo-transition-fast: all 0.2s ease;
}

/* ============================================
   BLOCK: CARD BASE
   ============================================ */
.zo-card {
    position: relative;
    background: var(--zo-white);
    border: 2px solid var(--zo-gray-200);
    border-radius: var(--zo-radius-card);
    padding: 24px;
    transition: var(--zo-transition-card);
}

.zo-card:hover {
    border-color: var(--zo-green);
    box-shadow: var(--zo-shadow-card-hover);
}

/* Card with organic shape */
.zo-card--organic {
    border-radius: var(--zo-radius-lg);
    padding: 30px;
}

.zo-card--organic::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--zo-white);
    border: 2px solid var(--zo-gray-200);
    z-index: -1;
    transition: var(--zo-transition-card);
}

.zo-card--organic:hover::before {
    border-color: rgba(52, 119, 88, 0.3);
}

/* ============================================
   BLOCK: FEATURE BOX / ICON BOX
   ============================================ */
.zo-feature-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 30px;
    background: var(--zo-white);
    border: 2px solid var(--zo-gray-200);
    border-radius: var(--zo-radius-lg);
    transition: var(--zo-transition-card);
}

.zo-feature-box:hover {
    border-color: var(--zo-green);
    transform: translateY(-4px);
    box-shadow: var(--zo-shadow-card-hover);
}

.zo-feature-box__icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(52, 119, 88, 0.15) 0%, rgba(52, 119, 88, 0.05) 100%);
    border-radius: var(--zo-radius-organic);
    margin-bottom: 20px;
    color: var(--zo-green);
    transition: var(--zo-transition-fast);
}

.zo-feature-box:hover .zo-feature-box__icon {
    background: var(--zo-green);
    color: var(--zo-white);
    border-radius: 16px;
}

.zo-feature-box__icon svg {
    width: 28px;
    height: 28px;
}

.zo-feature-box__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--zo-dark);
    margin: 0 0 10px;
}

.zo-feature-box__text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--zo-gray-600);
    margin: 0;
}

/* Feature box centered variant */
.zo-feature-box--center {
    align-items: center;
    text-align: center;
}

/* Feature box horizontal variant */
.zo-feature-box--horizontal {
    flex-direction: row;
    gap: 20px;
}

.zo-feature-box--horizontal .zo-feature-box__icon {
    margin-bottom: 0;
    flex-shrink: 0;
}

.zo-feature-box--horizontal .zo-feature-box__content {
    flex: 1;
}

/* ============================================
   BLOCK: INFO CARD
   ============================================ */
.zo-info-card {
    position: relative;
    padding: 28px;
    background: var(--zo-white);
    border: 2px solid var(--zo-gray-200);
    border-radius: var(--zo-radius-lg);
    transition: var(--zo-transition-card);
    overflow: hidden;
}

.zo-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--zo-green);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.zo-info-card:hover {
    border-color: var(--zo-green);
    box-shadow: var(--zo-shadow-card);
}

.zo-info-card:hover::before {
    transform: scaleY(1);
}

.zo-info-card__label {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--zo-green);
    margin-bottom: 10px;
}

.zo-info-card__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--zo-dark);
    margin: 0 0 12px;
    line-height: 1.3;
}

.zo-info-card__text {
    font-size: 14px;
    line-height: 1.65;
    color: var(--zo-gray-600);
    margin: 0;
}

/* ============================================
   BLOCK: STAT BOX
   ============================================ */
.zo-stat-box {
    text-align: center;
    padding: 32px 24px;
    background: var(--zo-white);
    border: 2px solid var(--zo-gray-200);
    border-radius: var(--zo-radius-lg);
    transition: var(--zo-transition-card);
}

.zo-stat-box:hover {
    border-color: var(--zo-wheat);
    transform: translateY(-4px);
}

.zo-stat-box__number {
    font-size: 42px;
    font-weight: 700;
    color: var(--zo-green);
    line-height: 1;
    margin-bottom: 8px;
}

.zo-stat-box__label {
    font-size: 14px;
    font-weight: 600;
    color: var(--zo-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   BLOCK: BUTTONS
   ============================================ */
.zo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--zo-transition-fast);
}

.zo-btn svg {
    width: 18px;
    height: 18px;
}

/* Primary button */
.zo-btn--primary {
    background: var(--zo-green);
    color: var(--zo-white);
}

.zo-btn--primary:hover {
    background: var(--zo-green-dark);
    transform: translateY(-2px);
    box-shadow: var(--zo-shadow-button);
}

/* Secondary button */
.zo-btn--secondary {
    background: var(--zo-wheat);
    color: var(--zo-dark);
}

.zo-btn--secondary:hover {
    background: #e5b53a;
    transform: translateY(-2px);
}

/* Outline button */
.zo-btn--outline {
    background: transparent;
    border: 2px solid var(--zo-green);
    color: var(--zo-green);
}

.zo-btn--outline:hover {
    background: var(--zo-green);
    color: var(--zo-white);
}

/* Organic shape button */
.zo-btn--organic {
    border-radius: var(--zo-radius-organic);
}

.zo-btn--organic:hover {
    border-radius: 12px;
}

/* Icon button */
.zo-btn--icon {
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: var(--zo-radius-organic);
    background: var(--zo-gray-100);
    color: var(--zo-gray-600);
}

.zo-btn--icon:hover {
    background: var(--zo-green);
    color: var(--zo-white);
    border-radius: 14px;
}

.zo-btn--icon svg {
    width: 22px;
    height: 22px;
}

/* Size variants */
.zo-btn--sm {
    padding: 10px 20px;
    font-size: 13px;
}

.zo-btn--lg {
    padding: 18px 40px;
    font-size: 16px;
}

/* ============================================
   BLOCK: BADGE / TAG
   ============================================ */
.zo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    background: var(--zo-gray-100);
    color: var(--zo-gray-700);
}

.zo-badge--green {
    background: rgba(52, 119, 88, 0.1);
    color: var(--zo-green);
}

.zo-badge--wheat {
    background: rgba(244, 195, 64, 0.2);
    color: #9a7a20;
}

.zo-badge--promo {
    background: #dc3545;
    color: var(--zo-white);
}

/* ============================================
   BLOCK: SECTION HEADER
   ============================================ */
.zo-section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
}

.zo-section-header__label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--zo-green);
    margin-bottom: 12px;
}

.zo-section-header__title {
    font-size: 32px;
    font-weight: 700;
    color: var(--zo-dark);
    margin: 0 0 16px;
    line-height: 1.2;
}

.zo-section-header__text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--zo-gray-600);
    margin: 0;
}

/* Left aligned variant */
.zo-section-header--left {
    text-align: left;
    margin-left: 0;
}

/* With underline */
.zo-section-header--underline .zo-section-header__title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--zo-wheat);
    border-radius: 2px;
    margin: 16px auto 0;
}

.zo-section-header--left.zo-section-header--underline .zo-section-header__title::after {
    margin-left: 0;
}

/* ============================================
   BLOCK: TESTIMONIAL CARD
   ============================================ */
.zo-testimonial {
    padding: 32px;
    background: var(--zo-white);
    border: 2px solid var(--zo-gray-200);
    border-radius: var(--zo-radius-lg);
    transition: var(--zo-transition-card);
}

.zo-testimonial:hover {
    border-color: var(--zo-wheat);
    box-shadow: var(--zo-shadow-card);
}

.zo-testimonial__stars {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    color: #FFB800;
}

.zo-testimonial__stars svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.zo-testimonial__text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--zo-gray-700);
    margin: 0 0 20px;
    font-style: italic;
}

.zo-testimonial__author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.zo-testimonial__avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.zo-testimonial__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--zo-dark);
    margin: 0;
}

.zo-testimonial__role {
    font-size: 13px;
    color: var(--zo-gray-500);
    margin: 0;
}

/* ============================================
   BLOCK: CTA BOX
   ============================================ */
.zo-cta-box {
    position: relative;
    padding: 48px;
    background: linear-gradient(135deg, var(--zo-green) 0%, #2a6047 100%);
    border-radius: var(--zo-radius-lg);
    color: var(--zo-white);
    overflow: hidden;
}

.zo-cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.zo-cta-box__content {
    position: relative;
    z-index: 1;
}

.zo-cta-box__title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
}

.zo-cta-box__text {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
    margin: 0 0 24px;
}

.zo-cta-box .zo-btn--secondary {
    background: var(--zo-wheat);
    color: var(--zo-dark);
}

.zo-cta-box .zo-btn--secondary:hover {
    background: var(--zo-white);
}

/* ============================================
   BLOCK: PROMO BANNER
   ============================================ */
.zo-promo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 28px;
    background: linear-gradient(90deg, var(--zo-wheat) 0%, #f8d76b 100%);
    border-radius: 14px;
}

.zo-promo-banner__content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.zo-promo-banner__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    color: var(--zo-dark);
}

.zo-promo-banner__icon svg {
    width: 24px;
    height: 24px;
}

.zo-promo-banner__text strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--zo-dark);
}

.zo-promo-banner__text span {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.7);
}

.zo-promo-banner .zo-btn {
    flex-shrink: 0;
}

/* ============================================
   BLOCK: PRODUCT CARD (Enhanced)
   ============================================ */
.zo-product-card--enhanced {
    position: relative;
    background: var(--zo-white);
    border: 2px solid var(--zo-gray-200);
    border-radius: var(--zo-radius-lg);
    padding: 24px;
    transition: var(--zo-transition-card);
    z-index: 1;
}

.zo-product-card--enhanced::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: var(--zo-white);
    border: 2px solid var(--zo-gray-200);
    z-index: -1;
    transition: var(--zo-transition-card);
}

.zo-product-card--enhanced:hover {
    z-index: 10;
}

.zo-product-card--enhanced:hover::before {
    bottom: -50px;
    border-color: rgba(52, 119, 88, 0.3);
    box-shadow: var(--zo-shadow-card-hover);
}

/* ============================================
   BLOCK: LIST WITH ICONS
   ============================================ */
.zo-list-icons {
    list-style: none;
    padding: 0;
    margin: 0;
}

.zo-list-icons li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--zo-gray-200);
}

.zo-list-icons li:last-child {
    border-bottom: none;
}

.zo-list-icons__icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 119, 88, 0.1);
    border-radius: 6px;
    color: var(--zo-green);
    flex-shrink: 0;
}

.zo-list-icons__icon svg {
    width: 14px;
    height: 14px;
}

.zo-list-icons__text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--zo-gray-700);
}

/* ============================================
   BLOCK: ACCORDION
   ============================================ */
.zo-accordion {
    border: 2px solid var(--zo-gray-200);
    border-radius: var(--zo-radius-card);
    overflow: hidden;
}

.zo-accordion__item {
    border-bottom: 1px solid var(--zo-gray-200);
}

.zo-accordion__item:last-child {
    border-bottom: none;
}

.zo-accordion__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: transparent;
    border: none;
    width: 100%;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--zo-dark);
    text-align: left;
    transition: var(--zo-transition-fast);
}

.zo-accordion__header:hover {
    background: var(--zo-gray-50);
}

.zo-accordion__icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--zo-gray-100);
    border-radius: 6px;
    transition: var(--zo-transition-fast);
}

.zo-accordion__item.active .zo-accordion__icon {
    background: var(--zo-green);
    color: var(--zo-white);
    transform: rotate(180deg);
}

.zo-accordion__content {
    display: none;
    padding: 0 24px 18px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--zo-gray-600);
}

.zo-accordion__item.active .zo-accordion__content {
    display: block;
}

/* ============================================
   BLOCK: NOTIFICATION / ALERT
   ============================================ */
.zo-alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.zo-alert__icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.zo-alert--info {
    background: rgba(52, 119, 88, 0.1);
    color: var(--zo-green);
}

.zo-alert--success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.zo-alert--warning {
    background: rgba(244, 195, 64, 0.2);
    color: #9a7a20;
}

.zo-alert--error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* ============================================
   BLOCK: TABS
   ============================================ */
.zo-tabs__nav {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--zo-gray-200);
    margin-bottom: 24px;
}

.zo-tabs__btn {
    padding: 14px 24px;
    background: transparent;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--zo-gray-600);
    cursor: pointer;
    position: relative;
    transition: var(--zo-transition-fast);
}

.zo-tabs__btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--zo-green);
    border-radius: 2px 2px 0 0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.zo-tabs__btn:hover {
    color: var(--zo-dark);
}

.zo-tabs__btn.active {
    color: var(--zo-green);
}

.zo-tabs__btn.active::after {
    transform: scaleX(1);
}

.zo-tabs__panel {
    display: none;
}

.zo-tabs__panel.active {
    display: block;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .zo-feature-box {
        padding: 24px;
    }

    .zo-feature-box__icon {
        width: 50px;
        height: 50px;
    }

    .zo-feature-box__icon svg {
        width: 24px;
        height: 24px;
    }

    .zo-section-header__title {
        font-size: 26px;
    }

    .zo-cta-box {
        padding: 32px 24px;
    }

    .zo-cta-box__title {
        font-size: 22px;
    }

    .zo-promo-banner {
        flex-direction: column;
        text-align: center;
    }

    .zo-promo-banner__content {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .zo-btn--lg {
        padding: 14px 28px;
        font-size: 15px;
    }

    .zo-tabs__nav {
        flex-wrap: wrap;
    }

    .zo-tabs__btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}
