/* ===== D'SULTAN WATERSPORT ANYER - CUSTOM STYLES ===== */

/* Animasi berdenyut untuk tombol WhatsApp */
@keyframes pulse-wa {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(34, 197, 94, 0);
    }
}

#wa-button {
    animation: pulse-wa 2s infinite;
}

/* Smooth transition untuk navigasi dengan accessibility */
nav a {
    transition: all 0.3s ease-in-out;
    position: relative;
}

/* Navigation links accessibility - not relying only on color */
nav a:not([id="title"]):not(.bg-sultan-orange) {
    padding: 8px 12px;
    border-radius: 6px;
}

nav a:not([id="title"]):not(.bg-sultan-orange):hover {
    background-color: rgba(249, 115, 22, 0.1);
    text-decoration: underline;
}

nav a:not([id="title"]):not(.bg-sultan-orange):focus {
    background-color: rgba(249, 115, 22, 0.15);
    text-decoration: underline;
    outline: 2px solid #F97316;
    outline-offset: 2px;
}

/* Scroll behavior untuk browser yang mendukung */
html {
    scroll-behavior: smooth;
}

/* FAQ Dropdown Styles */
.faq-answer {
    transition: max-height 0.3s ease-in-out;
}

.max-h-96 {
    max-height: 24rem !important;
}

.faq-icon {
    transition: transform 0.2s ease-in-out;
}

.rotate-180 {
    transform: rotate(180deg);
}

/* Gallery Styles */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.gallery-item img,
.gallery-item video {
    transition: transform 0.3s ease-in-out;
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(249, 115, 22, 0.8), rgba(2, 132, 199, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.play-button {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #0284C7;
}

/* Custom Swiper Styles */
.gallery-swiper .swiper-pagination-bullet {
    background: #F97316;
    opacity: 0.5;
}

.gallery-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: #F97316;
}

.gallery-swiper .swiper-button-next,
.gallery-swiper .swiper-button-prev {
    color: #F97316;
    font-weight: bold;
}

/* Custom Gallery Modal Styles */
#gallery-modal {
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease-in-out;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    padding: 1rem;
    z-index: 9999 !important;
}

/* Only apply flex when modal is NOT hidden */
#gallery-modal:not(.hidden) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Make sure hidden class works properly */
#gallery-modal.hidden {
    display: none !important;
}

#gallery-modal .relative {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 90vw;
    max-height: 90vh;
}

#modal-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    height: 100%;
    text-align: center !important;
}

#gallery-modal img,
#gallery-modal video {
    transition: transform 0.3s ease-in-out;
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

#gallery-modal button {
    transition: all 0.3s ease-in-out;
}

#gallery-modal button:hover {
    transform: scale(1.1);
}

.gallery-item {
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    position: relative;
}

.gallery-item:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.gallery-item video {
    pointer-events: none;
}

/* Video specific styling */
#modal-video {
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

#modal-video::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Prevent body scroll when modal open */
.overflow-hidden {
    overflow: hidden !important;
}

/* Modal positioning fix - ensure hidden state works */
#gallery-modal.flex {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Force hidden state to work properly - ONLY for modal */
#gallery-modal.hidden {
    display: none !important;
}

/* ===== ADDITIONAL RESPONSIVE HELPERS ===== */

/* Service cards hover effects */
.service-card {
    transition: all 0.3s ease-in-out;
}

.service-card:hover {
    transform: translateY(-5px);
}

/* Hero section responsive text */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 2rem;
    }
}

/* Gallery responsive improvements */
@media (max-width: 768px) {
    .gallery-overlay {
        opacity: 1;
        background: rgba(249, 115, 22, 0.3);
    }
    
    .gallery-overlay .text-white {
        opacity: 0.8;
    }
}

/* FAQ responsive improvements */
@media (max-width: 640px) {
    .faq-question {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .faq-answer {
        font-size: 0.9rem;
    }
}

/* Navigation responsive improvements */
@media (max-width: 768px) {
    nav .hidden.md\\:flex {
        display: none;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */

/* Screen Reader Only Content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Enhanced Focus States */
*:focus {
    outline: 2px solid #F97316;
    outline-offset: 2px;
}

/* Better Button Touch Targets */
button, .btn, a[role="button"] {
    min-height: 44px;
    min-width: 44px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .bg-sultan-orange {
        background-color: #E65100 !important;
    }
    
    .text-gray-600 {
        color: #000 !important;
    }
}