/*
 * GAHUMITOWEL Custom CSS
 * Additional styles and overrides
 */

/* ============================================
   1. Hero Background with Parallax
   ============================================ */
.hero-bg {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Disable parallax on mobile for performance */
@media (max-width: 768px) {
    .hero-bg {
        background-attachment: scroll;
    }
}

/* ============================================
   2. Mobile Menu Enhancements
   ============================================ */
.navbar-mobile-menu {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.navbar-mobile-menu.hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0;
}

.navbar-mobile-menu.active {
    max-height: 100vh;
    opacity: 1;
}

/* ============================================
   3. Product Card Hover Effects
   ============================================ */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
}

.product-card-image {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   4. Custom Tab Styles
   ============================================ */
.customization-tab-btn {
    position: relative;
    overflow: hidden;
}

.customization-tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.customization-tab-btn:hover::before {
    left: 100%;
}

/* ============================================
   5. Factory Tour Step Indicator
   ============================================ */
.factory-step-circle {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.factory-step-circle::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #f97316;
    opacity: 0;
    transform: scale(1.2);
    transition: all 0.3s;
}

.factory-step-btn.active .factory-step-circle::after {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   6. Modal Animations
   ============================================ */
.modal {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-container {
    animation: modalSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalSlideIn {
    from {
        transform: translate(-50%, -45%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

/* ============================================
   7. Toast Notification Styles
   ============================================ */
.toast {
    animation: toastSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.hide {
    animation: toastSlideOut 0.4s ease-in;
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* ============================================
   8. Form Validation Styles
   ============================================ */
.form-input:focus,
.form-textarea:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2), 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-input-valid {
    animation: inputPulse 0.5s ease;
}

@keyframes inputPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.form-input-invalid {
    animation: inputShake 0.5s ease;
}

@keyframes inputShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* ============================================
   9. Button Ripple Effect
   ============================================ */
.btn-primary,
.btn-secondary,
.btn-footer-primary,
.btn-footer-secondary,
.navbar-btn {
    position: relative;
    overflow: hidden;
}

.btn-primary::before,
.btn-secondary::before,
.btn-footer-primary::before,
.btn-footer-secondary::before,
.navbar-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::before,
.btn-secondary:active::before,
.btn-footer-primary:active::before,
.btn-footer-secondary:active::before,
.navbar-btn:active::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   10. Smooth Scroll Enhancements
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* Improve scroll performance */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ============================================
   11. Navigation Bar Scroll Effect
   ============================================ */
.navbar-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.98);
}

.navbar-scrolled .navbar-brand-name {
    transform: scale(0.95);
}

.navbar-scrolled .navbar-btn {
    transform: scale(0.95);
}

/* ============================================
   12. Blog Card Hover Effects
   ============================================ */
.blog-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.blog-card-title {
    transition: color 0.3s;
}

/* ============================================
   13. Footer CTA Gradient Animation
   ============================================ */
.footer-cta {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    background-size: 200% 200%;
    animation: gradientMove 15s ease infinite;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ============================================
   14. Loading States
   ============================================ */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: #ea580c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   15. Image Loading Placeholder
   ============================================ */
img {
    background-color: #f3f4f6;
    min-height: 200px;
}

img[src] {
    background-color: transparent;
    min-height: auto;
}

/* ============================================
   16. Focus Visible for Accessibility
   ============================================ */
:focus-visible {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

/* ============================================
   17. Print Styles
   ============================================ */
@media print {
    .navbar,
    .footer-cta,
    .modal,
    .toast-container,
    .footer {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .section {
        page-break-inside: avoid;
    }

    .product-card {
        page-break-inside: avoid;
    }
}

/* ============================================
   18. High Contrast Mode Support
   ============================================ */
@media (prefers-contrast: high) {
    .navbar {
        border-bottom: 2px solid #000;
    }

    .btn-primary,
    .btn-secondary {
        border: 2px solid #000;
    }

    .product-card {
        border: 2px solid #000;
    }
}

/* ============================================
   19. Reduced Motion Support
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   20. Custom Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================
   21. Selection Styling
   ============================================ */
::selection {
    background: #f97316;
    color: white;
}

::-moz-selection {
    background: #f97316;
    color: white;
}

/* ============================================
   22. Utility Classes
   ============================================ */
.text-gradient {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.3);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}