/**
 * Hexagon Categories - Premium Styling
 *
 * Altıgen kategori kartları - Düz tabanlı hexagon, site ile uyumlu.
 * Flat-bottom hexagon: Alt kenar düz, üst kenar sivri.
 *
 * @package Aksu_Bal
 * @since 1.0.0
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

.aksu-hexcat {
    --hexcat-hex-size: 200px; /* Büyük hexagonlar */
    --hexcat-color-primary: var(--aksu-color-primary, #b45309);
    --hexcat-color-accent: var(--aksu-color-accent, #f59e0b);
    --hexcat-color-honey: var(--aksu-color-honey, #fbbf24);
    --hexcat-color-honey-light: var(--aksu-color-honey-light, #fef3c7);
    --hexcat-color-text: var(--aksu-color-text, #451a03);
    --hexcat-font-heading: var(--aksu-font-heading, 'Playfair Display', serif);
    --hexcat-transition: cubic-bezier(0.4, 0, 0.2, 1);
    --hexcat-transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

    position: relative;
    padding: 1.5rem 0 2.5rem;
    overflow: hidden; /* Taşma önleme */
}

/* ==========================================================================
   Swiper Container
   ========================================================================== */

.aksu-hexcat__swiper {
    overflow: hidden !important;
    padding: 1.5rem 0 3rem;
}

.aksu-hexcat__swiper.swiper {
    overflow: hidden !important;
}

.aksu-hexcat__wrapper {
    display: flex;
    align-items: flex-start;
}

.aksu-hexcat__slide {
    width: auto !important;
    flex-shrink: 0;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==========================================================================
   Hexagon Item - Ana Kart
   ========================================================================== */

.aksu-hexcat__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: var(--hexcat-hex-size);
    text-decoration: none;
    position: relative;
    transition: transform 0.4s var(--hexcat-transition);
}

.aksu-hexcat__item:hover {
    transform: translateY(-8px);
}

/* ==========================================================================
   Hexagon Shape - Düz Tabanlı (Flat Bottom)
   Pointy-top hexagon: Üst ve alt köşeler sivri değil, yan kenarlar sivri
   ========================================================================== */

.aksu-hexcat__hex {
    position: relative;
    width: var(--hexcat-hex-size);
    height: calc(var(--hexcat-hex-size) * 0.866);
    display: block;
}

/* Dış border/glow - hover'da - BAL RENKLERİ */
.aksu-hexcat__hex::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(135deg, var(--hexcat-color-honey) 0%, var(--hexcat-color-accent) 50%, var(--hexcat-color-primary) 100%);
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    opacity: 0;
    transition: opacity 0.4s ease, box-shadow 0.4s ease;
    z-index: 0;
}

.aksu-hexcat__item:hover .aksu-hexcat__hex::before {
    opacity: 1;
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.4);
}

/* İç hexagon container - Düz tabanlı, iç gölge YOK */
.aksu-hexcat__hex-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: linear-gradient(180deg, var(--hexcat-color-honey-light) 0%, #fde68a 100%);
    overflow: hidden;
    z-index: 1;
    /* İç gölge kaldırıldı - temiz görünüm */
}

/* ==========================================================================
   Kategori Resmi - Background Image
   ========================================================================== */

.aksu-hexcat__image-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s var(--hexcat-transition);
    z-index: 1;
}

.aksu-hexcat__item:hover .aksu-hexcat__image-bg {
    transform: scale(1.1);
}

/* Resim üstü gradient overlay - hafif, iç gölge yok */
.aksu-hexcat__hex-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 70%,
        rgba(69, 26, 3, 0.25) 100%
    );
    z-index: 2;
    pointer-events: none;
    transition: background 0.4s ease;
    /* İç gölge efekti kaldırıldı */
}

.aksu-hexcat__item:hover .aksu-hexcat__hex-inner::after {
    background: linear-gradient(
        180deg,
        rgba(251, 191, 36, 0.15) 0%,
        rgba(0, 0, 0, 0) 50%,
        rgba(69, 26, 3, 0.3) 100%
    );
}

/* ==========================================================================
   İkon (Resim yoksa)
   ========================================================================== */

.aksu-hexcat__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    z-index: 3;
    line-height: 1;
    transition: transform 0.4s var(--hexcat-transition-bounce);
}

.aksu-hexcat__icon img.emoji {
    width: 3rem !important;
    height: 3rem !important;
}

.aksu-hexcat__item:hover .aksu-hexcat__icon {
    transform: translate(-50%, -50%) scale(1.1) rotate(5deg);
}

/* ==========================================================================
   Hexagon İçi İsim - GİZLİ (isim dışarıda olacak)
   ========================================================================== */

.aksu-hexcat__inner-name {
    display: none !important;
}

/* ==========================================================================
   Alt İsim - Hexagon Altında
   ========================================================================== */

.aksu-hexcat__name-below {
    display: block;
    margin-top: 0.75rem;
    text-align: center;
    color: var(--hexcat-color-text);
    font-family: var(--hexcat-font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.3s ease;
    max-width: var(--hexcat-hex-size);
}

.aksu-hexcat__item:hover .aksu-hexcat__name-below {
    color: var(--hexcat-color-primary);
}

/* ==========================================================================
   Alt Content - Gizli
   ========================================================================== */

.aksu-hexcat__content,
.aksu-hexcat__count {
    display: none !important;
}

/* ==========================================================================
   Hover Bee - Kart üzerinde
   ========================================================================== */

.aksu-hexcat__bee {
    position: absolute;
    top: -5%;
    right: 15%;
    font-size: 1.4rem;
    line-height: 1;
    opacity: 0;
    transform: scale(0) rotate(-20deg);
    transition: all 0.4s var(--hexcat-transition-bounce);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    z-index: 10;
}

.aksu-hexcat__bee img.emoji {
    width: 1.4rem !important;
    height: 1.4rem !important;
}

.aksu-hexcat__item:hover .aksu-hexcat__bee {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    animation: hexcatBeeFly 2s ease-in-out infinite 0.3s;
}

@keyframes hexcatBeeFly {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(4px, -5px) rotate(8deg); }
    50% { transform: translate(2px, -2px) rotate(-4deg); }
    75% { transform: translate(-3px, -4px) rotate(6deg); }
}

/* ==========================================================================
   Navigation Buttons - Swiper dışında
   ========================================================================== */

.aksu-hexcat__nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    transform: translateY(-80%);
    padding: 0;
    z-index: 10;
}

.aksu-hexcat__prev,
.aksu-hexcat__next {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    background: white;
    border: 2px solid var(--hexcat-color-honey);
    border-radius: 50%;
    color: var(--hexcat-color-primary);
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s var(--hexcat-transition);
    box-shadow: 0 4px 15px rgba(180, 83, 9, 0.12);
}

.aksu-hexcat__prev {
    margin-left: -1rem;
}

.aksu-hexcat__next {
    margin-right: -1rem;
}

.aksu-hexcat__prev:hover,
.aksu-hexcat__next:hover {
    background: var(--hexcat-color-honey);
    border-color: var(--hexcat-color-accent);
    color: var(--hexcat-color-text);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.35);
}

.aksu-hexcat__prev:disabled,
.aksu-hexcat__next:disabled,
.aksu-hexcat__prev.swiper-button-disabled,
.aksu-hexcat__next.swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.aksu-hexcat__prev svg,
.aksu-hexcat__next svg {
    width: 1.2rem;
    height: 1.2rem;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.aksu-hexcat__pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.aksu-hexcat__pagination .swiper-pagination-bullet {
    width: 0.5rem;
    height: 0.5rem;
    background: #fde68a;
    border-radius: 50%;
    opacity: 1;
    transition: all 0.3s ease;
    cursor: pointer;
}

.aksu-hexcat__pagination .swiper-pagination-bullet-active,
.aksu-hexcat__pagination .swiper-pagination-bullet-active-main {
    background: var(--hexcat-color-accent) !important;
    transform: scale(1.4);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

/* ==========================================================================
   Context Variations
   ========================================================================== */

.aksu-hexcat[data-context="homepage"] {
    --hexcat-hex-size: 200px; /* Daha büyük hexagonlar */
}

.aksu-hexcat[data-context="sidebar"] {
    --hexcat-hex-size: 110px;
}

.aksu-hexcat[data-context="sidebar"] .aksu-hexcat__nav {
    display: none;
}

.aksu-hexcat[data-context="sidebar"] .aksu-hexcat__name-below {
    font-size: 0.8rem;
}

.aksu-hexcat[data-context="widget"] {
    --hexcat-hex-size: 90px;
    padding: 0.5rem 0;
}

.aksu-hexcat[data-context="widget"] .aksu-hexcat__icon,
.aksu-hexcat[data-context="widget"] .aksu-hexcat__icon img.emoji {
    font-size: 1.8rem;
    width: 1.8rem !important;
    height: 1.8rem !important;
}

.aksu-hexcat[data-context="widget"] .aksu-hexcat__name-below {
    font-size: 0.7rem;
}

/* ==========================================================================
   Responsive - Mobile'da 3, Desktop'ta 4+ görünecek
   ========================================================================== */

/* Large Desktop - 3 büyük hexagon */
@media (min-width: 1400px) {
    .aksu-hexcat {
        --hexcat-hex-size: 220px;
    }

    .aksu-hexcat[data-context="homepage"] {
        --hexcat-hex-size: 220px;
    }
}

/* Desktop - 3 büyük hexagon */
@media (min-width: 1200px) and (max-width: 1399px) {
    .aksu-hexcat {
        --hexcat-hex-size: 200px;
    }

    .aksu-hexcat[data-context="homepage"] {
        --hexcat-hex-size: 200px;
    }
}

/* Tablet Landscape - 3 hexagon */
@media (min-width: 992px) and (max-width: 1199px) {
    .aksu-hexcat {
        --hexcat-hex-size: 180px;
    }

    .aksu-hexcat[data-context="homepage"] {
        --hexcat-hex-size: 180px;
    }
}

/* Tablet Portrait - 3 hexagon */
@media (min-width: 768px) and (max-width: 991px) {
    .aksu-hexcat {
        --hexcat-hex-size: 160px;
    }

    .aksu-hexcat[data-context="homepage"] {
        --hexcat-hex-size: 160px;
    }

    .aksu-hexcat__nav {
        display: none;
    }

    .aksu-hexcat__name-below {
        font-size: 1rem;
    }
}

/* Mobile Landscape - 3 hexagon */
@media (min-width: 576px) and (max-width: 767px) {
    .aksu-hexcat {
        --hexcat-hex-size: 140px;
    }

    .aksu-hexcat[data-context="homepage"] {
        --hexcat-hex-size: 140px;
    }

    .aksu-hexcat__nav {
        display: none;
    }

    .aksu-hexcat__name-below {
        font-size: 0.9rem;
    }

    .aksu-hexcat__slide {
        padding: 0.35rem;
    }
}

/* Mobile Portrait - 3 kategori görünecek */
@media (max-width: 575px) {
    .aksu-hexcat {
        --hexcat-hex-size: 110px;
    }

    .aksu-hexcat[data-context="homepage"] {
        --hexcat-hex-size: 110px;
    }

    .aksu-hexcat__swiper {
        padding: 1rem 0 2rem;
    }

    .aksu-hexcat__nav {
        display: none;
    }

    .aksu-hexcat__slide {
        padding: 0.25rem;
    }

    .aksu-hexcat__name-below {
        font-size: 0.8rem;
        margin-top: 0.5rem;
    }

    .aksu-hexcat__icon,
    .aksu-hexcat__icon img.emoji {
        font-size: 2.5rem;
        width: 2.5rem !important;
        height: 2.5rem !important;
    }

    .aksu-hexcat__bee,
    .aksu-hexcat__bee img.emoji {
        font-size: 1.2rem;
        width: 1.2rem !important;
        height: 1.2rem !important;
    }
}

/* ==========================================================================
   Swiper Slide Animasyonları
   ========================================================================== */

/* Aktif slide efekti */
.aksu-hexcat__slide.swiper-slide-active .aksu-hexcat__item {
    transform: scale(1.05);
}

.aksu-hexcat__slide.swiper-slide-active .aksu-hexcat__hex::before {
    opacity: 0.5;
}

/* Geçiş animasyonu */
.aksu-hexcat__slide {
    transition: transform 0.4s var(--hexcat-transition), opacity 0.4s ease;
}

/* Slide giriş animasyonu */
.aksu-hexcat--initialized .aksu-hexcat__slide {
    animation: hexSlideIn 0.6s var(--hexcat-transition) both;
}

.aksu-hexcat--initialized .aksu-hexcat__slide:nth-child(1) { animation-delay: 0s; }
.aksu-hexcat--initialized .aksu-hexcat__slide:nth-child(2) { animation-delay: 0.1s; }
.aksu-hexcat--initialized .aksu-hexcat__slide:nth-child(3) { animation-delay: 0.2s; }
.aksu-hexcat--initialized .aksu-hexcat__slide:nth-child(4) { animation-delay: 0.3s; }
.aksu-hexcat--initialized .aksu-hexcat__slide:nth-child(5) { animation-delay: 0.4s; }
.aksu-hexcat--initialized .aksu-hexcat__slide:nth-child(6) { animation-delay: 0.5s; }

@keyframes hexSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Hover'da pulse efekti */
.aksu-hexcat__item:hover .aksu-hexcat__hex-inner {
    animation: hexPulse 0.6s ease;
}

@keyframes hexPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .aksu-hexcat__item,
    .aksu-hexcat__hex::before,
    .aksu-hexcat__image-bg,
    .aksu-hexcat__icon,
    .aksu-hexcat__bee,
    .aksu-hexcat__slide {
        transition: none !important;
        animation: none !important;
    }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
    .aksu-hexcat__bee,
    .aksu-hexcat__nav,
    .aksu-hexcat__pagination {
        display: none !important;
    }
}
