/* Navigation */
.nav {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 50;
    border-radius: 2rem;
    margin: 1rem auto;
    max-width: 1380px;
    position: relative;
    overflow: visible;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
    padding: 0 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo img {
    height: 50px;
}

.nav-logo span {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-dark);
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
        align-items: center;
        gap: 2rem;
    }
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    position: relative;
}

.nav-link:hover {
    color: var(--text-dark);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after{
    width: 100%;
}

.nav-link.active {
    color: var(--text-dark);
}

.mobile-menu-btn {
    padding: 0.5rem;
    color: var(--text-dark);
    background-color: var(--bg-white);
    border: none;
    cursor: pointer;
    display: none;
}

.mobile-menu-checkbox {
    display: none;
}

.mobile-menu-checkbox:focus {
    outline: none;
}

.mobile-menu-btn {
    position: relative;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition-duration: .5s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.mobile-menu-btn:focus {
    outline: none;
}

.bars {
    width: 24px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 4px;
    transition: all 0.3s ease;
}

#bar2 {
    transition-duration: .8s;
}

#bar1, #bar3 {
    width: 18px;
}

.mobile-menu-checkbox:checked + .mobile-menu-btn .bars {
    position: absolute;
    transition-duration: .5s;
}

.mobile-menu-checkbox:checked + .mobile-menu-btn #bar2 {
    transform: scaleX(0);
    transition-duration: .5s;
}

.mobile-menu-checkbox:checked + .mobile-menu-btn #bar1 {
    width: 24px;
    transform: rotate(45deg);
    transition-duration: .5s;
}

.mobile-menu-checkbox:checked + .mobile-menu-btn #bar3 {
    width: 24px;
    transform: rotate(-45deg);
    transition-duration: .5s;
}

.mobile-menu-checkbox:checked + .mobile-menu-btn {
    transition-duration: .5s;
    transform: rotate(180deg);
}

@media (min-width: 769px) {
    .mobile-menu-btn,
    .mobile-menu {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-link {
        display: none;
    }

    .nav {
        margin: 5px 20px;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .mobile-menu-btn {
        display: flex;
    }
    
    .corner-toggle {
        width: 0.5rem;
    }
    
    .corner-toggle::after {
        width: .5rem;
        border-width: 1.5px;
    }
    
    .corner-toggle:hover {
        width: 1rem;
    }
    
    .corner-toggle:hover::after {
        width: 1rem;
    }
}

.mobile-menu {
    display: none;
    background-color: var(--bg-light);
    padding: 0.5rem;
}

.mobile-menu.active {
    display: block;
    position: relative;
    z-index: 60;
    padding: 3px 24px;
}

.mobile-menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
}

.mobile-menu a:hover {
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.mobile-menu-btn i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
    background-color: var(--bg-white);
}

.mobile-menu-btn i.fa-times {
    transform: rotate(180deg);
}

/* Corner theme toggle */
.corner-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: .5rem;
    height: 100%;
    cursor: pointer;
    z-index: 5;
    transition: width 0.3s ease, transform 0.3s ease;
    border-radius: 0 2rem 2rem 0;
    background-color: transparent;
}

.corner-toggle::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2.5rem;
    height: 100%;
    border-right: 2px solid var(--text-dark);
    border-radius: 0 2rem 2rem 0;
    transition: width 0.3s ease, opacity 0.3s ease, border-right-width 0.3s ease;
    opacity: 0.7;
    box-sizing: border-box;
    pointer-events: none;
    background: transparent;
}

[data-theme="dark"] .corner-toggle::after {
    border-right-color: #ffffff;
}

.corner-toggle:hover {
    background-color: transparent !important;
    background: none !important;
    transition: width 0.3s ease;
}

.corner-toggle:hover::after {
    opacity: 1;
    width: 3rem; 
    border-right-width: 3px;
    transition: all 0.3s ease;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-3px);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* comic sans styles */
.comic-sans {
    font-family: "Comic Sans MS", "Comic Sans", cursive !important;
}

.comic-sans .text-behind {
  font-family: "Comic Sans MS", "Comic Sans", cursive !important;
}

.comic-sans-enabler{
    cursor: pointer;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Footer styles */
footer {
    background-color: var(--bg-light);
    color: var(--text-dark);
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1380px;
    margin: 0 auto;
    align-items: flex-start;
}

/* Hide the combined mobile section by default */
.footer-socials-contact-mobile {
    display: none;
}

/* Hide desktop sections on mobile */
.footer-socials-desktop,
.footer-contact-desktop {
    display: none;
}

/* Show combined mobile section and adjust layout below 920px */
@media (max-width: 919px) {
    .footer-inner {
        flex-direction: column;
        gap: 30px;
        padding: 0px 20px;
    }

    /* Show the combined mobile section */
    .footer-socials-contact-mobile {
        display: block;
    }

    /* Hide original Socials and Contact Us sections on mobile */
    .footer-socials-desktop,
    .footer-contact-desktop {
        display: none;
    }

    .footer-section {
        padding: 20px 0;
        border-right: none !important;
        border-bottom: 1px solid var(--border-color);
        flex-basis: auto;
        flex-grow: 0;
        flex-shrink: 0;
        min-width: 0;
    }
    
    .footer-section:first-child {
        padding-bottom: 10px;
    }

    .footer-section:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }

    /* Style the content within the combined mobile section */
    .footer-socials-contact-mobile h3 {
        margin-bottom: 15px;
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--text-dark);
    }

    .footer-socials-contact-mobile ul {
        list-style: none;
        padding: 0;
    }

    .footer-socials-contact-mobile ul li {
        margin-bottom: 10px;
        font-size: 1rem;
        color: var(--text-light);
        line-height: 1.5;
    }

    .footer-socials-contact-mobile i {
         margin-right: 8px;
         color: var(--primary-color);
    }
     .footer-socials-contact-mobile a {
        color: var(--text-light);
        text-decoration: none;
        transition: var(--transition);
    }

    .footer-socials-contact-mobile a:hover {
        color: var(--primary-color);
    }
}

@media (max-width: 480px) {
    .footer-section {
        min-width: 100%;
    }
}

@media (min-width: 920px) {
    /* Show original Socials and Contact Us sections on larger screens */
    .footer-socials-desktop,
    .footer-contact-desktop {
        display: block !important;
    }

    /* Hide the combined mobile section on larger screens */
    .footer-socials-contact-mobile {
        display: none !important;
    }

    .footer-inner {
         flex-direction: row;
         gap: 40px;
         justify-content: space-between;
    }

    .footer-section {
        padding: 0 20px;
        border-right: 1px solid var(--border-color);
        flex-basis: 0;
        flex-grow: 1;
        flex-shrink: 1;
         min-width: 200px;
    }

    .footer-section:first-child {
        flex-basis: 550px;
        flex-grow: 0;
        flex-shrink: 0;
        padding-left: 0;
    }

    .footer-contact-desktop {
        border-right: none;
        padding-right: 0;
    }
}

.footer-section:first-child {
    flex-grow: 0;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .footer-section:first-child {
        flex-direction: row;
        flex-basis: auto;
    }
}

.footer-section:nth-child(2),
.footer-section:nth-child(3) {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 0;
}

.footer-section h2,
.footer-section h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-section p,
.footer-section li {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.footer-section i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 15px;
}

.footer-section a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-copyright {
    text-align: center;
    margin-top: 50px;
    font-size: 0.95rem;
    color: var(--text-light);
}