/* Kompas360 Slider - Responsiv Frontend Styles */

/* Import Oswald font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Font fallback stack */
:root {
	--korolev-font-family: 'Poppins', 'Arial Narrow', 'Liberation Sans Narrow', sans-serif;
}

.kompas360-slider {
    position: relative;
    width: 100%;
    min-height: 640px!important;
    max-height: 40vh!important;
    overflow: hidden;
    border-radius: 0!important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    background: #000;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateX(100%);
    transition: none;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: inherit;
    z-index: 1;
    overflow: hidden;
}

.slide-bg-image {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover!important;
    object-position: center;
    transform: translate(-50%, -50%);
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.slide-overlay {
    /* Overlay er nu fjernet - hvis du vil have det tilbage, fjern bare kommentarerne */
    /*
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(0, 0, 0, 0.7) 0%, 
        rgba(0, 0, 0, 0.4) 50%, 
        rgba(0, 0, 0, 0.2) 100%
    );
    z-index: 2;
    */
}

.slide-content {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: flex;
    align-items: center;
    padding: 0 15%!important;
    color: white;
}

.slide-text {
    max-width: 700px;
    animation: slideInFromLeft 1s ease-out;
}

/* Text positioning */
.slide-text.text-left {
    margin-right: auto;
    text-align: left;
}

.slide-text.text-center {
    margin: 0 auto;
    text-align: center;
}

.slide-text.text-right {
    margin-left: auto;
    text-align: right;
}

/* Content alignment */
.slide-content:has(.text-center) {
    justify-content: center;
}

.slide-content:has(.text-right) {
    justify-content: flex-end;
}

.slide-content:has(.text-left) {
    justify-content: flex-start;
}

.slide-title {
    font-size: clamp(2.5rem, 3vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    letter-spacing: -0.02em;
    color: white;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
}

.slide-description {
    font-size: clamp(1.1rem, .7vw, 1.4rem)!important;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    opacity: 0.95;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    max-width: 600px;
    color: white;
    font-family: 'Poppins', sans-serif!important;
    font-weight: 400;
}

.slide-button-container {
    margin-top: 2rem;
}

.slide-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 40px;
    background-color:#89ae45!important;
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: white;
    text-decoration: none;
    border-radius: 100px!important;
    font-weight: 500;
    font-size: .9rem!important;
    font-family: 'Poppins', sans-serif!important;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.slide-button::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: white;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.slide-button:hover::before {
    height: 100%;
}

.slide-button:hover {
    color: #333;
    border-color: white;
    text-decoration: none;
    text-shadow: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.slide-button:active {
    transform: translateY(0);
}

.button-icon {
    font-size: 1.2em;
    transition: transform 0.3s ease;
    font-weight: normal;
}

.slide-button:hover .button-icon {
    transform: translateX(5px);
    color: #333;
}

/* Navigation */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    pointer-events: none;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.25);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(15px);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-family: 'Korolev', sans-serif;
    font-weight: 500;
	display:none!important;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-btn:hover::before {
    opacity: 1;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.nav-btn:active {
    transform: scale(1.05);
}

.nav-btn svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.nav-btn:hover svg {
    transform: scale(1.1);
}

/* Dots Navigation */
.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 10;
}

.dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0;
}

.dot-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	display:none!important;
}

.dot.active,
.dot:hover {
    border-color: white;
    transform: scale(1.2);
}

.dot.active .dot-inner,
.dot:hover .dot-inner {
    opacity: 1;
}

.dot:focus {
background-color:white!important;
}

/* Progress Bar */
.slider-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.progress-bar {
    height: 100%;
    background: #89ae45;
    width: 0%;
    transition: width linear;
}

/* Loading Spinner */
.slider-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slider-loading.active {
    opacity: 1;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-left: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsiv Design - Tablet og mellemstore skærme */
@media (max-width: 1200px) {
    .kompas360-slider {
        min-height: 500px!important;
        max-height: 50vh!important;
    }
    
    .slide-content {
        padding: 0 8%!important;
    }
    
    .slide-text {
        max-width: 600px;
    }
}

/* Tablet */
@media (max-width: 992px) {
    .kompas360-slider {
        min-height: 450px!important;
        max-height: 60vh!important;
    }
    
    .slide-content {
        padding: 0 6%!important;
    }
    
    .slide-title {
        font-size: clamp(2rem, 6vw, 3.5rem);
        margin-bottom: 1.2rem;
    }
    
    .slide-description {
        font-size: clamp(1rem, 4vw, 1.3rem)!important;
        margin-bottom: 2rem;
        max-width: 550px;
    }
    
    .nav-btn {
        width: 55px;
        height: 55px;
    }
    
    .nav-btn svg {
        width: 22px;
        height: 22px;
    }
    
    .slider-nav {
        padding: 0 25px;
    }
}

/* Tablet og små laptops */
@media (max-width: 768px) {
    .kompas360-slider {
        min-height: 400px!important;
        max-height: 70vh!important;
    }
    
    .slide-content {
        padding: 0 5%!important;
    }
    
    /* Responsive text positioning - alle centreres på mobile */
    .slide-text.text-center,
    .slide-text.text-right {
        text-align: left;
        margin-right: auto;
        margin-left: 0;
    }
    
    .slide-content:has(.text-center),
    .slide-content:has(.text-right) {
        justify-content: flex-start;
    }
    
    .slide-title {
        font-size: clamp(1.8rem, 7vw, 3rem);
        margin-bottom: 1rem;
        line-height: 1.2;
    }
    
    .slide-description {
        font-size: clamp(0.95rem, 4.5vw, 1.2rem)!important;
        margin-bottom: 1.8rem;
        line-height: 1.5;
        max-width: 100%;
    }
    
    .slide-button {
        padding: 15px 30px;
        font-size: 0.85rem!important;
        gap: 10px;
    }
    
    .nav-btn {
        width: 50px;
        height: 50px;
    }
    
    .nav-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .slider-nav {
        padding: 0 20px;
    }
    
    .slider-dots {
        bottom: 30px;
        gap: 12px;
    }
    
    .dot {
        width: 14px;
        height: 14px;
    }
    
    .dot-inner {
        width: 6px;
        height: 6px;
    }
}

/* Smartphones */
@media (max-width: 480px) {
    .kompas360-slider {
        min-height: 350px!important;
        max-height: 80vh!important;
    }
    
    .slide-content {
        padding: 0 4%!important;
    }
    
    .slide-title {
        font-size: clamp(1.5rem, 8vw, 2.5rem);
        font-weight: 700;
        letter-spacing: 0;
        line-height: 1.2;
        margin-bottom: 0.8rem;
    }
    
    .slide-description {
        font-size: clamp(0.9rem, 5vw, 1.1rem)!important;
        font-weight: 400;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }
    
    .slide-button {
        padding: 12px 24px;
        font-size: 0.8rem!important;
        font-weight: 600;
        letter-spacing: 0.5px;
        border-radius: 6px;
        gap: 8px;
    }
    
    .nav-btn {
        width: 45px;
        height: 45px;
    }
    
    .nav-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .slider-nav {
        padding: 0 15px;
    }
    
    .slider-dots {
        bottom: 25px;
        gap: 10px;
    }
    
    .dot {
        width: 12px;
        height: 12px;
        border-width: 1.5px;
    }
    
    .dot-inner {
        width: 5px;
        height: 5px;
    }
}

/* Extra små skærme */
@media (max-width: 360px) {
    .kompas360-slider {
        min-height: 300px!important;
    }
    
    .slide-content {
        padding: 0 3%!important;
    }
    
    .slide-title {
        font-size: clamp(.3rem, 9vw, 2.2rem);
        margin-bottom: 0.6rem;
    }
    
    .slide-description {
        font-size: 11px!important;
        margin-bottom: 1.2rem;
    }
    
    .slide-button {
        padding: 10px 20px;
        font-size: 0.65rem!important;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .slider-nav {
        padding: 0 10px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .slide-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .slide-title,
    .slide-description {
        text-shadow: 2px 2px 0px #000;
    }
    
    .nav-btn,
    .dot {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .slide,
    .slide-button,
    .nav-btn,
    .dot,
    .progress-bar {
        transition: none;
    }
    
    .slide-text {
        animation: none;
    }
    
    .loading-spinner {
        animation: none;
    }
}

/* Landskab orientering på mobile enheder */
@media (max-width: 768px) and (orientation: landscape) {
    .kompas360-slider {
        min-height: 300px!important;
        max-height: 90vh!important;
    }
    
    .slide-title {
        font-size: clamp(1.4rem, 5vw, 2.2rem);
        margin-bottom: 0.8rem;
    }
    
    .slide-description {
        font-size: clamp(0.9rem, 3vw, 1.1rem)!important;
        margin-bottom: 1.2rem;
    }
    
    .slide-button {
        padding: 10px 24px;
        font-size: 0.8rem!important;
    }
    
    .slider-dots {
        bottom: 20px;
    }
}

/* Empty state */
.kompas360-slider-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: #f5f5f5;
    border: 2px dashed #ddd;
    border-radius: 8px;
    color: #666;
    font-size: 1.1rem;
    text-align: center;
}

/* Additional Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Content animation improvements */
.slide-title,
.slide-description,
.slide-button-container {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Ensure content is hidden by default */
.slide:not(.active) .slide-title,
.slide:not(.active) .slide-description,
.slide:not(.active) .slide-button-container {
    opacity: 0;
    transform: translateY(20px);
}

/* Active slide content preparation */
.slide.active .slide-title,
.slide.active .slide-description,
.slide.active .slide-button-container {
    will-change: transform, opacity;
}

/* Remove default CSS animations to let GSAP handle everything */
.slide-text {
    animation: none;
}

/* Enhanced button animation */
.slide-button {
    transform-origin: center center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* Stagger delays for animations */
.slide-text [data-delay="0.2"] {
    animation-delay: 0.2s;
}

.slide-text [data-delay="0.4"] {
    animation-delay: 0.4s;
}

.slide-text [data-delay="0.6"] {
    animation-delay: 0.6s;
}

.slide-text [data-delay="0.8"] {
    animation-delay: 0.8s;
}

/* Special effects */
.kompas360-slider.effect-zoom .slide-bg-image {
    transform: translate(-50%, -50%) scale(1.1);
    transition: transform 8s ease-out;
}

.kompas360-slider.effect-zoom .slide.active .slide-bg-image {
    transform: translate(-50%, -50%) scale(1);
}

/* Parallax effect */
.kompas360-slider.effect-parallax .slide-background {
    transform: translateZ(0);
    will-change: transform;
}

/* Overlay variations */
.slide-overlay.dark {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.slide-overlay.light {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.slide-overlay.gradient-blue {
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.8) 0%, rgba(42, 82, 152, 0.4) 100%);
}

.slide-overlay.gradient-purple {
    background: linear-gradient(135deg, rgba(102, 51, 153, 0.8) 0%, rgba(142, 68, 173, 0.4) 100%);
}

/* Button variations with new styling */
.slide-button.style-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
    border-radius: 6px;
}

.slide-button.style-outline::before {
    background: white;
}

.slide-button.style-outline:hover {
    background: transparent;
    color: #333;
    border-color: white;
}

.slide-button.style-minimal {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
}

.slide-button.style-minimal::before {
    background: rgba(255, 255, 255, 0.9);
}

.slide-button.style-minimal:hover {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.4);
    color: #333;
}

/* Custom scrollbar for admin */
#slides-container::-webkit-scrollbar {
    width: 8px;
}

#slides-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#slides-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

#slides-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Print styles */
@media print {
    .kompas360-slider {
        position: static !important;
        height: auto !important;
        overflow: visible !important;
        box-shadow: none !important;
    }
    
    .slide {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        page-break-inside: avoid;
        margin-bottom: 2cm;
    }
    
    .slider-nav,
    .slider-dots,
    .slider-progress {
        display: none !important;
    }
    
    .slide-button {
        display: none !important;
    }
}

/* Utility classes */
.kompas360-fade-in {
    animation: fadeInUp 0.6s ease-out both;
}

.kompas360-slide-up {
    animation: slideInFromLeft 0.6s ease-out both;
}

.kompas360-zoom-in {
    animation: zoomIn 0.6s ease-out both;
}

/* Loading state improvements */
.slide-bg-image {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.slide:not(.loaded) .slide-bg-image {
    opacity: 0.5;
}

.slide.loaded .slide-bg-image {
    opacity: 1;
}

/* Error states */
.slide.error {
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.slide.error .slide-bg-image {
    display: none;
}

.slide-bg-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.slide-bg-fallback::before {
    content: "Intet baggrundsbillede";
}