/**
 * Zeora Founders CSS
 * Styles for the Founders shortcode and modal
 */

/* Base Styles */
.zeora-founders-container {
    margin: 0;
}

.zeora-founders-intro {
    margin-bottom: 2rem;
}

.zeora-founders {
    position: relative;
}

/* Grid Layout */
.zeora-founders.layout-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.zeora-founders.layout-grid .founders-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    width: 100%;
}

/* Column Settings */
.zeora-founders.layout-grid.columns-2 .founder-card {
    width: calc(50% - 1rem);
}

.zeora-founders.layout-grid.columns-3 .founder-card {
    width: calc(33.333% - 1.33rem);
}

.zeora-founders.layout-grid.columns-4 .founder-card {
    width: calc(25% - 1.5rem);
}

/* Slider Layout */
.zeora-founders.layout-slider {
    display: flex;
    align-items: center;
}

.zeora-founders.layout-slider .founders-wrapper {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding: 1rem 0;
}

.zeora-founders.layout-slider .founder-card {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
}

.zeora-founders.layout-slider.columns-2 .founder-card {
    flex: 0 0 50%;
    max-width: 50%;
}

.zeora-founders.layout-slider.columns-3 .founder-card {
    flex: 0 0 33.333%;
    max-width: 33.333%;
}

.zeora-founders.layout-slider.columns-4 .founder-card {
    flex: 0 0 25%;
    max-width: 25%;
}

/* Slider Navigation */
.zeora-founders .slider-nav {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    transition: background-color 0.3s;
    z-index: 2;
}

.zeora-founders .slider-nav:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.zeora-founders .slider-nav svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Founder Card */
.founder-card {
    cursor: pointer;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.founder-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.founder-photo {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.founder-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.founder-card:hover .founder-photo img {
    transform: scale(1.05);
}

.founder-info {
    padding: 1.5rem;
}

.founder-name {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    line-height: 1.2;
}

.founder-title {
    margin: 0 0 1rem;
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 500;
}

.founder-short-desc {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.founder-card-action {
    display: flex;
    justify-content: flex-end;
}

.read-more {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 2px;
}

.read-more:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s;
}

.founder-card:hover .read-more:after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Modal Styles */
body.modal-open {
    overflow: hidden;
    margin-right: 15px; /* Prevent layout shift when scrollbar disappears */
}

.founder-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: none; /* Hide default cursor */
    /* Background will be controlled via JavaScript for smooth transition */
    overflow-y: auto; /* Enable scrolling on the overlay */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.founder-modal-overlay.visible {
    opacity: 1;
}

.founder-modal {
    min-height: 100vh; /* Ensure at least full viewport height */
    width: 100%;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.founder-modal-content {
    display: flex;
    min-height: 100vh; /* Ensure full height on desktop */
    width: 100%;
    overflow: hidden; /* Prevent any content from overflowing during animations */
}

/* Panel Animation - Slide in from right */
.founder-left,
.founder-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.founder-left.slide-in,
.founder-right.slide-in {
    opacity: 1;
    transform: translateX(0);
}

/* Content Animation - Fade up */
.modal-title,
.modal-name,
.modal-description,
.modal-social-links {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.modal-title.fade-in-up,
.modal-name.fade-in-up,
.modal-description.fade-in-up,
.modal-social-links.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

/* Panel Styles */
.founder-left {
    width: 50%;
    padding: 60px;
    background: white;
    color: black;
    position: relative;
    z-index: 1; /* Ensure the panel is above the overlay for transition */
    overflow-y: auto !important; /* Force scrolling in left panel */
    height: 100vh; /* Set height to 100vh for desktop */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.founder-right {
    width: 50%;
    background: black;
    overflow: hidden;
    position: relative;
    z-index: 1; /* Ensure the panel is above the overlay for transition */
    height: 100vh; /* Set height to 100vh for desktop */
}

.founder-modal .founder-right img.modal-image {
    width: 100%;
    height: 100%;
    position: absolute; /* Fixed: Make sure image fills the container */
    left: 0;
    top: 0; /* Fixed: Position from top */
    bottom: 0;
    object-fit: cover;
    object-position: center center;
}

.founder-modal .modal-title {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var( --e-global-color-primary ); /* Ensure visibility */
}

.founder-modal h2.modal-name {
    font-size: 2.5rem;
    margin: 0 0 2rem;
    line-height: 1.2;
    color: #212427;
}

.modal-description {
    margin-bottom: 2rem;
    line-height: 1.7;
}

.modal-description p {
    margin-bottom: 1rem;
}

.modal-social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f5f5f5;
    transition: background-color 0.3s;
}

.social-link:hover {
    background-color: #e0e0e0;
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: #333;
}

/* Enhanced Custom Cursor - Nectar style close indicator */
.nectar-close-indicator {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    display: none;
    transform: translate(-50%, -50%); /* Center the cursor on mouse position */
}

.nectar-close-indicator.visible {
    display: block;
}

.nectar-close-indicator .inner {
    position: relative;
    height: 40px;
    width: 40px;
    display: block;
}

.nectar-close-indicator .inner .inner-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
    transform: translateZ(0);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* X icon with inverse color */
.nectar-close-indicator .inner .inner-layer i {
    position: relative;
    width: 20px;
    height: 20px;
    mix-blend-mode: difference; /* This makes the color inverse to the background */
}

.nectar-close-indicator .inner .inner-layer i:before,
.nectar-close-indicator .inner .inner-layer i:after {
    content: '';
    position: absolute;
    background-color: #fff; /* Base color - will be inverted with mix-blend-mode */
    width: 100%;
    height: 2px;
    top: 9px;
    left: 0;
}

.nectar-close-indicator .inner .inner-layer i:before {
    transform: rotate(45deg);
}

.nectar-close-indicator .inner .inner-layer i:after {
    transform: rotate(-45deg);
}

/* Ken Burns animation */
@keyframes kenBurnsFullscreen {
    0% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1.0);
    }
    100% {
        transform: scale(1.2);
    }
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .founder-left {
        padding: 40px;
    }
}

@media (max-width: 991px) {
    .zeora-founders.layout-grid.columns-3 .founder-card,
    .zeora-founders.layout-grid.columns-4 .founder-card {
        width: calc(50% - 1rem);
    }
    
    .zeora-founders.layout-slider.columns-3 .founder-card,
    .zeora-founders.layout-slider.columns-4 .founder-card {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Important mobile changes */
    .founder-modal-content {
        flex-direction: column-reverse;
        height: auto; /* Auto height for mobile */
        min-height: unset; /* Reset min-height for mobile */
    }
    
    .founder-left, .founder-right {
        width: 100%;
        height: auto; /* Reset the height for mobile */
    }
    
    .founder-left {
        overflow-y: visible !important; /* Let the overlay handle scrolling */
        max-height: none; /* No max height on mobile */
    }
    
    .founder-right {
        height: 50vh; /* Fixed height for image section on mobile */
    }
    
    /* Adjust animation direction for mobile */
    .founder-left,
    .founder-right {
        transform: translateY(30px);
    }
    
    .founder-left.slide-in,
    .founder-right.slide-in {
        transform: translateY(0);
    }
}

@media (max-width: 767px) {
    .zeora-founders.layout-grid .founder-card {
        width: 100%!important;
    }
    
    .zeora-founders.layout-slider .founder-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .founder-photo {
        height: 250px;
    }
    
    .founder-left {
        padding: 30px 20px 60px;
    }
    
    .modal-name {
        font-size: 2rem;
    }
}