@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");

body {
    font-family: "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.container {
    max-width: 1200px;
    margin: auto;
}

header,
main,
footer {
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    height: 50px;
    background-color: var(--nav-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    border-radius: 0 0 50px 50px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.header-scrolled {
    background-color: var(--nav-bg);
    box-shadow: 0 4px 6px var(--shadow-color);
    padding: 10px 80px 10px 50px;
}

header h1 {
    font-size: 2rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    z-index: 2;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    text-align: center;
}

nav ul li {
    position: relative;
    border-radius: 5px;
    padding: 2px;
}

nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: bold;
    font-size: 15px !important;
}

nav ul li:hover {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

nav ul li.active {
    border-bottom: 2px solid var(--accent-color);
}

nav ul li.active a {
    color: var(--text-primary);
    pointer-events: none;
    /* font-weight: 500; */
    /* font-style: italic; */
}

.cta-button {
    display: inline-block;
    padding: 5px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #0056b3;
}

footer {
    position: relative;
    display: grid;
    grid-template-rows: auto auto;
    gap: 10px;
    justify-items: center;
    align-items: center;
    padding: 20px 0;
    font-size: 0.9rem;
    color: #666;
}

section {
    margin: 50px 0;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

section h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

section p {
    font-size: 1rem;
    margin: 5px 0;
}

.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

#animated-heading {
    font-size: 2.5rem;
    font-weight: bold;
    position: relative;
    display: inline-block;
}

#animated-heading::after {
    content: "";
    width: 2px;
    height: 100%;
    background: black;
    display: inline-block;
    position: absolute;
    right: 0;
    animation: blink 0.7s step-end infinite;
}

.language-selector {
    margin-left: auto;
    display: flex;
}

.dropdown {
    position: relative;
}

.dropbtn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.flag-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: transform 0.3s;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.dropdown-content .flag-icon {
    margin-right: 10px;
}

.dropdown-content a {
    color: black;
    padding: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.dropdown-content a:hover,
.dropdown-content a.active {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content {
    transition: visibility 0.3s, opacity 0.3s;
}

.mobile-concern-btn {
    display: none;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

nav #navList {
    cursor: pointer;
}

.language-selector .dropdown-content a {
    font-size: 15px;
}

.donation-btn {
    margin-right: 15px;
}

.nav-toggle {
    display: none;
}

.chatbox-icon,
.nav-toggle,
#navList,
.carousel-card,
.gallery-item {
    user-select: none;
}

.project-intro,
#about,
#resume,
#contact,
.gallery-item {
    position: relative !important;
}

.voice-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.3s ease;
    bottom: 0;
    right: 0;
    margin: 10px;
}

.voice-icon.active {
    opacity: 0.5;
    transform: scale(1.1);
    transition: all 0.2s;
    animation: mic-wave 1.5s infinite;
}

.voice-icon:hover {
    transform: scale(1.1);
    animation: mic-wave 1.5s infinite;
}

@keyframes mic-wave {
    0% {
        box-shadow: 0 0 0 0px rgba(0, 123, 255, 0.8);
    }

    50% {
        box-shadow: 0 0 0 20px rgba(0, 123, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0px rgba(0, 123, 255, 0);
    }
}

.disabled-btn {
    background-color: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    border-color: transparent !important;
}

@media (max-width: 1400px) {
    .dropdown-content {
        right: 0;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {

    button,
    a,
    input,
    textarea {
        -webkit-tap-highlight-color: transparent;
    }

    button,
    a,
    input,
    textarea {
        outline: none;
    }

    button:focus,
    a:focus,
    input:focus,
    textarea:focus {
        outline: none;
        box-shadow: none;
    }

    nav {
        display: flex;
        align-items: center;
        position: relative;
    }

    nav ul li,
    .language-selector .dropdown-content a {
        font-size: 14px;
    }

    nav ul li:hover::after {
        width: 0%;
    }

    nav ul li:hover {
        background-color: var(--nav-bg);
    }

    .nav-toggle {
        display: block;
        cursor: pointer;
        font-size: 30px;
        margin-bottom: 3px;
    }

    nav #navList {
        display: none;
        /* Hide the navigation by default */
        flex-direction: column;
        /* Change to row direction */
        flex-wrap: wrap;
        /* Allow items to wrap */
        width: auto;
        /* Full width */
        padding: 0;
        /* Remove padding */
        margin: 0;
        /* Remove margin */
        position: absolute;
        top: 50px;
        background-color: var(--bg-primary);
        z-index: 1000;
        border-radius: 8px;
        gap: 0px;
        box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    }

    nav #navList.show {
        display: flex;
        /* Show when toggled */
    }

    nav #navList li {
        padding: 10px 20px;
    }

    nav a {
        padding: 10px 20px;
        text-align: left;
        width: 100%;
    }

    .project-intro {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .project-image img {
        max-width: 100%;
        /* Responsive image */
        height: auto;
        margin-bottom: 20px;
        /* Space below the image */
    }

    .project-details {
        max-width: 100%;
        /* Allow full width */
    }

    section h2 {
        font-size: 1.8rem;
        /* Smaller font size for headings */
    }

    .dropdown-content {
        overflow-y: hidden;
        /* Disable vertical scrolling */
    }

    .dropdown-content a {
        padding: 10px;
        width: auto;
    }

    .dropdown-content a img {
        width: 30px;
        height: 30px;
    }

    .mobile-concern-btn {
        display: block;
        padding: 10px;
        background-color: #007bffd2;
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        font-size: 12px !important;
        transition: background-color 0.3s;
    }

    .mobile-concern-btn:hover {
        background-color: #0056b3;
    }

    .language-selector {
        display: flex;
        align-items: center;
        gap: 0;
    }

    .dropdown {
        margin-top: 2px;
    }

    .donation-btn {
        margin-right: 0;
    }

    .donation-btn img {
        width: 40px;
        height: 40px;
    }

    .voice-icon {
        top: 0;
        right: 0;
    }

    .header-scrolled {
        padding: 5px 18px;
    }

    .theme-switch {
        left: 10px;
        padding: 8px;
    }

    .theme-toggle {
        font-size: 20px;
    }

}

/* Additional Responsive Styles */
@media (max-width: 480px) {
    header h1 {
        font-size: 2rem !important;
        /* Smaller header size for small screens */
    }
}

.theme-toggle {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    font-size: 24px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

[data-theme='light'] .dark-icon {
    display: none;
}

[data-theme='dark'] .light-icon {
    display: none;
}

/* Add this to your existing theme-related styles */
[data-theme='dark'] .donation-btn .flag-icon {
    filter: invert(1) brightness(100%);
    /* This will make the black icon appear white */
}

footer {
    position: relative;
    display: grid;
    grid-template-rows: auto auto;
    gap: 10px;
    justify-items: center;
    align-items: center;
    padding: 20px 0;
}

#copyright {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: -250px;
    top: 0;
    width: 250px;
    height: 100vh;
    background: var(--bg-primary) !important;
    backdrop-filter: blur(10px);
    transition: 0.3s ease-in-out;
    z-index: 1001;
    padding-top: 60px;
}

#mobileNavList {
    display: grid;
    gap: 10px;
    padding: 0 20px;
}

#mobileNavList li a {
    display: flex;
    align-items: center;
    gap: 15px;
}

#mobileNavList li a ion-icon {
    font-size: 24px;
    min-width: 24px;
}

.sidebar.active {
    left: 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
}

.nav-toggle {
    z-index: 1002;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}

.nav-toggle .navbar-toggle-icon {
    font-size: 24px;
    color: var(--text-primary);
    font-weight: bold;
}

.nav-toggle.active {
    left: 270px;
}

.sidebar ul {
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    list-style: none;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s ease;
}

.sidebar ul li:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 30px;
}

.sidebar ul li a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    display: block;
}

/* Desktop Navigation */
nav #navList {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav #navList li {
    position: relative;
}

nav #navList li a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* Remove the sidebar styles for desktop */
.sidebar {
    display: none;
}

.admin-float-btn {
    position: fixed;
    top: 50%;
    left: -3%;
    transform: translateY(-50%);
    background: #007bff;
    color: white;
    width: 130px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 16px;
    font-weight: 500;
    border-radius: 0 25px 25px 0;
    padding-right: 18px;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    text-decoration: none;
    z-index: 9999;
    overflow: visible;
    transition: all 0.3s ease;
}

/* Hover animation */
.admin-float-btn:hover {
    background: #0056b3;
}

/* Icon inside */
.admin-float-btn ion-icon {
    font-size: 20px;
    margin-left: 12px;
    margin-right: 8px;
}

/* Label text (optional) */
.admin-float-btn span {
    font-weight: 600;
    font-size: 14px;
}

/* Mobile Navigation */
@media only screen and (max-width: 768px) {
    .admin-float-btn {
        top: auto;
        bottom: 15px;
        left: 15px;
        transform: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        justify-content: center;
        text-align: center;
        padding: 0;
        visibility: hidden;
    }

    .admin-float-btn ion-icon {
        font-size: 22px;
        margin: 0;
    }

    .admin-float-btn::before {
        display: none;
    }

    .admin-float-btn:hover {
        transform: scale(1.1);
    }

    .admin-float-btn span {
        display: none;
    }

    body.nav-active .admin-float-btn {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    nav #navList {
        display: none;
        /* Hide desktop nav */
    }

    .sidebar {
        display: block;
        position: fixed;
        left: -250px;
        top: 0;
        width: 250px;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        transition: 0.3s ease-in-out;
        z-index: 1001;
        padding-top: 60px;
    }

    .sidebar.active {
        left: 0;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    }

    .sidebar #navList {
        display: flex !important;
        flex-direction: column;
        padding: 0;
        margin: 0;
    }

    .nav-toggle {
        display: block;
    }
}
