/**
 * Project Slider V2 - Custom Styles
 * Design based on new layout with Tailwind CSS
 */

/* Base container - Max width 1440px */
.project-slider-v2-container {
    max-width: 1440px;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
}

/* WordPress layout constraint fix */
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 1440px !important;
}

/* Main swiper container */
.project-slider-v2 {
    max-height: 850px;
    max-width: 1440px;
    width: 100%;
    position: relative;
    background-color: #026938;
    border-radius: 2px;
    overflow: hidden;
}

/* Swiper container */
.project-slider-v2 .swiper {
    width: 100%;
    height: 100%;
}

/* Slide content */
.slide-content {
    display: flex;
    overflow: hidden;
    height: 662px;
    padding-right: 60px;
    margin-top: 50px;
}

/* Slide image section */
.slide-image {
    flex: 1;
    position: relative;
    margin-right: 84px;
    max-height: 662px;
    margin-top: 14px;
    margin-bottom: 36px;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image placeholder */
.image-placeholder {
    background: linear-gradient(45deg, #f3f4f6 25%, transparent 25%), 
                linear-gradient(-45deg, #f3f4f6 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f3f4f6 75%), 
                linear-gradient(-45deg, transparent 75%, #f3f4f6 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
    text-align: center;
    width: 100%;
    height: 662px;
}

/* Slide sidebar */
.slide-sidebar {
    margin-right: 60px;
    position: static;
    width: 330px;
    margin-top: 5px;
    flex-shrink: 0;
    background: #026938;
    color: white;
    display: flex;
    flex-direction: column;
}

.flex-shrink-0 {
    margin: 20px 0;
}

/* Dragon background decoration */
.dragon-bg {
    position: absolute;
    right: 0;
    width: 485px;
    top: 33%;
    height: 580px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 50;
    cursor: pointer;
    text-decoration: none;
    display: block;
    transition: opacity 0.3s ease;
}

.dragon-bg:hover {
    opacity: 0.9;
}

.slide-sidebar h1 {
    font-size: 32px;
    font-weight: 700;
    line-height: 40px;
    margin: 0;
    position: relative;
    z-index: 2;
}

.leading-tight {
    line-height: 40px !important;
    color: white !important;
}

.divider {
    width: 130px;
    height: 0px;
    border: 1px solid #FFFFFF;
    opacity: 1;
    transform: rotate(0deg);
    margin: 40px 0;
}

.slide-sidebar h3 {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: white;
}

.slide-sidebar .text-sm {
    font-size: 16px;
    margin: 0;
    font-weight: 400;
    line-height: 24px;
    margin: 0;
}

.slide-sidebar .text-xs {
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    margin: 0;
}

.slide-sidebar .font-medium {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    margin: 0;
}

.slide-sidebar .font-semibold {
    font-weight: 600;
}

.slide-sidebar .font-bold {
    font-weight: 700;
}

/* Grid layouts */
.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gap-4 {
    gap: 1rem;
    margin-top: 30px !important;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

/* Contact button */
.contact-btn {
    width: 156px !important;
    background: white;
    color: #026938;
    margin-top: 20px;
    font-weight: 600;
    padding: 12px 16px;
    font-size: 16px !important;
    line-height: 24px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease;
    display: block;
    text-align: center;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.contact-btn:hover {
    background: #f3f4f6;
    transform: none !important;
    scale: 1 !important;
}

/* Disable all hover scale effects */
.project-slider-v2 .swiper-slide,
.project-slider-v2 .slide-content,
.project-slider-v2 .slide-image,
.project-slider-v2 .slide-image img,
.project-slider-v2 .swiper-slide * {
    transition: none !important;
    transform: none !important;
}

.project-slider-v2 .swiper-slide:hover,
.project-slider-v2 .slide-content:hover,
.project-slider-v2 .slide-image:hover,
.project-slider-v2 .slide-image img:hover,
.project-slider-v2 .swiper-slide:hover * {
    transform: none !important;
}

/* Custom controls positioned below the slider */
.controls-container {
    margin: 15px auto 150px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    gap: 20px;
}

.swiper-button-prev,
.swiper-button-next {
    position: static !important;
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    color: white !important;
    background: transparent;
    transition: all 0.3s ease;
    outline: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-button-prev:after,
.swiper-button-next:after {
    font-size: 12px !important;
    font-weight: bold;
    color: white;
}

.swiper-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.swiper-pagination {
    position: static !important;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

/* Fix bullet dots - High specificity to override Swiper defaults */
.project-slider-v2 .swiper-pagination .swiper-pagination-bullet,
.swiper-pagination .swiper-pagination-bullet {
    outline: none;
    border: none;
    width: 8px !important;
    height: 8px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    border-radius: 4px !important;
    opacity: 1 !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
    cursor: pointer !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

.project-slider-v2 .swiper-pagination .swiper-pagination-bullet-active,
.swiper-pagination .swiper-pagination-bullet-active {
    width:  40px !important;
    height: 8px !important;
    background: white !important;
    border-radius: 4px !important;
    opacity: 1 !important;
}

/* Additional bullet styles to ensure they work */
.project-slider-v2 .swiper-pagination-bullet {
    min-width: 8px !important;
    min-height: 8px !important;
    box-sizing: border-box !important;
}

.project-slider-v2 .swiper-pagination-bullet-active {
    min-width: 24px !important;
    min-height: 8px !important;
}

.project-slider-v2-container {
    position: relative;
}

/* Responsive Design */
@media (max-width: 1440px) {
    .project-slider-v2-container {
        padding: 0;
    }
}

@media (max-width: 1200px) {
    .project-slider-v2-container {
        padding: 0;
    }
    
    .slide-content {
        height: 600px;
    }
    
    .slide-sidebar {
        width: 300px;
    }
}

@media (max-width: 992px) {
    .slide-content {
        height: 550px;
        padding: 20px;
    }
    
    .slide-sidebar {
        width: 280px;
        padding: 0;
    }
    
    .slide-sidebar h1 {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .project-slider-v2-container {
        padding: 0;
    }
    
    .slide-content {
        flex-direction: column;
        height: auto;
        min-height: 700px;
        padding: 20px;
    }
    
    .slide-image {
        flex: none;
        height: 300px;
        margin-right: 0;
        margin-bottom: 0;
    }
    
    .slide-sidebar {
        flex: none;
        width: 100%;
        height: 400px;
        padding: 0;
    }
    
    .slide-sidebar h1 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .space-y-4 > * + * {
        margin-top: 0.75rem;
    }
    
    /* Hide dragon on mobile */
    .slide-sidebar .dragon-bg {
        display: none;
    }

    .controls-container {
        margin: 0;
    }
}

@media (max-width: 480px) {
    .slide-image {
        height: 250px;
    }
    
    .slide-sidebar {
        height: 350px;
        padding: 0.75rem;
    }
    
    .slide-sidebar h1 {
        font-size: 0.9rem;
    }
    
    .slide-sidebar .text-sm {
        font-size: 0.8rem;
    }
    
    .slide-sidebar .text-xs {
        font-size: 0.7rem;
    }
    
    .contact-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .controls-container {
        margin: 0;
    }
}

/* Loading animation */
.project-slider-v2.loading {
    position: relative;
}

.project-slider-v2.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #026938;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility improvements */
.project-slider-v2 .swiper-slide:focus {
    outline: 2px solid #026938;
    outline-offset: 2px;
}

.swiper-button-next:focus,
.swiper-button-prev:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .swiper-button-next,
    .swiper-button-prev,
    .swiper-pagination {
        display: none !important;
    }
    
    .slide-content {
        break-inside: avoid;
        page-break-inside: avoid;
    }

/* High contrast mode */
@media (prefers-contrast: high) {
.project-slider-v2 {
border: 3px solid #000000;
}
    
.swiper-button-next,
.swiper-button-prev {
background: #000000 !important;
color: #ffffff !important;
}
}

@media screen and (max-width: 1150px) {
    .slide-sidebar {
        margin-right: 0;
    }
}


/* Custom responsive styles */
@media screen and (max-width: 770px) {
.controls-container {
margin: 40px auto;
}
    
.divider {
margin: 20px 0;
}
    
.leading-tight {
line-height: 25px !important;
}
}

@media screen and (max-width: 500px) {
.slide-content {
padding-right: 0px;
}
    
.divider {
margin: 20px 0;
}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
.slide-content,
.slide-image img,
.contact-btn,
.swiper-button-next,
.swiper-button-prev {
transition: none !important;
animation: none !important;
}
}
    .contact-btn,
    .swiper-button-next,
    .swiper-button-prev {
        transition: none !important;
        animation: none !important;
    }
} 