/**
 * Elegant Horoskop Home - CSS Styles
 * Version: 1.0.0
 * Author: Darko Ivanec - Digitalni Svemir
 *
 * Mobile-first responsive design
 */

/* =============================================================================
   MAIN WRAPPER & BACKGROUND
   ============================================================================= */

.elegant-horoskop-home-wrapper {
    position: relative !important;
    width: 100% !important;
    min-height: 100vh !important;
    background-color: #000 !important;
    padding: 40px 0 60px 0 !important;
    overflow: hidden !important;
}

/* Background image positioned at carousel center */
.ehh-background-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-repeat: no-repeat !important;
    z-index: 0 !important;
}

/* Mobile background - contain, centered at top */
.ehh-background-image-mobile {
    display: block !important;
    background-size: contain !important;
    background-position: center 0% !important;
}

/* Mobile background gradient overlay - subtle fade */
.ehh-background-image-mobile::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.00) 40%, rgba(0, 0, 0, 0.00) 60%, rgba(0, 0, 0, 0.6) 100%) !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

/* Tablet: Move background image higher */
@media (min-width: 768px) and (max-width: 999px) {
    .elegant-horoskop-home-wrapper {
        min-height: 50vh !important;
    }

    .ehh-background-image-mobile {
        background-position: center -280px !important;
    }
}

/* Desktop background - hidden on mobile */
.ehh-background-image-desktop {
    display: none !important;
}

/* Ensure content is above overlay (but not background image) */
.elegant-horoskop-home-wrapper > *:not(.ehh-background-image) {
    position: relative !important;
    z-index: 2 !important;
}

/* =============================================================================
   ASTRO BUTTON
   ============================================================================= */

.ehh-astro-button-container {
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 50px !important;
}

.ehh-astro-button {
    display: flex !important;
    width: 170px !important;
    height: 30px !important;
    padding: 6px 42px 8px 42px !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
    background: #9B875D !important;
    border: 2px solid #9B875D !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    border-radius: 0 !important;
}

.ehh-astro-button:hover {
    background: #8a7750 !important;
    border-color: #8a7750 !important;
    transform: translateY(-2px) !important;
}

.ehh-astro-button:visited {
    background: #9B875D !important;
    border-color: #9B875D !important;
}

/* Button Text */
.ehh-astro-button {
    color: #FFF !important;
    text-align: center !important;
    font-family: "Reddit Sans", sans-serif !important;
    font-size: 17px !important;
    font-style: normal !important;
    font-weight: 800 !important;
    line-height: 15px !important;
    letter-spacing: 3.4px !important;
    text-transform: uppercase !important;
}

/* =============================================================================
   MAIN HEADING
   ============================================================================= */

.ehh-main-heading {
    width: 380px !important;
    max-width: 90% !important;
    margin: 0 auto 60px auto !important;
    color: #FFF !important;
    text-align: center !important;
    font-family: "Reddit Sans", sans-serif !important;
    font-size: 15px !important;
    font-style: normal !important;
    font-weight: 800 !important;
    line-height: 21px !important;
    letter-spacing: 3px !important;
    text-transform: uppercase !important;
}

/* =============================================================================
   ZODIAC CAROUSEL (PEEK EFFECT)
   ============================================================================= */

.ehh-zodiac-carousel {
    position: relative !important;
    width: 100% !important;
    margin-bottom: 80px !important;
    overflow: visible !important;
    cursor: grab !important;
    /* iOS FIX: Allow vertical scroll by default, JS will change to 'none' for horizontal swipe */
    touch-action: pan-y pinch-zoom !important;
    -webkit-overflow-scrolling: touch !important;
}

.ehh-zodiac-carousel.is-dragging {
    cursor: grabbing !important;
    /* When dragging horizontally, disable touch-action to allow JS control */
    touch-action: none !important;
}

.ehh-carousel-track {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 15px !important;
    overflow: visible !important;
    cursor: grab !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    padding: 20px 0 !important;
    will-change: transform !important;
    /* GPU acceleration - translateZ(0) kontrolira JavaScript zajedno s translateX */
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

.ehh-carousel-track.is-dragging {
    cursor: grabbing !important;
    transition: none !important;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.ehh-carousel-track::-webkit-scrollbar {
    display: none !important;
}

/* Create peek effect - center 3 icons, show partial icons on sides */
.ehh-carousel-track::before,
.ehh-carousel-track::after {
    content: '' !important;
    flex: 0 0 calc((100vw - (86px * 3 + 15px * 2)) / 2 - 15px) !important;
    min-width: 20px !important;
}

/* Individual carousel slide */
.ehh-carousel-slide {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    transition: transform 0.3s ease, opacity 0.3s ease !important;
}

/* Zodiac link (wraps icon and name) */
.ehh-zodiac-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 18px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.ehh-zodiac-link:hover,
.ehh-zodiac-link:visited,
.ehh-zodiac-link:active {
    text-decoration: none !important;
}

.ehh-carousel-track.is-dragging .ehh-zodiac-link {
    pointer-events: none !important;
}

/* Zodiac icon circle - gold background with black icon */
/* Ultra-specific selectors to override any database/customizer CSS */
.ehh-zodiac-icon-circle,
.ehh-carousel-slide .ehh-zodiac-icon-circle,
.ehh-zodiac-link .ehh-zodiac-icon-circle,
.elegant-horoskop-home-wrapper .ehh-zodiac-icon-circle,
.elegant-horoskop-home-wrapper .ehh-carousel-slide .ehh-zodiac-icon-circle,
body .ehh-zodiac-icon-circle,
body .ehh-carousel-slide .ehh-zodiac-icon-circle {
    width: 96px !important;
    height: 96px !important;
    min-width: 96px !important;
    min-height: 96px !important;
    max-width: 96px !important;
    max-height: 96px !important;
    flex-shrink: 0 !important;
    background: #A58134 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.3s ease !important;
}

.ehh-zodiac-link:hover .ehh-zodiac-icon-circle {
    transform: scale(1.08) !important;
}

/* Zodiac icon - black SVG inside gold circle */
/* Ultra-specific selectors for icon size */
.ehh-zodiac-icon,
.ehh-zodiac-icon-circle .ehh-zodiac-icon,
.ehh-carousel-slide .ehh-zodiac-icon,
.elegant-horoskop-home-wrapper .ehh-zodiac-icon,
body .ehh-zodiac-icon {
    width: auto !important;
    height: 40px !important;
}

/* Placeholder symbol (Unicode fallback) */
.ehh-zodiac-symbol {
    font-size: 40px !important;
    color: #000 !important;
}

/* Zodiac name */
.ehh-zodiac-name {
    color: #A58134 !important;
    text-align: center !important;
    font-family: "Reddit Sans", sans-serif !important;
    font-size: 13px !important;
    font-style: normal !important;
    font-weight: 800 !important;
    line-height: 15px !important;
    letter-spacing: 2.6px !important;
    text-transform: uppercase !important;
}

/* =============================================================================
   CAROUSEL DOTS (HIDDEN - NOT NEEDED)
   ============================================================================= */

.ehh-carousel-dots {
    display: none !important;
}

/* =============================================================================
   HOROSCOPE GRID (50/50 - WEEKLY & MONTHLY)
   ============================================================================= */

.ehh-horoscope-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
    padding: 0 23px !important;
    max-width: 100% !important;
}

.ehh-grid-item {
    position: relative !important;
    overflow: hidden !important;
}

.ehh-grid-link {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    text-decoration: none !important;
}

/* Grid image */
.ehh-grid-image {
    width: 100% !important;
    height: 288px !important;
    flex-shrink: 0 !important;
    align-self: stretch !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    position: relative !important;
    overflow: hidden !important;
    transition: transform 0.3s ease !important;
}

.ehh-grid-link:hover .ehh-grid-image {
    transform: scale(1.05) !important;
}

/* Show mobile images by default, hide desktop images */
.ehh-grid-image-mobile {
    display: block !important;
}

.ehh-grid-image-desktop {
    display: none !important;
}

/* Grid content */
.ehh-grid-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

/* Label (TJEDNI HOROSKOP / MJESEČNI HOROSKOP) */
.ehh-grid-label {
    color: #C99E41 !important;
    font-family: "Reddit Sans", sans-serif !important;
    font-size: 13px !important;
    font-style: normal !important;
    font-weight: 800 !important;
    line-height: 15px !important;
    letter-spacing: 2.6px !important;
    text-transform: uppercase !important;
}

/* Title */
.ehh-grid-title {
    color: #FFF !important;
    font-family: 'DM Serif Text', Georgia, serif !important;
    font-size: 20px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 20px !important;
    letter-spacing: -0.2px !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-bottom: 6px !important;
}

/* =============================================================================
   AUTOROTATION - JS-BASED (No CSS animations needed)
   ============================================================================= */

/* Cursor styles */
.ehh-carousel-track {
    cursor: grab !important;
}

.ehh-carousel-track.is-dragging {
    cursor: grabbing !important;
}

/* =============================================================================
   RESPONSIVE - DESKTOP
   ============================================================================= */

@media (min-width: 1000px) {

    .elegant-horoskop-home-wrapper {
        padding: 160px 0 120px 0 !important;
    }

    /* Desktop background - cover, centered */
    .ehh-background-image-mobile {
        display: none !important;
    }

    .ehh-background-image-desktop {
        display: block !important;
        background-size: cover !important;
        background-position: center top !important;
    }

    /* Gradient overlay on desktop background - subtle top/bottom fade */
    .ehh-background-image-desktop::after {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.00) 48.56%, #000 100%) !important;
        pointer-events: none !important;
        z-index: 1 !important;
    }

    .ehh-astro-button-container {
        margin-bottom: 80px !important;
    }

    .ehh-astro-button {
        color: #FFF !important;
        text-align: center !important;
        font-family: "Reddit Sans", sans-serif !important;
        font-size: 25px !important;
        font-style: normal !important;
        font-weight: 800 !important;
        line-height: 25px !important;
        letter-spacing: 5px !important;
        text-transform: uppercase !important;
        padding: 20px 100px !important;
        min-width: 160px;
    }

    .ehh-main-heading {
        width: auto !important;
        max-width: 90% !important;
        font-size: 25px !important;
        line-height: 30px !important;
        margin-bottom: 50px !important;
    }

    .ehh-zodiac-carousel {
        margin-bottom: 130px !important;
        overflow: hidden !important;
        width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Desktop carousel - 8 cijelih + 2 djelomična (10 ukupno) */
    .ehh-carousel-track {
        display: flex !important;
        gap: 40px !important;
        padding: 20px 0 !important;
        cursor: grab !important;
        overflow: visible !important;
        will-change: transform !important;
        /* Transition kontrolira JavaScript za smooth snap */
    }

    .ehh-carousel-track.is-dragging {
        transition: none !important;
    }

    /* Desktop peek effect - NO pseudo-elements, pozicioniranje preko JS-a */
    .ehh-carousel-track::before,
    .ehh-carousel-track::after {
        display: none !important;
    }

    /* Desktop dragging cursor */
    .ehh-carousel-track.is-dragging {
        cursor: grabbing !important;
    }

    /* Slide sizing - allow natural width */
    .ehh-carousel-slide {
        flex: 0 0 auto !important;
        opacity: 1 !important;
    }

    /* Show cloned slides on desktop for infinite loop */
    .ehh-carousel-slide.ehh-clone {
        display: flex !important;
    }

    .ehh-zodiac-link {
        gap: 20px !important;
    }

    /* Desktop: Fixed 180px circles with larger icons */
    /* Ultra-specific selectors to override any database/customizer CSS */
    .ehh-zodiac-icon-circle,
    .ehh-carousel-slide .ehh-zodiac-icon-circle,
    .ehh-zodiac-link .ehh-zodiac-icon-circle,
    .elegant-horoskop-home-wrapper .ehh-zodiac-icon-circle,
    .elegant-horoskop-home-wrapper .ehh-carousel-slide .ehh-zodiac-icon-circle,
    body .ehh-zodiac-icon-circle,
    body .ehh-carousel-slide .ehh-zodiac-icon-circle,
    body .elegant-horoskop-home-wrapper .ehh-zodiac-icon-circle {
        width: 180px !important;
        height: 180px !important;
        min-width: 180px !important;
        min-height: 180px !important;
        max-width: 180px !important;
        max-height: 180px !important;
        aspect-ratio: 1/1 !important;
        transition: transform 0.3s ease !important;
    }

    .ehh-zodiac-link:hover .ehh-zodiac-icon-circle {
        transform: scale(1.08) !important;
    }

    /* Desktop: Larger SVG icons (~53% of circle) */
    /* Ultra-specific selectors for icon size */
    .ehh-zodiac-icon,
    .ehh-zodiac-icon-circle .ehh-zodiac-icon,
    .ehh-carousel-slide .ehh-zodiac-icon,
    .elegant-horoskop-home-wrapper .ehh-zodiac-icon,
    body .ehh-zodiac-icon,
    body .elegant-horoskop-home-wrapper .ehh-zodiac-icon {
        width: auto !important;
        height: 80px !important;
    }

    .ehh-zodiac-name {
        font-size: 17px !important;
        line-height: 15px !important;
        letter-spacing: 1.7px !important;
        font-weight: 800 !important;
    }

    /* Horoscope grid styling */
    .ehh-horoscope-grid {
        gap: 40px !important;
        max-width: 2032px !important;
        width: 100% !important;
        padding: 0 56px !important;
        margin: 0 auto !important;
    }

    /* Remove card translateY on hover - only zoom image */
    .ehh-grid-link:hover {
        transform: none !important;
    }

    /* Show desktop images, hide mobile images */
    .ehh-grid-image-mobile {
        display: none !important;
    }

    .ehh-grid-image-desktop {
        display: block !important;
    }

    .ehh-grid-image {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
    }

    .ehh-grid-label {
        color: #C99E41 !important;
        font-family: "Reddit Sans" !important;
        font-size: 25px !important;
        font-style: normal !important;
        font-weight: 800 !important;
        line-height: 25px !important;
        letter-spacing: 5px !important;
        text-transform: uppercase !important;
        margin-top: 28px;
        margin-bottom: 20px;
    }

    .ehh-grid-title {
        color: #FFF !important;
        font-family: "DM Serif Text" !important;
        font-size: 55px !important;
        font-style: normal !important;
        font-weight: 400 !important;
        line-height: 55px !important;
        letter-spacing: -1.1px !important;
        max-width: 820px;
    }
}

/* =============================================================================
   ANIMATIONS & TRANSITIONS
   ============================================================================= */

/* Fade in animation */
@keyframes ehh-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.elegant-horoskop-home-wrapper > * {
    animation: ehh-fade-in 0.6s ease forwards !important;
}

.ehh-astro-button-container {
    animation-delay: 0.1s !important;
}

.ehh-main-heading {
    animation-delay: 0.2s !important;
}

.ehh-zodiac-carousel {
    animation-delay: 0.3s !important;
}

.ehh-horoscope-grid {
    animation-delay: 0.4s !important;
}

/* Active carousel slide highlight */
.ehh-carousel-slide.is-active {
    opacity: 1 !important;
}

.ehh-carousel-slide.is-inactive {
    opacity: 1 !important; /* Keep all slides fully visible */
}

/* =============================================================================
   MOBILE STYLES
   ============================================================================= */

@media (max-width: 768px) {
    .ehh-grid-label {
        max-width: 140px !important;
    }
}
