/*
Theme Name: Kabia Theme
Description: Child theme for Hello Elementor, optimized for Kabia
Author: Senior WP Architect
Template: hello-elementor
Version: 1.0.0
*/

/* ==========================================================================
   GLOBAL DESIGN SYSTEM (Variables)
   ========================================================================== */
:root {
    /* Colors */
    --prm-color: #49283b; /* Brand Primary - Deep Plum */
    --prm-color-hover: #311a27;
    --sec-color: #F8B400; /* Accent - Golden */
    --text-main: #333333;
    --text-light: #666666;
    --bg-light: #F4F7F6;
    --bg-white: #FFFFFF;
    
    /* Typography */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Effects */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.05);
}

/* ==========================================================================
   GLOBAL TYPOGRAPHY
   ========================================================================== */
body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.text-gradient {
    background: linear-gradient(90deg, var(--prm-color), var(--sec-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-primary {
    background-color: var(--prm-color);
    color: var(--bg-white);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background-color: var(--prm-color-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

/* ==========================================================================
   FLOATING MENU
   ========================================================================== */
.kabia-floating-menu {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    width: 100%;
    max-width: 1200px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.floating-menu-brand a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
}
/* Circle container: applied to the <a> wrapper WordPress generates */
.floating-menu-brand .custom-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    overflow: hidden;       /* clips the image to the circle */
    flex-shrink: 0;
}

.floating-menu-brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;    /* keeps logo proportional inside the circle */
    display: block;
    padding: 4px;
    box-sizing: border-box;
}

.floating-menu-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.floating-menu-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.floating-cta {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.floating-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 0;
    transition: transform 0.3s ease;
}

.floating-menu-toggle:focus {
    outline: none;
}

.kabia-floating-menu ul.floating-menu-list {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 32px;
}

.kabia-floating-menu ul.floating-menu-list li {
    margin: 0;
    padding: 0;
}

.kabia-floating-menu ul.floating-menu-list li a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.kabia-floating-menu ul.floating-menu-list li a i {
    margin-right: 8px;
    font-size: 16px;
}

.kabia-floating-menu ul.floating-menu-list li a:hover,
.kabia-floating-menu ul.floating-menu-list li.current-menu-item a {
    color: var(--prm-color);
}

/* ==========================================================================
   FLOATING MENU — SCROLLED STATE
   Triggered by JS adding .is-scrolled when window.scrollY > 60
   ========================================================================== */
.kabia-floating-menu.is-scrolled {
    background-color: #ffffff !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    top: 0;
    border-radius: 0;
    max-width: 100%;
    left: 0;
    transform: none;
    padding: 10px 40px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-top: none;
    border-left: none;
    border-right: none;
}

/* Dark text for nav links when scrolled */
.kabia-floating-menu.is-scrolled ul.floating-menu-list li a {
    color: #333333 !important;
}
.kabia-floating-menu.is-scrolled ul.floating-menu-list li a:hover,
.kabia-floating-menu.is-scrolled ul.floating-menu-list li.current-menu-item a {
    color: var(--prm-color) !important;
}

/* Hamburger icon dark when scrolled */
.kabia-floating-menu.is-scrolled .floating-menu-toggle {
    color: #333333;
}

/* Logo circle stays white — reinforce on scrolled */
.kabia-floating-menu.is-scrolled .floating-menu-brand .custom-logo-link {
    border-color: rgba(73, 40, 59, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Mobile adjustments */
@media (max-width: 992px) {
    .kabia-floating-menu {
        top: 16px;
        width: calc(100% - 32px);
        padding: 12px 24px;
    }

    /* Scrolled on mobile: full-width bar */
    .kabia-floating-menu.is-scrolled {
        top: 0;
        width: 100%;
        border-radius: 0;
        padding: 10px 20px;
    }
    
    .floating-cta {
        display: none;
    }
    
    .floating-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.1);
    }

    .kabia-floating-menu.is-scrolled .floating-menu-toggle {
        background-color: rgba(0, 0, 0, 0.05);
        color: #333333;
    }
    
    .floating-menu-toggle.is-active {
        transform: rotate(90deg);
        color: var(--prm-color);
    }
    
    .floating-menu-center {
        display: none; /* hidden by default */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: inherit;
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 24px;
        border-radius: 20px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        margin-top: 12px;
    }
    
    .floating-menu-center.is-open {
        display: flex;
    }
    
    .kabia-floating-menu ul.floating-menu-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        width: 100%;
    }
    
    .kabia-floating-menu ul.floating-menu-list li {
        width: 100%;
    }
    
    .kabia-floating-menu ul.floating-menu-list li a {
        width: 100%;
        font-size: 16px;
        padding: 8px 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .kabia-floating-menu ul.floating-menu-list li:last-child a {
        border-bottom: none;
    }
}

/* ==========================================================================
   KABIA POST CARD WIDGET
   ========================================================================== */
.kabia-post-card {
    position: relative;
    display: block;
    width: 100%;
    max-width: 340px;
    max-height: 460px;
    margin: 0 auto; /* Center it if container is larger */
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    /* Maintain a roughly 4:5 aspect ratio for cards */
    aspect-ratio: 4/5;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.kabia-post-card:focus-visible {
    outline: 2px solid var(--sec-color);
    outline-offset: 4px;
}

.kabia-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.kpc-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
}

.kabia-post-card:hover .kpc-image {
    transform: scale(1.05);
}

.kpc-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #43073600 35%, #430736F2 100%);
    pointer-events: none;
    z-index: 1;
}

.kpc-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background-color: var(--sec-color); /* Yellow Accent */
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.kpc-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kpc-title {
    color: var(--bg-white);
    font-size: clamp(18px, 5vw, 24px);
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kpc-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.kpc-meta-item {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kpc-meta-item i,
.kpc-meta-item svg {
    color: var(--sec-color);
}

/* ==========================================================================
   DYNAMIC POST CAROUSEL WIDGET
   ========================================================================== */
.kabia-carousel-wrapper {
    position: relative;
    width: 100%;
}

.kabia-scroll-container {
    display: flex;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Hide scrollbar Firefox */
    -webkit-overflow-scrolling: touch;
    gap: 20px;
    padding: 10px 0;
}

.kabia-scroll-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
}

.kabia-scroll-item {
    scroll-snap-align: start;
    flex: 0 0 calc(100% - 40px); /* Mobile default */
}

@media (min-width: 768px) {
    .kabia-scroll-item {
        flex: 0 0 calc(50% - 10px); /* Tablet: 2 columns */
    }
}

@media (min-width: 1024px) {
    .kabia-scroll-item {
        flex: 0 0 calc(33.333% - 14px); /* Desktop: 3 columns */
    }
}

/* Make sure the post card within the carousel takes full height/width of item */
.kabia-scroll-item .kabia-post-card {
    height: 100%;
    width: 100%;
}

/* Navigation Container Options */
.kabia-carousel-nav-container {
    display: flex;
    gap: 10px;
    z-index: 10;
}

/* Top Right */
.nav-pos-top-right .kabia-carousel-nav-container {
    position: absolute;
    top: -50px;
    right: 0;
}

/* Top Left */
.nav-pos-top-left .kabia-carousel-nav-container {
    position: absolute;
    top: -50px;
    left: 0;
}

/* Center */
.nav-pos-center .kabia-carousel-nav-container {
    position: absolute;
    top: 50%;
    left: -20px;
    right: -20px;
    transform: translateY(-50%);
    justify-content: space-between;
    pointer-events: none; /* So clicks pass through to cards if they overlap */
}

.nav-pos-center .kabia-carousel-nav-btn {
    pointer-events: auto; /* Re-enable clicks for the buttons */
}

/* Bottom */
.nav-pos-bottom .kabia-carousel-nav-container {
    position: relative;
    justify-content: center;
    margin-top: 20px;
}

/* Navigation Buttons */
.kabia-carousel-nav-btn {
    background-color: var(--prm-color);
    color: var(--bg-white);
    border: 1px solid transparent;
    min-width: 40px;
    min-height: 40px;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.kabia-carousel-nav-btn:hover {
    background-color: var(--prm-color-hover);
    transform: scale(1.1);
}

.kabia-carousel-nav-btn i {
    font-size: 16px;
}

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */
.kabia-site-footer {
    background: linear-gradient(135deg, #2b1522 0%, #49283b 100%);
    color: #ffffff;
    font-family: var(--font-body);
    padding: 60px 0 0 0;
}
.kabia-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr 1.5fr;
    gap: 40px;
}
.kabia-footer-heading {
    color: #f7b731;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
}
.kabia-footer-text {
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}
.kabia-footer-col-1 .kabia-footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.kabia-footer-logo img {
    max-width: 60px;
    height: auto;
}
.kabia-footer-logo-text h3 {
    margin: 0;
    font-size: 22px;
    color: #fff;
    font-weight: 700;
}
.kabia-footer-logo-text h3 span {
    color: #f7b731;
}
.kabia-footer-logo-text p {
    margin: 0;
    font-size: 10px;
    color: #f7b731;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.kabia-footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.kabia-footer-menu li {
    margin-bottom: 12px;
}
.kabia-footer-menu a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}
.kabia-footer-menu a:hover {
    color: #f7b731;
}
.kabia-footer-contact-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #e0e0e0;
}
.kabia-footer-contact-item i {
    color: #f7b731;
    font-size: 18px;
    margin-top: 4px;
}
.kabia-footer-social-icons {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}
.kabia-footer-social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    transition: background 0.3s;
}
.kabia-footer-social-icons a:hover {
    background: rgba(255,255,255,0.3);
}
.kabia-footer-social-icons a.youtube { background: #ff0000; }
.kabia-footer-social-icons a.youtube:hover { background: #cc0000; }

.kabia-footer-social-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px;
}
.kabia-footer-social-box a {
    color: #f7b731;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}
.kabia-footer-social-box p {
    margin: 0;
    font-size: 12px;
    color: #ccc;
    line-height: 1.5;
}
.kabia-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 60px;
    padding: 20px 0;
    text-align: center;
}
.kabia-footer-bottom p {
    margin: 0;
    font-size: 13px;
    color: #aaa;
}

@media (max-width: 991px) {
    .kabia-footer-container {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 767px) {
    .kabia-footer-container {
        grid-template-columns: 1fr;
    }
    .kabia-footer-col {
        margin-bottom: 30px;
    }
}

