/* ===============================================
   HZ WASTE MANAGEMENT - JAVASCRIPT STYLES
   Complementary CSS for interactive features
   =============================================== */

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    display: none;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5b942, #f7c96f);
    color: #07101f;
    border: none;
    cursor: pointer;
    font-size: 18px;
    z-index: 40;
    box-shadow: 0 10px 30px rgba(245, 185, 66, 0.25);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 40px rgba(245, 185, 66, 0.35);
}

.back-to-top:active {
    transform: translateY(-2px) scale(1);
}

/* ===== FORM VALIDATION STYLES ===== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #f5b942;
    box-shadow: 0 0 0 3px rgba(245, 185, 66, 0.1);
}

/* Valid field state */
input.valid,
select.valid,
textarea.valid {
    border-color: #4caf50;
    background-color: rgba(76, 175, 80, 0.05);
}

input.valid:focus,
select.valid:focus,
textarea.valid:focus {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Error field state */
input.error,
select.error,
textarea.error {
    border-color: #f44336 !important;
    background-color: rgba(244, 67, 54, 0.05);
}

input.error:focus,
select.error:focus,
textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

/* Error message */
.error-message {
    color: #f44336;
    font-size: 0.85rem;
    margin-top: 4px;
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== BUTTONS ===== */
button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary,
.btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-primary:active,
.btn-secondary:active {
    transform: scale(0.98);
}

/* Ripple effect container */
button .ripple {
    position: absolute;
    border-radius: 50%;
}

/* ===== MOBILE MENU STYLES ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 51;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #edf2ff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile navigation */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(3, 9, 35, 0.98);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 1rem 0;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 50;
    }
    
    .nav-links.active {
        max-height: 400px;
    }
    
    .nav-links a {
        display: block;
        padding: 1rem 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    }
    
    .nav-links a:hover {
        background: rgba(245, 185, 66, 0.08);
    }
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: rgba(4, 8, 28, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 24px;
    color: #edf2ff;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
    color: #f5b942;
}

.modal-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.modal-header h2 {
    color: #edf2ff;
    font-size: 1.5rem;
}

.modal-body {
    color: #9bb4d7;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== NOTIFICATION STYLES ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 9999;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.notification-success {
    background: #4caf50;
    color: white;
}

.notification-error {
    background: #f44336;
    color: white;
}

.notification-warning {
    background: #ff9800;
    color: white;
}

.notification-info {
    background: #2196f3;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ===== LOADING STATE ===== */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(245, 185, 66, 0.3);
    border-top-color: #f5b942;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== ACTIVE STATES ===== */
.nav-links a.active {
    color: #f5b942;
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: #f5b942;
    border-radius: 1px;
}

/* ===== ANIMATION HELPERS ===== */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-in {
    animation: slideIn 0.5s ease forwards;
}

.bounce {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 640px) {
    .notification {
        top: auto;
        right: auto;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        max-width: 90%;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 16px;
        right: 20px;
        bottom: 20px;
    }
    
    button {
        font-size: 1rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid #f5b942;
    outline-offset: 2px;
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .modal-content {
        background: rgba(4, 8, 28, 0.95);
        color: #edf2ff;
    }
}
