/* Ensure slider images are shown fully (no cropping) and remain responsive.
   We override the inline "background: ... / cover" used by the slider with contain.
   This keeps the whole image visible; slides are centered and have a sensible min-height
   for desktop and mobile. */
.simple-slider .swiper-container,
.simple-slider .swiper-wrapper,
.simple-slider .swiper-slide {
    height: auto;
    min-height: 300px; /* desktop/tablet default height */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Prevent cropping: show entire image inside slide while keeping it centered */
.simple-slider .swiper-slide {
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-color: transparent; /* transparent so no black borders */
}

/* Dynamic iframe for full content display */
.dynamic-iframe {
    height: auto !important;
    padding-bottom: 0 !important;
}

/* Make slides with <img> slightly larger while keeping a small gap */
.simple-slider .swiper-slide { padding: 4px; box-sizing: border-box; }
.simple-slider .swiper-slide img {
    width: auto;
    max-width: 98%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
    border-radius: 6px;
}

/* Iframe banner styles */
.iframe-banner {
    background: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0.5));
    color: #fff;
    padding: 2rem 0;
}
.iframe-banner .iframe-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(121, 77, 77, 0.45);
    background: #000;
}
.iframe-banner .iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
@media (max-width: 767px) {
    .iframe-banner { padding: 1rem 0; }
    .iframe-banner .col-md-6 { margin-bottom: 1rem; }
}

.center-fixed-text {
    display: inline-block;
    transform: scale(1.35);
    padding: 0;
    overflow: visible;
}

/* Increase page zoom by 25% */
body {
    zoom: 100%;
}

/* Constrain overall page width - only on desktop */
@media (min-width: 1200px) {
    body {
        max-width: 1600px;
        margin: 0 auto;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    }
}

/* Prevent horizontal scrolling on the entire page */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Responsive iframe wrappers for embeds */
.iframe-wrapper {
    position: relative;
    width: 100% !important;
    max-width: 1200px;
    margin: 2rem auto;
    height: 0;
    padding-bottom: 56.25% !important; /* 16:9 default */
    overflow: hidden;
    border-radius: 16px;
}

.iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Instagram embed specific styling */
.instagram-wrapper {
    position: relative;
    width: 100%;
    margin: 0;
    height: auto;
    min-height: 600px;
    overflow: visible !important;
    padding-bottom: 0 !important;
}

.instagram-wrapper .instagram-media {
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 540px !important;
}

@media (max-width: 767px) {
    .iframe-wrapper {
        padding-bottom: 62.5% !important; /* slightly taller on mobile */
        margin: 1.25rem auto;
        border-radius: 12px;
    }

    /* Extra spacing between recommendations iframe and Elfsight widget */
    .bg-dark .iframe-wrapper {
        margin-bottom: 1.5rem;
    }
    .elfsight-app-15d76357-a83d-4a5a-b071-89c3a089ac4c {
        margin-top: 1.5rem;
    }
}

/* Mobile notice modal */
.mobile-notice {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1.5rem;
}
.mobile-notice.is-visible {
    display: flex;
}
.mobile-notice__card {
    background: #151515;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 1.5rem;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.mobile-notice__title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}
.mobile-notice__text {
    margin: 0 0 1rem;
    color: rgba(255, 255, 255, 0.8);
}
.mobile-notice__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Skills Carousel Autoscroll */
.skills-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    background: linear-gradient(90deg, rgba(0,0,0,0.1) 0%, transparent 10%, transparent 90%, rgba(0,0,0,0.1) 100%);
    padding: 2rem 0;
    border-radius: 12px;
    cursor: grab;
    -ms-overflow-style: none;
    scrollbar-width: none;
    touch-action: pan-y;
}

.skills-carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.skills-carousel-wrapper.is-dragging {
    cursor: grabbing;
}

.skills-carousel-wrapper.is-dragging .skills-carousel {
    animation-play-state: paused;
}

.skills-carousel {
    display: flex;
    gap: 2.5rem;
    animation: autoScroll 50s linear infinite;
    width: fit-content;
    padding: 0 2rem;
}

.skills-carousel:hover {
    animation-play-state: paused;
}

.skills-carousel-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    min-width: 150px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.skills-carousel-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(0, 255, 136, 0.2);
}

.skills-carousel-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

@keyframes autoScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100% - 2.5rem));
    }
}

/* Ensure smooth scrolling */
@media (prefers-reduced-motion: no-preference) {
    .skills-carousel {
        scroll-behavior: smooth;
    }
}

@media (max-width: 768px) {
    .skills-carousel-wrapper {
        padding: 1.5rem 0;
    }

    .skills-carousel {
        gap: 1.5rem;
        animation: autoScroll 35s linear infinite;
    }

    .skills-carousel-item {
        height: 120px;
        min-width: 120px;
        font-size: 0.875rem;
    }
}

/* Keep the section-2 Instagram item and note side-by-side */
.instagram-note-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.coming-soon-badge {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    white-space: nowrap;
    margin-top: 8px;
}

@media (max-width: 576px) {
    .instagram-note-row {
        flex-direction: column;
        align-items: flex-start;
    }
}