/* Modern Animated Split Sections - New Design */

/* Base split section container */
.split-section {
    width: 100%;
    min-height: 600px;
    margin: 150px 0;
    padding: 0 40px;
    background: transparent !important;
    position: relative;
    overflow: hidden;
    opacity: 0; /* Start invisible */
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Animation states */
.split-section.visible {
    opacity: 1;
}

.split-section.hidden {
    opacity: 0;
}

/* Split container with updated design */
.split-container {
    display: flex;
    flex-direction: row;
    min-height: 600px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    gap: 60px; /* Reduced from 80px for more balanced spacing */
    align-items: center;
    background: transparent !important;
    perspective: 1000px; /* 3D perspective for animations */
}

/* Position variant */
.split-container.position-right {
    flex-direction: row-reverse;
}

/* Image Side with 3D animations - SMALLER SIZE AT 100% */
.split-image {
    flex: 1;
    background-size: contain; /* Changed from 'cover' to 'contain' to show 100% of image */
    background-position: center;
    background-repeat: no-repeat;
    min-height: 500px;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    box-shadow: none;
    transform: translateX(-80px) rotateY(15deg);
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
    will-change: transform, opacity;
}

.position-right .split-image {
    transform: translateX(80px) rotateY(-15deg);
}

/* Image hover effects - SIMPLIFIED */
.split-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), transparent);
    transition: opacity 0.5s ease;
    opacity: 0;
    z-index: 1;
}

.split-section.visible .split-image {
    transform: translateX(0) rotateY(0);
    opacity: 1;
}

.split-container:hover .split-image {
    transform: scale(1.03) translateZ(10px); /* Reduced 3D effect */
    box-shadow: none; /* Ensure no shadow appears on hover */
}

/* Content Side with float-in animations - EQUAL SIZE */
.split-content {
    flex: 1; /* Changed from 1.4 to make equal to image side */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    background: transparent !important;
    position: relative;
    transform: translateX(80px);
    opacity: 0;
    transition: all 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.position-right .split-content {
    transform: translateX(-80px);
}

.split-section.visible .split-content {
    transform: translateX(0);
    opacity: 1;
}

/* Modern glass-like content wrapper */
.split-content-wrapper {
    padding: 3rem;
    background: transparent !important; /* Removed background completely */
    border: none !important;
    box-shadow: none !important;
    min-height: 400px;
    position: relative;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Subtle animated gradient border */
.split-content-wrapper::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #D4AF37, transparent, #D4AF37, transparent);
    background-size: 400% 400%;
    border-radius: 22px;
    z-index: -1;
    animation: gradientBorder 8s ease infinite;
    opacity: 0.5;
}

@keyframes gradientBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Content typography - ENHANCED */
.split-content h1 {
    font-family: 'Bodoni Moda', serif;
    font-size: 3.2rem;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 0.5rem;
}

.split-content h1::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 2px;
    background: var(--gold-gradient);
}

.split-content p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 2rem;
    color: #333;
    max-width: 600px;
    font-style: italic;
    letter-spacing: 0.3px;
}

.split-button {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 1rem 2.5rem;
    background: transparent;
    color: #1a1a1a;
    border: 1px solid var(--primary-color);
    transition: all 0.4s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

/* Modernized title with stagger animation */
.split-content h1 {
    font-family: var(--heading-font);
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    position: relative;
    padding-bottom: 1.5rem;
    transform: translateY(40px);
    opacity: 0;
    transition: transform 1s ease, opacity 1s ease;
    transition-delay: 0.3s;
    font-weight: 500;
    letter-spacing: 0;
    overflow: hidden;
    display: inline-block;
}

.split-section.visible .split-content h1 {
    transform: translateY(0);
    opacity: 1;
}

/* Elegant animated underline */
.split-content h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gold-gradient);
    transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: 0.8s;
    border-radius: 3px;
}

.split-section.visible .split-content h1::after {
    width: 100px;
}

/* Description with staggered animation */
.split-content p {
    font-family: var(--accent-font);
    font-size: 1.15rem;
    color: #333;
    margin-bottom: 2.5rem;
    line-height: 1.8;
    max-width: 500px;
    transform: translateY(30px);
    opacity: 0;
    transition: transform 1s ease, opacity 1s ease;
    transition-delay: 0.5s;
    position: relative;
    padding-left: 25px;
}

.split-section.visible .split-content p {
    transform: translateY(0);
    opacity: 1;
}

/* Elegant quote mark */
.split-content p::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -5px;
    font-size: 2rem;
    color: rgba(212, 175, 55, 0.4);
    font-family: Georgia, serif;
    line-height: 1;
    opacity: 0;
    transform: translateY(10px);
    transition: transform 0.8s ease, opacity 0.8s ease;
    transition-delay: 0.7s;
}

.split-section.visible .split-content p::before {
    opacity: 1;
    transform: translateY(0);
}

/* Button with reveal animation */
.split-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 1.2rem 2.8rem;
    background: #1a1a1a;
    color: #ffffff;
    font-family: var(--menu-font);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transform: translateY(30px);
    opacity: 0;
    transition: transform 1s ease, opacity 1s ease, all 0.4s ease;
    transition-delay: 0.7s;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.split-section.visible .split-button {
    transform: translateY(0);
    opacity: 1;
}

/* Button hover effects */
.split-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gold-gradient);
    z-index: -1;
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.split-button::after {
    content: '→';
    font-size: 1.1rem;
    transition: transform 0.3s ease;
    display: inline-block;
    margin-left: 5px;
    transform: translateX(-5px);
    opacity: 0;
}

.split-button:hover {
    color: #000;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.4);
    padding-right: 3.2rem;
}

.split-button:hover::before {
    transform: translateX(0);
}

.split-button:hover::after {
    transform: translateX(5px);
    opacity: 1;
}

/* Animated stats with counter effect */
.split-features {
    display: flex;
    gap: 2rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    transform: translateY(30px);
    opacity: 0;
    transition: transform 1s ease, opacity 1s ease;
    transition-delay: 0.9s;
    width: 100%;
}

.split-section.visible .split-features {
    transform: translateY(0);
    opacity: 1;
}

.feature-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.7);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    flex: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transform: translateY(15px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.feature-item:nth-child(1) { transition-delay: 1s; }
.feature-item:nth-child(2) { transition-delay: 1.1s; }
.feature-item:nth-child(3) { transition-delay: 1.2s; }

.split-section.visible .feature-item {
    transform: translateY(0);
    opacity: 1;
}

.feature-number {
    font-family: var(--heading-font);
    font-size: 2rem;
    color: #D4AF37;
    font-weight: 500;
    margin-bottom: 0.4rem;
    display: block;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

/* Animated number counter effect handled by JS */
.feature-number.counting {
    position: relative;
}

.feature-number.counting::after {
    content: '+';
    position: absolute;
    right: -15px;
    top: 0;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease 1.3s;
}

.split-section.visible .feature-number.counting::after {
    opacity: 1;
    transform: translateX(0);
}

.feature-label {
    font-family: var(--menu-font);
    font-size: 0.8rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    opacity: 0.8;
}

/* Enhanced hover effects - SIMPLIFIED */
.split-container:hover .split-content-wrapper {
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.15),
        0 1px 10px rgba(255, 255, 255, 0.4),
        inset 0 0 30px rgba(255, 255, 255, 0.6);
}

.split-container:hover .feature-item {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(212, 175, 55, 0.2);
}

/* Exit animations when scrolling away */
.split-section.exiting .split-image {
    transform: translateX(-50px) scale(0.95);
    opacity: 0;
    transition: all 0.8s ease;
    box-shadow: none; /* Ensure no shadow appears when exiting */
}

.split-section.exiting.position-right .split-image {
    transform: translateX(50px) scale(0.95);
}

.split-section.exiting .split-content {
    transform: translateX(50px);
    opacity: 0;
    transition: all 0.8s ease;
}

.split-section.exiting.position-right .split-content {
    transform: translateX(-50px);
}

/* Responsive adaptations */
@media (max-width: 1200px) {
    .split-section {
        margin: 100px 0;
        padding: 0 30px;
    }
    
    .split-container {
        gap: 40px;
    }
    
    .split-content-wrapper {
        padding: 3rem;
    }
    
    .split-content h1 {
        font-size: 2.8rem;
    }
    
    /* Adjust flex ratio for smaller screens - EQUAL SIZE */
    .split-image {
        flex: 1; /* Equal size */
    }
    
    .split-content {
        flex: 1; /* Equal size */
    }
}

@media (max-width: 992px) {
    .split-section {
        margin: 80px 0;
        padding: 0 20px;
    }
    
    .split-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .position-right.split-container {
        flex-direction: column;
    }
    
    .split-image {
        min-height: 350px;
        width: 100%;
        background-size: contain; /* Ensure 'contain' is used at all breakpoints */
        border-radius: 0;
        flex: 1;
    }
    
    .split-content {
        transform: translateY(40px) !important;
        flex: 1; /* Reset flex for column layout */
    }
    
    .split-section.visible .split-image,
    .split-section.visible .split-content {
        transform: translateY(0) !important;
    }
    
    .split-section.exiting .split-image {
        transform: translateY(-40px) !important;
    }
    
    .split-section.exiting .split-content {
        transform: translateY(40px) !important;
    }
    
    .split-content-wrapper {
        padding: 3rem;
        background: transparent !important; /* Removed background on mobile */
        min-height: auto;
    }
    
    .split-content h1 {
        font-size: 2.6rem;
    }
    
    .split-content p {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .split-section {
        margin: 60px 0;
    }
    
    .split-image {
        min-height: 300px;
        background-size: contain; /* Ensure 'contain' is used at all breakpoints */
    }
    
    .split-content-wrapper {
        padding: 2.5rem 2rem;
        background: transparent !important; /* Removed background on mobile */
        border-radius: 0;
    }
    
    .split-content h1 {
        font-size: 2.2rem;
    }
    
    .split-content p {
        font-size: 1.15rem;
    }
}

@media (max-width: 576px) {
    .split-section {
        margin: 40px 0;
        padding: 0 15px;
    }
    
    .split-image {
        min-height: 220px;
        border-radius: 0;
    }
    
    .split-content-wrapper {
        padding: 2rem 1.5rem;
        background: transparent !important; /* Removed background on smallest screens */
        border-radius: 0;
    }
    
    .split-content h1 {
        font-size: 1.8rem;
    }
    
    .split-content p {
        font-size: 1.1rem;
    }
}
