/* =============== GLOBAL =============== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

body {
    position: relative;
    overflow: hidden;
}
html, body {
    height: 100%;
}

/* base body */
body {
    position: relative;
    overflow: hidden;
    background: transparent;

}
/* Background LOGO layer */
body::before {
    content: "";
    position: fixed;
    inset: 0; /* top:0; right:0; bottom:0; left:0 */
    pointer-events: none;

    background-image: url("/media/core_media/icons/logo.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70vw;

    filter: blur(40px); /* blur only */
    opacity: 0.18;      /* separate opacity */
    transform: translateZ(0);

    z-index: 0;         /* put pseudo *above* body background but behind content */
}

.page-wrapper,
.page-box,
.content {
    position: relative;
    z-index: 1;
}


/* =============== LANGUAGE SWITCHER (flags) =============== */

/* Language buttons */
.language-switcher {
    display: flex;
    gap: 0.5rem;
}

/* element to update: language buttons */
.lang-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid #ccc;
    background-color: #f7f7f7;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
}

/* stronger selector if needed */
button.lang-btn.active {
    background-color: #B19CD9 !important;
    color: #fff !important;
    border-color: #B19CD9 !important;
}


.lang-btn.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.lang-btn img {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    border: 1px solid #ccc;
}

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


/* ---------- PAGE WRAPPER ---------- */
/* new element: wrapper to center the white page box */
.page-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;

    padding: 2rem;
}

/* ---------- PAGE BOX ---------- */
/* new element: single white box containing header + cards */
.page-box {
    background-color: rgba(255,255,255,0.92);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    box-sizing: border-box;
}

/* ---------- TOP BAR ---------- */
/* element to update: top-bar inside page-box */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}


/* element to update: logo container */
.logo {
    display: flex;
    align-items: center;   /* vertically center items */
    gap: 0.5rem;           /* space between image and text */
}

/* element to update: logo image */
.logo img {
    height: 80px;
    display: block;        /* remove extra inline spacing */
}

/* element to update: logo text */
.logo span {
    height: 80px;
    font-weight: bold;
    display: flex;
    align-items: center;   /* center text vertically with image */
}

/* =============== LANGUAGE MENU (TEXT) =============== */

.lang form {
    display: flex;
    gap: 10px;
}

.lang-link {
    background: none;
    border: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
}

.lang-link:hover {
    color: #000;
}


/* =============== MAIN LAYOUT =============== */

/* ---------- CONTENT / CARDS ---------- */
/* element to update: content container */
.content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
}


/* element to update: individual cards */
.card {
    flex: 1 1 45%; /* two cards side by side on wide screens */
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 1.5rem;
    box-sizing: border-box;
}


.card h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.card p {
    color: #555;
    margin-bottom: 22px;
    line-height: 1.4;
}

.card p.card-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: -10px;
    margin-bottom: 20px;
    padding: 10px 14px;
    background: #f2eefc;
    color: #5a35d2;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.card p.card-hint::before {
    content: "\2139";
    font-weight: 700;
    flex: 0 0 auto;
}

/* Container for the two subcards */
.subcards-container {
    display: flex;
    gap: 20px;           /* space between subcards */
    margin-top: 20px;
    flex-wrap: wrap;      /* wrap on small screens */
    justify-content: space-between;
}

/* Individual subcard */
.subcard {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    flex: 1 1 45%;       /* grow, shrink, basis 45% */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect for subcards */
.subcard:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Subcard headings */
.subcard h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #333;
}

/* Subcard buttons */
.subcard .btn-white {
    display: inline-block;
    padding: 10px 25px;
    background-color: #fff;
    color: #333;
    border: 2px solid #333;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.subcard .btn-white:hover {
    background-color: #333;
    color: #fff;
}


/* =============== FORM INPUTS =============== */

label {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

input {
    width: 100%;
    padding: 12px;
    margin-bottom: 18px;
    font-size: 15px;
    border: 1px solid #d5d5d5;
    border-radius: 10px;
    outline: none;
    transition: border 0.2s;
}

input:focus {
    border: 1px solid #8a4dfc;
}


/* =============== BUTTONS =============== */

.btn-white,
.btn-blue {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}

/* White button */
.btn-white {
    background: white;
    border: 1px solid #dcdcdc;
}

.btn-white:hover {
    background: #f1f1f1;
}

/* Blue/Purple button */
.btn-blue {
    background: #6d45e6;
    border: none;
    color: white;
    font-weight: 600;
}

.btn-blue:hover {
    background: #5a35d2;
}

/* Outline violet button — pairs with .btn-blue (e.g. "Registrati" next to "Accedi") */
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    background: #fff;
    color: #6d45e6;
    border: 1.5px solid #6d45e6;
    transition: 0.2s;
}

.btn-outline:hover {
    background: #f2eefc;
}

/* "oppure" divider + SPID login button (matches adraccounts/login.html) */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: #999;
    font-size: 13px;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e5e5;
}

.btn-spid {
    width: 100%;
    padding: 12px 16px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #06c;
    background: #fff;
    border: 2px solid #06c;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, transform 0.05s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    box-sizing: border-box;
}

.btn-spid:hover { background: #f0f5ff; }
.btn-spid:active { transform: translateY(1px); }


/* =============== SPID AREA =============== */

.spid-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.spid-logo {
    height: 32px;
}


.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5); /* overlay stays full screen */
    z-index: 1000;
}

.modal-content {
    position: relative;
    top: 15px;             /* pull modal content down 150px */
    margin: 0 auto;         /* horizontal center */
    background: #fff;
    padding: 20px;
    width: 600px;           /* 150% wider than original 400px */
    border-radius: 8px;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 20px;
}


/* Container for logged-in buttons */
.logged-in-actions {
    display: flex;
    gap: 15px;           /* space between buttons */
    margin-top: 20px;
}

/* Area riservata button */
.logged-in-actions a.area-btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: #fff;     /* white background */
    color: #333;                /* dark text */
    border: 2px solid #333;     /* subtle border */
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logged-in-actions a.area-btn:hover {
    background-color: #333;    /* invert colors on hover */
    color: #fff;
}

/* Disconnetti button */
.logged-in-actions button.logout-btn {
    padding: 10px 25px;
    background-color: rgba(255, 0, 0, 0.3);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logged-in-actions button.logout-btn:hover {
    background-color: #d9363e;  /* darker red on hover */
}



/* =============== RESPONSIVE =============== */

@media (max-width: 900px) {
    .content {
        flex-direction: column;
    }

    .card {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .content {
        flex-direction: column;
    }

    .card {
        flex: 1 1 100%;
    }
}

@media (max-width: 500px) {
    .language-switcher {
        top: 10px;
        right: 10px;
    }

    .lang-btn img {
        width: 28px;
        height: 28px;
    }

    .logo span {
        font-size: 22px;
    }
}
