/* Custom CSS for Mobile Menu and Additional Styles */

/* Hamburger Button Animation */
.hamburger {
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    display: block;
    position: relative;
    z-index: 1000;
}

@media (min-width: 1024px) {
    .hamburger {
        display: none;
    }
}

.hamburger svg {
    width: 100%;
    height: 100%;
}

.hamburger .line {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
                stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger .line1 {
    stroke-dasharray: 60 207;
    stroke-width: 6;
}

.hamburger .line2 {
    stroke-dasharray: 60 60;
    stroke-width: 6;
}

.hamburger .line3 {
    stroke-dasharray: 60 207;
    stroke-width: 6;
}

.hamburger.opened .line1 {
    stroke-dasharray: 90 207;
    stroke-dashoffset: -134;
    stroke-width: 6;
}

.hamburger.opened .line2 {
    stroke-dasharray: 1 60;
    stroke-dashoffset: -30;
    stroke-width: 6;
}

.hamburger.opened .line3 {
    stroke-dasharray: 90 207;
    stroke-dashoffset: -134;
    stroke-width: 6;
}

/* Mobile Menu Styles */
.main-menu {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
}

@media (max-width: 1023px) {
    .main-menu {
        position: fixed;
        top: 100px;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
        padding: 0;
    }

    .dark .main-menu {
        background: #1a1a1a;
    }

    .main-menu.active {
        max-height: 100vh;
        opacity: 1;
        visibility: visible;
        padding: 5px 30px;
    }

    .main-menu ul {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .main-menu ul li {
        width: 100%;
        text-align: left;
        padding: 10px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .dark .main-menu ul li {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }

    .main-menu ul li:last-child {
        border-bottom: none;
    }

    .main-menu ul li a {
        display: block;
        font-size: 18px;
        font-weight: 500;
    }
}

@media (min-width: 1024px) {
    .main-menu {
        max-height: none;
        opacity: 1;
        visibility: visible;
        position: static;
        background: transparent;
        padding: 0;
    }
}

/* Slider Container Fixes */
.tp-banner-container {
    width: 100%;
    position: relative;
    padding: 0;
    margin: 0;
}

.tp-banner {
    width: 100%;
    position: relative;
}

.tp-banner ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tp-banner ul li {
    width: 100%;
}

.tp-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* Responsive Slider Height */
@media (max-width: 768px) {
    .tp-banner-container {
        min-height: 300px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .tp-banner-container {
        min-height: 400px;
    }
}

@media (min-width: 1025px) {
    .tp-banner-container {
        min-height: 514px;
    }
}

/* Dark Mode Toggle Improvements */
.switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.switcher input:checked ~ .moon {
    display: block;
}

.switcher input:checked ~ .sun {
    display: none;
}

.switcher input:not(:checked) ~ .moon {
    display: none;
}

.switcher input:not(:checked) ~ .sun {
    display: block;
}

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

/* Fix for overlapping content */
section[id] {
    scroll-margin-top: 80px;
}

/* Header Shadow on Scroll */
.header-area.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Mobile Navigation Overlay */
@media (max-width: 1023px) {
    body.menu-open {
        overflow: hidden;
    }

    .main-menu.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        z-index: -1;
    }
}

/* Loading Animation for Slider */
.tp-banner-container.loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tp-banner-container.loading::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #BB976D;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Ensure proper spacing after slider */
.tp-banner-container + div,
.tp-banner-container + section {
    margin-top: 0;
}
