﻿html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.navbar {
    background-color: transparent !important; /* Navbar background */
    padding: 0px 0px;
    position: relative;
    border: none; /* Ta bort eventuell border */
    box-shadow: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.navbar-grid {
    position: relative;
    width: 100%;
    height: 80px; /* Adjust height as needed */
}

.navbar .nav-link {
    color: #ACACAC !important; /* Link text */
    font-size: 30px;
    transition: color 0.5s ease, text-shadow 0.5s ease;
    border-radius: 25px;
    white-space: nowrap;
}

.navbar .nav-link:hover {
    color: #f9f9f9 !important;
    text-shadow: 0px 10px 25px #f9f9f9;
}

.navbar-nav {
    display: flex;
    justify-content: center;
    height: 50px;
    border-color: transparent;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-logo {
    height: 40px;
    position: absolute;
    left: 2%; /* Adjust as needed */
    top: 50%;
    transform: translateY(-50%);
}

.nav-right {
    display: flex;
    align-items: center;
    position: absolute;
    right: 10%; /* Adjust as needed */
    top: 50%;
    transform: translateY(-50%);

    
}


.navbar-nav {
    display: flex;
    justify-content: center;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.nav-right {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-menu {
    display: none; /* göm hamburger på desktop */
}


@media (max-width: 480px) {
    .navbar-nav {
        display: none; /* göm vanliga länkar på mobil */
    }

    .nav-right {
        display: none; /* göm login/signup på mobilen (kan flyttas in i meny om du vill) */
    }

    .hamburger-menu {
        display: block; /* visa hamburger-meny på mobil */
        position: absolute;
        top: 50%;
        right: 5%; /* högst upp till höger */
        transform: translateY(-50%);
    }
}


.nav-item {
    margin: 0 10px;
}

.nav-link.signup-button {
    background-image: linear-gradient(to right, #00C9FF 0%, #92FE9D 51%, #00C9FF 100%);
    margin-top: 5px;
    padding: 0px 0px;
    text-align: center;
    transition: 0.5s;
    background-size: 200% auto;
    color: white !important;

    border-radius: 10px;
    display: block;
    border-radius: 25px;
}

    .nav-link.signup-button:hover {
        background-position: right center; /* change the direction of the change here */
        color: #fff;
        text-decoration: none;
        box-shadow: 0 0 20px #eee;
    }

#pfp {
    width: 7vh;
    height: 7vh;
    transition: box-shadow 0.5s ease, transform 0.5s ease;
    border-radius: 255px;
    object-fit: cover;
    object-position: center;
    
}
    #pfp:hover {
        box-shadow: 0px 10px 25px #f9f9f9;
        transform: scale(1.1);
    }
.desktop-nav {
    display: flex;
}

.mobile-nav {
    display: none;
}

.start-giving{
    display:none;
}

   /* -----------------------------------------------------mobil--------------------------------------------*/
@media (max-width: 480px) {

    desktop-nav {
        display: none !important;
    }

    .mobile-nav {
        display: block;
        position: relative;
    }

    .nav-link.signup-button {
        background-image: linear-gradient(to right, #00C9FF 0%, #92FE9D 51%, #00C9FF 100%);
        margin-top: 5px;
        padding: 0px 0px;
        text-align: center;
        transition: 0.5s;
        background-size: 200% auto;
        color: white !important;
        border-radius: 10px;
        display: block;
    }


    .start-giving {
        background-color: white;
        height: 4vh;
        width: 25vw;
        grid-column: 2 / 4;
        grid-row: 3 / 4;
        justify-self: center;
        align-self: center;
        margin-bottom: 3vh;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 50px;
        color: black;
        font-weight: bold;
        cursor: pointer;
        text-decoration: none;
        filter: drop-shadow(0 0 4px white);
    }

    .desktop-nav {
        display: none !important;
    }

    

    /* Hamburger button */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        cursor: pointer;
        z-index: 2000;
        position: absolute;
        
        top: 5px; /* avstånd från toppen */
        right: -340px;
        transform: translateY(-50%);
        z-index: 2000;
    }

        .hamburger span {
            display: block;
            height: 3px;
            width: 100%;
            background: #4ABF63; /* färg på streck */
            filter: drop-shadow(0 0 8px #4ABF63);
            border-radius: 2px;
            transition: 0.3s;
        }

    /* Dölja checkbox */
    #menu-toggle {
        display: none;
    }

    /* Menu */
    .mobile-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 45vw;
        height: 100%;
        background: #000000bc;
        box-shadow: -2px 0 12px rgba(0,0,0,0.2);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        list-style: none;
        padding: 80px 20px;
        z-index: 1500;
        border-left: 2px solid white;
        border-radius: 0px 0 0 0px;
       
    }
        .mobile-menu::before {
            content: "";
            position: absolute;
            top: 0;
            left: -2px; /* flytta ut linjen lite */
            height: 100%;
            width: 2px; /* linjetjocklek */
            background: white;
            filter: drop-shadow(0 0 8px white);
        }

        .mobile-menu li {
            margin: 20px 0;
        }

            .mobile-menu li a {
                color: white;
                text-decoration: none;
                font-size: 1.2rem;
                font-weight: 600;
            }

    /* Visa meny när checkbox är aktiv */
    #menu-toggle:checked ~ .mobile-menu {
        transform: translateX(0);
    }

    /* Animera hamburger till X */
    #menu-toggle:checked + .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    #menu-toggle:checked + .hamburger span:nth-child(2) {
        opacity: 0;
    }

    #menu-toggle:checked + .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }



    


}
   







    .nav-right:hover .logout-button,
    .nav-right:hover .edit-button {
        opacity: 1;
        transition: opacity 0.5s ease, transform 0.5s ease;
    }

    .logout-button,
    .edit-button {
        opacity: 0;
        transition: opacity 0.5s ease, transform 0.5s ease;
    }




    .auth-background {
        background-image: url('/Pictures/backgrund.png');
        background-size: cover;
        background-position: top;
        height: 90vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .auth-form {
        backdrop-filter: blur(20px);
        background-color: rgba(255, 255, 255, 0.1);
        padding: 40px;
        border-radius: 16px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        width: 25vw;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        text-align: center;
    }

    .auth-logo {
        width: 10vh;
        height: auto;
        margin-bottom: 20px;
    }

    .auth-form h2 {
        color: white;
        font-weight: 500;
        font-family: "Bebas neue";
        font-size: 5vh
    }

    .auth-input {
        width: 100%;
        padding: 10px;
        margin: 8px 0;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 10px;
        background-color: rgba(255, 255, 255, 0.1);
        color: white;
        transition: border 0.3s ease;
    }

        .auth-input:focus {
            outline: none;
            border: 1px solid #00c9ff;
            background-color: rgba(255, 255, 255, 0.2);
        }

    .auth-input-file {
        color: white;
        font-size: 14px;
    }

    .auth-button {
        width: 100%;
        padding: 10px;
        border: none;
        border-radius: 10px;
        background-image: linear-gradient(to right, #00C9FF 0%, #92FE9D 51%, #00C9FF 100%);
        background-size: 200% auto;
        color: white;
        font-size: 20px;
        cursor: pointer;
        transition: 0.5s;
        text-align: center;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        font-family: 'poppins';
        font-weight: 600
    }

        .auth-button:hover {
            background-position: right center;
            color: #fff;
            text-decoration: none;
            transform: scale(1.05);
        }

    .file-upload {
        position: relative;
        overflow: hidden;
        display: inline-block;
        border-radius: 25px;
        background: linear-gradient(to right, #00C9FF, #92FE9D);
        color: white;
        padding: 10px 20px;
        cursor: pointer;
        font-weight: bold;
    }

        .file-upload input[type="file"] {
            position: absolute;
            left: 0;
            top: 0;
            opacity: 0;
            cursor: pointer;
            height: 100%;
            width: 100%;
        }

    .auth-footer-text {
        margin-top: 10px;
        color: white;
        font-family: 'poppins';
    }

        .auth-footer-text a {
            color: #00C9FF;
            text-decoration: none;
            font-weight: bold;
            transition: all 0.2s;
        }

            .auth-footer-text a:hover {
                color: #009bc4;
            }

    .custom-file-upload {
        display: inline-block;
        padding: 10px 15px;
        background-color: rgba(255, 255, 255, 0.1);
        color: white;
        border-radius: 20px;
        cursor: pointer;
        margin-bottom: 15px;
        text-align: center;
        font-family: 'poppins';
        width: 20vw;
    }

        .custom-file-upload input[type="file"] {
            display: none;
        }







    /*--------------------------------------------------category---------------------------------------------*/


    .categories-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center; /* Horisontellt centrerat */
        align-items: center; /* Vertikalt centrerat */
        min-height: 80vh; /* Gör så att behållaren tar hela höjden */
        gap: 4rem; /* Mellanrum mellan korten */
    }

    .category-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 20vw;
        height: 50vh;
        background-color: #f0f0f0;
        border-radius: 50px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        text-decoration: none;
        color: #333;
        transition: all 0.4s ease;
        position: relative;
        overflow: hidden;
        z-index: 0;
    }

        /* Din shimmer-effekt */
        .category-card::before {
            content: "";
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(0, 201, 255, 0.15), transparent 70%);
            opacity: 0;
            transform: rotate(45deg);
            transition: opacity 0.4s ease;
            z-index: 2;
        }

        .category-card:hover::before {
            opacity: 1;
            animation: shimmer 2s infinite linear;
        }

        /* NY: Bakgrundsfyllning från botten uppåt */
        .category-card::after {
            content: "";
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 0%;
            background: linear-gradient(to right, #a6ecff, #ddffdf);
            transition: height 0.4s ease;
            z-index: 1;
            border-radius: 50px;
        }

        .category-card:hover::after {
            height: 100%;
        }

        /* Så innehållet visas ovanpå ::after och ::before */
        .category-card * {
            position: relative;
            z-index: 3;
        }

        /* Övriga hover-effekter */
        .category-card:hover {
            transform: translateY(-15px);
            box-shadow: 0 0 80px rgba(0, 201, 255, 0.7);
            border: none;
        }


    .category-icon {
        height: 30vh;
        margin-bottom: 1rem;
        /* Exempel på att centrera och ge ikon lite stil */
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 3rem; /* Om du använder text-ikon eller fontawesome */
        color: #555;
        object-fit: cover;
        s
    }

    .category-name {
        font-size: 3rem;
        color: black;
        text-align: center;
        font-family: 'poppins';
        transition-duration: 0.3s;
    }

    .icon-animated {
        height: 30vh;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 3rem;
        color: #555;
        object-fit: cover;
        display: none;
        transition: all 0.4s ease;
    }


    .category-card:hover .category-icon {
        display: none;
        transition-duration: 0.3s;
    }

    .category-card:hover .icon-animated {
        display: none;
    }





    .category-card:hover .category-name {
        color: black;
    }

    .category-desc {
        opacity: 0;
        visibility: hidden;
        transition-duration: 0.3s;
        transform: translateY(10px);
        text-align: center;
        color: white;
        font-size: 0.95rem;
        margin-top: 1rem;
        max-width: 80%;
        font-family: 'inter';
    }

    .category-card:hover .category-desc {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        color: black;
    }

    .earth-pic {
        animation: slideIn 1s ease-out 0.2s forwards;
        height: 25vh;
        position: fixed;
        bottom: 0;
        right: 0;
        filter: grayscale(100%);
    }

    .new-earth-pic {
        animation: slideInLeft 1s ease-out 0.2s forwards;
        height: 25vh;
        position: fixed;
        bottom: 0;
        left: 2vw;
        display: none;
    }

    @keyframes slideIn {
        from {
            transform: translateX(100%); /* utanför skärmen till höger */
            opacity: 0;
        }

        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    @keyframes slideInLeft {
        from {
            transform: translateX(-100%); /* utanför skärmen till höger */
            opacity: 0;
        }

        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

@media (max-width: 768px) {
    .categories-container {
        display: flex;
        flex-direction: column; /* Stapla korten i rader */
        gap: 1rem;
        padding: 10px;
        overflow-x: hidden; /* Ingen horisontell scroll */
    }



    .category-card {
        display: flex;
        justify-content: space-between; /* Text vänster, ikon höger */
        align-items: center;
        width: 100%;
        padding: 1rem 1.5rem;
        border-radius: 15px;
        height: 20vh;
    }

    .category-content {
        flex: 1; /* Textdelen tar platsen */
    }

    .category-name {
        font-size: 1rem; /* Lite mindre text för mobil */
        margin: 0;
    }

    .category-desc {
        font-size: 0.8rem;
        margin-top: 0.3rem;
        color: black !important;
        opacity: 0 !important;
    }

    .category-icon {
        font-size: 1.5rem; /* Mindre ikon */
        margin-left: 10px;
        height:10vh;

    }

    /* Dölj jord-bilder på mobil */
    .earth-pic,
    .new-earth-pic {
        display: none;
    }
}

    /*
--------------------------------account editt-------------------------------------
*/

    /* Återanvänd .form-container, .form-title, .form-label, .form-input, .file-upload-wrapper, .custom-file-input, .custom-file-label och .submit-button som du redan har */

    /* Om du vill kan du justera max-bredd för kontosidan */
    .form-container {
        max-width: 40vw;
        margin-left: 30vw;
    }

    /* Visa aktuell profilbild snyggare */
    .form-current-photo {
        max-width: 150px;
        max-height: 150px;
        border-radius: 50%;
        border: 2px solid #555;
        margin-top: 10px;
        object-fit: cover;
    }


    .input-row {
        display: flex;
        gap: 20px;
        margin-top: 20px;
    }

    /* Se till att knappen är centrerad */
    .submit-button {
        width: 80%;
        display: block;
        margin: 30px auto 0;
    }

    /* Responsive: stapla vertikalt på smala skärmar */
    @media (max-width: 768px) {
        .form-container {
            max-width: 90vw;
            margin-left: 5vw;
        }

        .input-row {
            flex-direction: column;
        }

        .submit-button {
            width: 100%;
        }
    }
   /* ---------------------------------------------------------mobil-----------------------------------------*/
    @media (max-width: 480px) {
        .navbar-grid {
            height: 60px;
        }

        .navbar .nav-link {
            font-size: 10px;
            display: flex;
            justify-content: center;
        }

        .auth-form {
            width: 80vw;
            padding: 30px 20px;
            
        }

        button, .btn {
            font-size: 16px;
            padding: 10px 20px;
        }

        .nav-logo {
            width: 20vw;
            height: auto;
        }

        .auth-input {
            width: 100%;
            padding: 10px;
            margin: 8px 0;
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            background-color: rgba(255, 255, 255, 0.1);
            color: white;
            transition: border 0.3s ease;
        }
        .register-banner{
            font-size:30px;
            font-family:'Bebas Neue';
            color:white;
        }

        .custom-file-upload {
            display: inline-block;
            padding: 10px 15px;
            background-color: rgba(255, 255, 255, 0.1);
            color: white;
            border-radius: 20px;
            cursor: pointer;
            margin-bottom: 15px;
            text-align: center;
            font-family: 'poppins';
            width: 30vw;
        }
    }