/**
 * SG Slide Block Styles
 */

/* Admin notice for missing parameters */
.sg-slide-notice {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-left: 4px solid #ffb900;
    padding: 15px 20px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #333;
}

.sg-slide-outer {
    width: 100%;
    /* Add your background colors, gradients, or other styling here */
}

.sg-slide-block {
    padding: 60px 0;
    margin: 40px 0;
}

.sg-slide-content {
    max-width: 85%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.sg-slide-text {
    flex: 1;
    padding-right: 0;
    position: relative;
    z-index: 2;
}

.sg-slide-image {
    flex: 0 0 60%;
    max-width: 70%;
    position: relative;
    z-index: 1;
    margin-left: -20px;
}

.sg-slide-image img {
    width: 95%;
    height: auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: none;
    object-fit: cover;
}

/* Typography */
.sg-slide-title {
    font-size: 72px;
    line-height: 1.1;
    font-weight: 300;
    color: #000;
    margin: 0 0 30px 0;
    font-family: "Playfair Display", Georgia, serif;
}

.sg-slide-subtitle {
    font-size: 72px;
    line-height: 1.1;
    font-weight: 300;
    color: #000;
    margin: 0 0 40px 0;
    font-family: "Playfair Display", Georgia, serif;
}

.sg-slide-meta {
    margin-bottom: 30px;
}

.sg-slide-meta p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin: 5px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.sg-slide-date {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.sg-slide-body {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.sg-slide-body p {
    margin-bottom: 15px;
	font-size:1.2rem;
}

/* Desktop/Mobile Layout Control */
.sg-slide-desktop {
    display: flex;
}

.sg-slide-mobile {
    display: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sg-slide-desktop .sg-slide-image {
        flex: 0 0 55%;
        max-width: 65%;
        margin-left: -15px;
    }
}

@media (max-width: 768px) {
    /* Hide desktop, show mobile */
    .sg-slide-desktop {
        display: none !important;
    }
    
    .sg-slide-mobile {
        display: block !important;
        padding: 0;
    }
    
    /* Mobile content wrapper */
    .sg-slide-mobile .sg-slide-content {
        display: block !important;
        padding: 0 !important;
    }
    
    /* Mobile layout styles */
    .sg-slide-mobile .sg-slide-image {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 30px 0 !important;
        display: block !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    .sg-slide-mobile .sg-slide-image img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-shadow: none !important;
    }
    
    .sg-slide-mobile .sg-slide-text {
        display: block !important;
        text-align: left !important;
        padding: 0 20px !important;
        margin: 0 !important;
        width: 100% !important;
        position: relative !important;
        z-index: 2 !important;
    }
    
    .sg-slide-mobile .sg-slide-title,
    .sg-slide-mobile .sg-slide-subtitle {
        font-size: 36px !important;
        margin-bottom: 20px !important;
        line-height: 1.2 !important;
    }
    
    .sg-slide-mobile .sg-slide-body {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }
    
    .sg-slide-block {
        padding: 30px 0;
        margin: 15px 0;
    }
}

@media (max-width: 480px) {
    .sg-slide-content {
        padding: 0 10px;
    }
    
    .sg-slide-mobile .sg-slide-title,
    .sg-slide-mobile .sg-slide-subtitle {
        font-size: 28px !important;
        margin-bottom: 15px !important;
    }
    
    .sg-slide-mobile .sg-slide-text {
        padding: 0 15px !important;
    }
    
    .sg-slide-mobile .sg-slide-body {
        font-size: 14px !important;
    }
    
    .sg-slide-block {
        padding: 20px 0;
        margin: 10px 0;
    }
    
    .sg-carousel-container{
        padding: 0;
    }
}

/* Alternative layouts */
.sg-slide-block.reverse .sg-slide-content {
    flex-direction: row-reverse;
}

.sg-slide-block.reverse .sg-slide-text {
    padding-right: 0;
    padding-left: 40px;
}

@media (max-width: 992px) {
    .sg-slide-block.reverse .sg-slide-content {
        flex-direction: column;
    }
    
    .sg-slide-block.reverse .sg-slide-text {
        padding-left: 0;
    }
}

/* Dark theme variant */
.sg-slide-block.dark {
    background-color: #1a1a1a;
    color: #fff;
}

.sg-slide-block.dark .sg-slide-title,
.sg-slide-block.dark .sg-slide-subtitle {
    color: #fff;
}

.sg-slide-block.dark .sg-slide-meta p,
.sg-slide-block.dark .sg-slide-body {
    /* color: #e0e0e0; */
}

/* Full width variant */
.sg-slide-block.full-width {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.sg-slide-block.full-width .sg-slide-content {
    max-width: none;
    padding: 0 60px;
}

@media (max-width: 768px) {
    .sg-slide-block.full-width .sg-slide-content {
        padding: 0 20px;
    }
}

/**
 * Carousel Styles
 */
.sg-carousel-outer {
    width: 100%;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
}

.sg-carousel-wrapper {
    position: relative;
    /* background-color: #f5f5f5; */
    padding: 0;
    width: 100%;
    overflow: hidden;
    /* Remove fixed margins to allow centering */
    margin: 0;
}

.sg-carousel-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    overflow: hidden;
}

/* Desktop container - visible by default */
.sg-carousel-desktop {
    display: block;
}

/* Mobile container - hidden by default */
.sg-carousel-mobile {
    display: none;
}

.sg-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
    width: 100%; /* Default width - JS will override */

    position: relative;
    align-items: stretch; /* Ensure slides stretch to full height */
}

/* Single slide track takes full width */
.sg-carousel-wrapper.single-slide .sg-carousel-track {
    width: 100%;
    transform: none;
}

/* Ensure single slide is visible and properly positioned */
.sg-carousel-wrapper.single-slide .sg-carousel-slide {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.sg-carousel-wrapper.single-slide .sg-slide-content {
    width: 100%;
    display: flex;
    align-items: center;
}

.sg-carousel-slide {
    flex: 0 0 100%;
    width: 100%; /* Full width by default */
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0; /* Prevent slides from shrinking */
    visibility: visible;
    opacity: 1;
}

/* Single slide takes full width */
.sg-carousel-wrapper.single-slide .sg-carousel-slide {
    width: 100%;
    flex: 0 0 100%;
}

.sg-carousel-slide .sg-slide-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0 20px;
    gap: 20px;
    position: relative;
}

/* Carousel specific layout adjustments */
.sg-carousel-slide .sg-slide-image {
    margin-left: -10px;
}

@media (max-width: 992px) {
    /* Hide desktop container, show mobile container */
    .sg-carousel-desktop {
        display: none !important;
    }
    
    .sg-carousel-mobile {
        display: block !important;
    }
    
    /* Mobile carousel styles */
    .sg-carousel-mobile .sg-carousel-container {
        min-height: auto;
    }
    
    .sg-carousel-mobile .sg-slide-content {
        display: block !important;
        padding: 0 !important;
    }
    
    .sg-carousel-mobile .sg-slide-image {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 30px 0 !important;
        display: block !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    .sg-carousel-mobile .sg-slide-image img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-shadow: none !important;
    }
    
    .sg-carousel-mobile .sg-slide-text {
        display: block !important;
        padding: 0 20px !important;
        margin: 0 !important;
        text-align: left !important;
        width: 100% !important;
        position: relative !important;
        z-index: 2 !important;
    }
    
    .sg-carousel-mobile .sg-slide-title {
        font-size: 36px !important;
        margin-bottom: 20px !important;
        line-height: 1.2 !important;
    }
    
    .sg-carousel-mobile .sg-slide-body {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }
}

/* Navigation Buttons */
.sg-carousel-prev,
.sg-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #fff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Hide navigation buttons when there's only one slide */
.sg-carousel-wrapper.single-slide .sg-carousel-prev,
.sg-carousel-wrapper.single-slide .sg-carousel-next {
    display: none !important;
}

/* Show navigation buttons when there are multiple slides */
.sg-carousel-wrapper:not(.single-slide) .sg-carousel-prev,
.sg-carousel-wrapper:not(.single-slide) .sg-carousel-next {
    display: flex;
}

.sg-carousel-prev:hover,
.sg-carousel-next:hover {
    background: #000;
    border-color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.sg-carousel-prev:disabled,
.sg-carousel-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.sg-carousel-prev {
    left: 30px;
}

.sg-carousel-next {
    right: 30px;
}

.sg-carousel-prev svg,
.sg-carousel-next svg {
    width: 28px;
    height: 28px;
    color: #fff;
    stroke-width: 2.5;
}

/* Dots Navigation */
.sg-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    padding: 0 20px;
}

/* Hide dots when there's only one slide */
.sg-carousel-wrapper.single-slide .sg-carousel-dots {
    display: none !important;
}

/* Show dots when there are multiple slides */
.sg-carousel-wrapper:not(.single-slide) .sg-carousel-dots {
    display: flex;
}

.sg-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.sg-carousel-dot:hover {
    background: #999;
}

.sg-carousel-dot.active {
    background: #333;
    width: 32px;
    border-radius: 6px;
}

/* Carousel Responsive */
@media (max-width: 992px) {
    .sg-carousel-wrapper {
        padding: 0;
    }
    
    .sg-carousel-prev,
    .sg-carousel-next {
        width: 50px;
        height: 50px;
        background: rgba(0, 0, 0, 0.85);
    }
    
    .sg-carousel-prev {
        left: 15px;
    }
    
    .sg-carousel-next {
        right: 15px;
    }
    
    .sg-carousel-prev svg,
    .sg-carousel-next svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 768px) {
    .sg-carousel-wrapper {
        padding: 0;
        /* Remove margin to maintain centering */
        margin: 0;
    }
    
    .sg-carousel-container {
        min-height: auto;
        padding: 0 15px;
    }
    
    .sg-carousel-prev,
    .sg-carousel-next {
        width: 44px;
        height: 44px;
        background: rgba(0, 0, 0, 0.9);
        border-width: 1.5px;
    }
    
    .sg-carousel-prev svg,
    .sg-carousel-next svg {
        width: 22px;
        height: 22px;
    }
    
    .sg-carousel-prev {
        left: 10px;
    }
    
    .sg-carousel-next {
        right: 10px;
    }
    
    .sg-carousel-dots {
        margin-top: 20px;
    }
    
    /* Additional mobile fixes */
    .sg-carousel-mobile .sg-slide-title {
        font-size: 32px !important;
    }
    
    .sg-carousel-mobile .sg-slide-text {
        padding: 0 15px !important;
    }
}

@media (max-width: 480px) {
    .sg-carousel-container {
        padding: 0 10px;
    }
    
    .sg-carousel-mobile .sg-slide-title {
        font-size: 28px !important;
    }
    
    .sg-carousel-mobile .sg-slide-body {
        font-size: 14px !important;
    }
    
    .sg-carousel-mobile .sg-slide-text {
        padding: 0 10px !important;
    }
}

/* Dark theme for carousel */
.sg-carousel-wrapper.dark {
    background-color: #1a1a1a;
}

.sg-carousel-wrapper.dark .sg-carousel-prev,
.sg-carousel-wrapper.dark .sg-carousel-next {
    background: rgba(255, 255, 255, 0.9);
    border-color: #fff;
}

.sg-carousel-wrapper.dark .sg-carousel-prev:hover,
.sg-carousel-wrapper.dark .sg-carousel-next:hover {
    background: #fff;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.sg-carousel-wrapper.dark .sg-carousel-prev svg,
.sg-carousel-wrapper.dark .sg-carousel-next svg {
    color: #000;
}

.sg-carousel-wrapper.dark .sg-carousel-dot {
    background: #666;
}

.sg-carousel-wrapper.dark .sg-carousel-dot:hover {
    background: #999;
}

.sg-carousel-wrapper.dark .sg-carousel-dot.active {
    background: #fff;
}

/* Full width carousel */
.sg-carousel-wrapper.full-width {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.sg-carousel-wrapper.full-width .sg-carousel-container {
    width: 100%;
    padding: 0 60px;
}

@media (max-width: 768px) {
    .sg-carousel-wrapper.full-width .sg-carousel-container {
        padding: 0 20px;
    }
}

/* Ensure the carousel centers content */
.sg-carousel-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}