
/* ==========================================
   HALLOWEEN RUTES
   Estil principal
   Paleta: Morat + Lila + Taronja
========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #0E0918;
    color: #ffffff;
    overflow-x: hidden;
}


/* ==========================================
   FONS
========================================== */

body::before {
    content: "";
    position: fixed;
    inset: 0;

    background:
        radial-gradient(
            circle at 50% 35%,
            rgba(139, 92, 246, 0.20),
            transparent 38%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(255, 105, 0, 0.10),
            transparent 30%
        ),
        radial-gradient(
            circle at 15% 20%,
            rgba(107, 33, 168, 0.15),
            transparent 30%
        );

    pointer-events: none;
    z-index: -5;
}


/* ==========================================
   BOIRA
========================================== */

.fog {
    position: fixed;

    width: 700px;
    height: 250px;

    background: rgba(168, 85, 247, 0.035);

    filter: blur(60px);

    border-radius: 50%;

    pointer-events: none;

    z-index: -2;
}

.fog-1 {
    left: -200px;
    bottom: 10%;

    transform: rotate(-10deg);
}

.fog-2 {
    right: -250px;
    top: 35%;

    transform: rotate(15deg);
}


/* ==========================================
   CAPÇALERA
========================================== */

.header {
    position: fixed;     /* S'ancora fixament a dalt de tot */
    top: 0;
    left: 0;
    width: 100%;
    background: #0E0918; /* Fons fosc perquè no es transparenti el contingut */
    border-bottom: 2px solid rgba(168, 85, 247, 0.4);
    padding: 15px 30px;  /* Espaiat lateral i vertical */
    box-sizing: border-box;
    display: flex;
    flex-direction: row; /* Clau: posa els elements en línia horitzontal */
    justify-content: space-between; /* Separa el logo a l'esquerra i l'any a la dreta */
    align-items: center; /* Els alinea verticalment al centre */
    z-index: 99999;      /* Sempre al davant */
}


/* LOGO */

.logo {
    display: flex;

    align-items: center;

    gap: 12px;

    font-size: 13px;

    font-weight: bold;

    letter-spacing: 2px;

    line-height: 1.1;
}

.logo-icon {
    font-size: 34px;

    filter:
        drop-shadow(
            0 0 12px rgba(255, 105, 0, 0.35)
        );
}

.logo strong {
    color: #A855F7;
}


/* ANY */

.year {
    color: #C084FC;

    font-size: 14px;

    font-weight: bold;

    letter-spacing: 3px;
}


/* ==========================================
   HERO
========================================== */

.hero {
    position: relative;
    /* Canviem min-height: 100vh a auto o ajustem padding perquè no ocupe massa */
    min-height: calc(100vh - 80px); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    /* RE DUÏM EL PADDING SUPERIOR (abans tenies 120px) */
    padding: 40px 20px 80px; 

    text-align: center;
    overflow: hidden;
}


/* ==========================================
   LLUNA
========================================== */

.moon {
    position: absolute;

    top: 13%;
    right: 12%;

    width: 110px;
    height: 110px;

    border-radius: 50%;

    background: #E9D5FF;

    box-shadow:
        0 0 30px rgba(168, 85, 247, 0.45),
        0 0 80px rgba(139, 92, 246, 0.18);

    opacity: 0.9;
}

.moon::after {
    content: "";

    position: absolute;

    width: 100px;
    height: 100px;

    top: -12px;
    left: 18px;

    border-radius: 50%;

    background: #0E0918;
}


/* ==========================================
   RAT-PENATS
========================================== */

.bats {
    position: absolute;

    top: 23%;
    left: 15%;

    font-size: 45px;

    opacity: 0.55;

    transform: rotate(-10deg);

    filter:
        drop-shadow(
            0 0 12px rgba(168, 85, 247, 0.35)
        );
}




/* ==========================================
   CONTINGUT PRINCIPAL
========================================== */

.hero-content {
    position: relative;

    max-width: 750px;

    z-index: 2;
}


/* UBICACIÓ */

.location {
    display: inline-block;

    margin-bottom: 25px;

    padding: 8px 16px;

    border: 1px solid rgba(168, 85, 247, 0.45);

    border-radius: 30px;

    background: rgba(168, 85, 247, 0.10);

    color: #C084FC;

    font-size: 13px;

    font-weight: bold;

    letter-spacing: 2px;

    box-shadow:
        0 0 25px rgba(139, 92, 246, 0.08);
}


/* ==========================================
   TÍTOL
========================================== */

h1 {
    margin-bottom: 25px;

    font-size: clamp(48px, 8vw, 92px);

    line-height: 0.9;

    letter-spacing: -3px;

    font-weight: 900;
}

h1 span {
    color: #FF6900;

    text-shadow:
        0 0 20px rgba(255, 105, 0, 0.30),
        0 0 45px rgba(255, 105, 0, 0.10);
}


/* ==========================================
   SUBTÍTOL
========================================== */

.subtitle {
    max-width: 600px;

    margin: 0 auto 35px;

    color: #C4BBD0;

    font-size: 17px;

    line-height: 1.6;
}


/* ==========================================
   BOTONS
========================================== */

.buttons {
    display: flex;

    justify-content: center;

    gap: 14px;

    flex-wrap: wrap;
}

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 52px;

    padding: 0 25px;

    border-radius: 8px;

    text-decoration: none;

    font-size: 13px;

    font-weight: bold;

    letter-spacing: 0.5px;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-3px);
}


/* BOTÓ PRINCIPAL */

.btn-primary {
    color: #ffffff;

    background: #FF6900;

    box-shadow:
        0 8px 30px rgba(255, 105, 0, 0.25);
}

.btn-primary:hover {
    background: #FF7B1A;

    box-shadow:
        0 12px 40px rgba(255, 105, 0, 0.40);
}


/* BOTÓ SECUNDARI */

.btn-secondary {
    color: #E9D5FF;

    border: 1px solid rgba(168, 85, 247, 0.45);

    background: rgba(139, 92, 246, 0.08);

    box-shadow:
        0 0 25px rgba(139, 92, 246, 0.05);
}

.btn-secondary:hover {
    border-color: #A855F7;

    background: rgba(139, 92, 246, 0.15);

    box-shadow:
        0 8px 30px rgba(139, 92, 246, 0.15);
}


/* ==========================================
   ESTADÍSTIQUES
========================================== */

.stats {
    position: absolute;

    bottom: 45px;

    display: flex;

    gap: 55px;
}

.stat {
    display: flex;

    flex-direction: column;

    gap: 5px;
}

.stat-number {
    color: #C084FC;

    font-size: 28px;

    font-weight: 900;

    text-shadow:
        0 0 15px rgba(168, 85, 247, 0.25);
}

.stat-label {
    color: #81778D;

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: 1.5px;
}


/* ==========================================
   PEU
========================================== */

.footer {
    position: absolute;

    bottom: 0;

    width: 100%;

    display: flex;

    justify-content: space-between;

    padding: 12px 6%;

    color: #625A69;

    font-size: 10px;

    letter-spacing: 1px;
}


/* ==========================================
   MÒBIL
========================================== */

@media (max-width: 700px) {

    .header {
        padding: 20px;
    }

    .year {
        font-size: 11px;
    }

    .moon {
        width: 75px;
        height: 75px;

        right: 8%;
        top: 15%;
    }

    .moon::after {
        width: 70px;
        height: 70px;

        left: 15px;
        top: -8px;
    }

    .bats {
        left: 5%;
        top: 24%;

        font-size: 30px;
    }

    .hero {
        padding-top: 130px;

        padding-bottom: 130px;
    }

    h1 {
        letter-spacing: -2px;
    }

    .subtitle {
        font-size: 15px;
    }

    .buttons {
        width: 100%;
    }

    .btn {
        width: 100%;

        max-width: 340px;
    }

    .stats {
       /* bottom: 50px;*/

        /*gap: 25px;*/
        
        margin-top: 10px !important;
        padding: 10px 12px !important;
        gap: 8px !important;
    }

    .stat-number {
        font-size: 22px;
    }

    .stat-label {
        font-size: 9px;
    }

    .footer {
        display: none;
    }
}


/* ==========================================
   SELECCIÓ DE POBLE
========================================== */

.select-page {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(139, 92, 246, 0.18),
            transparent 38%
        ),
        #0E0918;
}


.select-container {

    min-height: 100vh;

    display: flex;

    justify-content: center;
    align-items: center;

    padding: 120px 20px 60px;

}


.select-card {

    width: 100%;
    max-width: 650px;

    text-align: center;

}


.select-icon {

    font-size: 58px;

    margin-bottom: 20px;

    filter:
        drop-shadow(
            0 0 25px rgba(168, 85, 247, 0.35)
        );
}


.select-location {

    display: inline-block;

    padding: 7px 15px;

    margin-bottom: 22px;

    border: 1px solid
        rgba(168, 85, 247, 0.4);

    border-radius: 30px;

    background:
        rgba(168, 85, 247, 0.08);

    color: #C084FC;

    font-size: 11px;

    font-weight: bold;

    letter-spacing: 2px;
}


.select-card h1 {

    margin-bottom: 22px;

    font-size: clamp(42px, 7vw, 72px);

    line-height: 0.92;

}


.select-card h1 span {

    color: #A855F7;

    text-shadow:
        0 0 25px
        rgba(168, 85, 247, 0.3);
}


.select-card > p {

    max-width: 500px;

    margin: 0 auto 32px;

    color: #B9B0C5;

    font-size: 16px;

    line-height: 1.6;
}


/* ==========================================
   BUSCADOR
========================================== */

.search-box {

    display: flex;

    align-items: center;

    width: 100%;

    height: 62px;

    padding: 0 20px;

    border: 1px solid
        rgba(168, 85, 247, 0.35);

    border-radius: 12px;

    background:
        rgba(255, 255, 255, 0.04);

    box-shadow:
        0 10px 40px
        rgba(0, 0, 0, 0.2);

    transition: 0.25s;
}


.search-box:focus-within {

    border-color: #A855F7;

    background:
        rgba(139, 92, 246, 0.07);

    box-shadow:
        0 0 35px
        rgba(139, 92, 246, 0.12);
}


.search-icon {

    margin-right: 12px;

    font-size: 21px;
}


.search-box input {

    width: 100%;

    border: none;

    outline: none;

    background: transparent;

    color: white;

    font-size: 16px;

    font-family: inherit;
}


.search-box input::placeholder {

    color: #71677D;
}


/* ==========================================
   RESULTATS
========================================== */

.resultats {

    width: 100%;

    margin-top: 12px;
}


.poble-resultat {

    width: 100%;

    display: flex;

    align-items: center;

    text-align: left;

    gap: 15px;

    padding: 15px 18px;

    margin-bottom: 8px;

    border: 1px solid
        rgba(168, 85, 247, 0.16);

    border-radius: 10px;

    background:
        rgba(255, 255, 255, 0.035);

    color: white;

    cursor: pointer;

    font-family: inherit;

    transition: 0.2s;
}


.poble-resultat:hover {

    transform: translateX(5px);

    border-color: #A855F7;

    background:
        rgba(139, 92, 246, 0.12);
}


.poble-icon {

    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background:
        rgba(168, 85, 247, 0.1);

    font-size: 20px;
}


.poble-info {

    flex: 1;

    display: flex;

    flex-direction: column;

    gap: 4px;
}


.poble-info strong {

    font-size: 15px;
}


.poble-info small {

    color: #82778F;

    font-size: 11px;
}


.arrow {

    color: #C084FC;

    font-size: 20px;
}


/* ==========================================
   MISSATGES
========================================== */

.loading {

    margin-top: 15px;

    color: #A855F7;

    font-size: 12px;
}


.no-results {

    padding: 18px;

    color: #82778F;

    font-size: 13px;
}


.error {

    padding: 18px;

    color: #FF6900;

    font-size: 13px;
}


/* ==========================================
   MÒBIL
========================================== */

@media (max-width: 700px) {

    .select-container {

       /* padding-top: 120px;*/
        padding-top: 20px;


    }

    .select-icon {

        font-size: 48px;

    }

    .select-card > p {

        font-size: 14px;

    }

    .search-box {

        height: 58px;

    }

}

.editar-casa-enllac{
    margin-top:22px;
   
}

.editar-casa-enllac a{
    display:inline-block;
    color:#B9B0C5 !important;
    text-decoration:none;
    font-size:13px;
    padding:11px 16px;
    border:1px solid rgba(168,85,247,.25);
    border-radius:10px;
    background:rgba(168,85,247,.06);
    transition:.2s;
}

.editar-casa-enllac a:hover{
    border-color:#A855F7;
    background:rgba(168,85,247,.12);
}





/* --- MENÚ FLOTANT TERRORÍFIC --- */
.menu-flotant-container {
    position: fixed;
    top: 80px;
    left: 20px;
    z-index: 10000;
}

/* El botó flotant amb aparença de relleu gòtic i brillantor lila/taronja */
.oto-flotant {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #140F22, #2A1B4E);
    color: #FF7A00;
    border: 1px solid #A855F7;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.5), inset 0 0 10px rgba(168, 85, 247, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.oto-flotant:hover {
    background: #A855F7;
    color: #FFF;
    border-color: #FF7A00;
    box-shadow: 0 4px 25px rgba(255, 122, 0, 0.7);
    transform: scale(1.08) translateY(-2px);
}

.oto-flotant:active {
    transform: scale(0.95);
}

/* El menú desplegable tipus pergamí/cripta fosca */
.menu-desplegable {
    position: absolute;
    top: 70px;
    left: 0;
    width: 230px;
    background-color: #140F22;
    border: 1px solid #A855F7;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.9), 0 0 15px rgba(168, 85, 247, 0.3);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 1;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.menu-desplegable.ocult {
    display: none !important;
    opacity: 0;
    transform: translateY(-10px);
}

.menu-titol {
    font-size: 0.85rem;
    color: #FF7A00;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.3);
    margin-bottom: 4px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.menu-item {
    padding: 10px 12px;
    color: #E9D5FF;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    display: block;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.menu-item:hover {
    background-color: rgba(168, 85, 247, 0.2);
    color: #FFF;
    border-color: rgba(168, 85, 247, 0.4);
    transform: translateX(4px);
}

.menu-item.perill {
    color: #FCA5A5;
}

.menu-item.perill:hover {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #F87171;
}