/* ========================================
   RESPONSIVE LAYOUT FIXES
   ======================================== */

/* Canvas positioning and performance optimization */
#starCanvas, #fireworks, #confetti {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
}

/* Disable animations on small screens for better performance */
@media (max-width: 768px) {
    #fireworks, #confetti {
        display: none;
    }
}

/* Header and Navigation Responsive Fixes */
.masthead {
    padding-top: 5rem;
    padding-bottom: 0;
    text-align: center;
    color: #fff;
    background: linear-gradient(to bottom, rgba(22, 22, 22, 0.3) 0%, rgba(22, 22, 22, 0.7) 75%, #161616 100%);
    min-height: 0;
    height: auto;
    display: none;
}









/* Custom font declaration */
@font-face {
    font-family: 'Jogjakartype';
    src: url('../fonts/Jogjakartype.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Rainbow text animation */
.rainbow-text {
    background: linear-gradient(45deg, #f14848, #ff7f00, #ffff00, #00ff00, #9292fa, #dcb2fa, #ba35f3, #ff0000);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow 8s ease-in-out infinite;
    font-weight: bold;
    font-family:  'Orbitron', 'Roboto', 'Arial Black','Jogjakartype', sans-serif;
    letter-spacing: 2px;
}

@keyframes rainbow {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 50% 0%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 100%; }
}





/* Paket section responsive grid */
#paket {
    padding-top: 6rem !important;
    padding-bottom: 4rem;
    margin-top: 0;
    position: relative;
    z-index: 10;
}

#paket .row {
    justify-content: center;
    align-items: stretch;
}

#paket .col-6 {
    flex: 0 0 auto;
    width: 50%;
    margin-bottom: 2rem;
    padding: 0 15px;
}

#paket .fa-stack {
    margin-bottom: 1rem;
}

#paket h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

#paket p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Modal responsive improvements */
.modal-dialog {
    margin: 1rem;
    max-width: calc(100% - 2rem);
}

.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-body {
    padding: 1.5rem;
}

/* Form improvements */
.form-group {
    margin-bottom: 1rem;
}

.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #fd0307;
    box-shadow: 0 0 0 0.2rem rgba(253, 3, 7, 0.25);
}

/* Countdown styling */
#countdown {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fd0307;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
}

/* Body and HTML setup for sticky footer */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main content area should grow to fill available space */
.main-content {
    flex: 1;
}

/* Footer improvements */
.footer {
    background-color: #212529;
    padding: 2rem 0;
    margin-top: auto;
    flex-shrink: 0;
}

/* Mobile Responsive Adjustments */
@media (max-width: 576px) {
    .masthead {
        display: none;
    }
    
    #paket {
        margin-top: 0;
        padding-top: 4rem !important;
    }
    

    
    #paket .col-6 {
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    #paket h4 {
        font-size: 1.1rem;
    }
    
    #paket p {
        font-size: 0.85rem;
    }
    

    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    #countdown {
        font-size: 1.2rem;
    }
}

/* Tablet Landscape */
@media (min-width: 577px) and (max-width: 768px) {
    .masthead {
        display: none;
    }
    
    #paket {
        margin-top: 0;
        padding-top: 5rem !important;
    }
    
    #paket .col-6 {
        width: 50%;
    }
    

}

/* Medium screens */
@media (min-width: 769px) and (max-width: 992px) {
    #paket .col-6 {
        width: 50%;
    }
    

}

/* Large screens */
@media (min-width: 993px) {
    #paket .col-6 {
        width: 33.333333%;
    }
    

}

/* Extra large screens */
@media (min-width: 1200px) {
    #paket .col-6 {
        width: 25%;
    }
    
    .container {
        max-width: 1140px;
    }
}

/* Timeline responsive fixes */
@media (max-width: 768px) {
    .timeline > li .timeline-panel {
        width: calc(100% - 90px);
        padding: 0 20px 20px 30px;
    }
    
    .timeline > li .timeline-image {
        left: 15px;
        margin-left: 0;
    }
    
    .timeline > li.timeline-inverted > .timeline-panel {
        float: left;
        padding: 0 20px 20px 30px;
        text-align: left;
    }
}

/* Performance optimizations */
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading optimization */
.lazyload {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazyload.loaded {
    opacity: 1;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .rainbow-text p {
        animation: none;
        background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

/* Landscape orientation specific fixes */
@media screen and (orientation: landscape) and (min-width: 768px) {
    .masthead {
        display: none;
    }
    
    #paket {
        margin-top: 0;
        padding-top: 5rem !important;
    }
}

/* Portrait orientation specific fixes */
@media screen and (orientation: portrait) and (max-width: 767px) {
    .masthead {
        display: none;
    }
    
    #paket {
        margin-top: 0;
        padding-top: 4rem !important;
    }
}

/* Landscape mobile specific */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .masthead {
        display: none;
    }
    
    #paket {
        margin-top: 0;
        padding-top: 4rem !important;
    }
    

    
    #countdown {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem 1rem;
        min-height: 44px;
    }
    
    .navbar-toggler {
        padding: 0.75rem;
        min-height: 44px;
        min-width: 44px;
    }
}