/* --- IMPORTERA TYPSNITTET POPPINS --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;800&display=swap');

/* =========================================
   GRUNDDESIGN & BAKGRUND
   ========================================= */
html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #0f172a;
    background-image: 
        radial-gradient(at 0% 0%, rgba(30, 27, 75, 1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(49, 46, 129, 0.8) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(15, 23, 42, 1) 0px, transparent 50%);
    background-attachment: fixed;
    color: #e2e8f0;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    padding-top: 100px;
}

/* =========================================
   NAVIGATION & SIDFOT
   ========================================= */
.navbar-custom {
    background-color: rgba(0, 0, 0, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
    backdrop-filter: blur(10px);
}

.navbar-custom .dropdown-menu {
    background-color: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer {
    background: linear-gradient(to bottom, #252525, #000000);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.4);
    position: relative; 
    z-index: 10;
    padding: 20px 0; 
    color: #aaa;
    font-size: 0.85rem;
    margin-top: auto; /* Pressar alltid ner sidfoten till botten */
}
.site-footer a { color: #bbb; text-decoration: none; transition: color 0.2s; }
.site-footer a:hover { color: #fff; }

/* =========================================
   KORTDESIGN (FROSTAD GLASEFFEKT)
   ========================================= */
.card, .custom-shadow-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.10); /* Ändrat från 0.03 till 0.10 */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #f8fafc;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover, .custom-shadow-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.card-body { padding: 20px; text-align: center; flex: 1; }
.card-title { font-weight: 800; margin-bottom: 5px; color: #ffffff; font-size: 1.25rem; letter-spacing: 0.5px; }
.card-subtitle { font-size: 0.85rem; color: #94a3b8; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1.5px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 15px; }
.info-row { margin-bottom: 8px; font-size: 0.9rem; line-height: 1.4; text-align: center; }
.info-label { font-weight: 600; color: #cbd5e1; margin-right: 6px; }
.info-box { background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.05); color: #cbd5e1; border-radius: 8px; padding: 10px; margin-top: 15px; font-size: 0.9rem;}
.badge-custom { font-size: 0.9rem; padding: 8px 12px; background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); border-radius: 6px; text-transform: uppercase; letter-spacing: 1.5px; }
.extra-links { margin-top: 15px; font-size: 0.85rem; background: rgba(255,255,255,0.05); padding: 8px; border-radius: 6px; }
.extra-links a { color: #38bdf8; margin: 0 5px; text-decoration: none; border-bottom: 1px dotted #38bdf8; transition: color 0.2s; }
.extra-links a:hover { color: #fff; border-bottom: 1px solid #fff; }

/* =========================================
   3D FLIPP OCH BILDRAMAR
   ========================================= */
.image-wrapper {
    padding: 20px 10px 0 10px;
    text-align: center;
    display: flex; 
    justify-content: center;
    align-items: center;
    min-height: 300px;
    perspective: 1000px; 
    cursor: pointer; 
    -webkit-tap-highlight-color: transparent; 
}

.flip-card-inner {
    position: relative;
    display: grid; 
    place-items: center; 
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

@media (hover: hover) and (pointer: fine) {
    .image-wrapper:hover .flip-card-inner { transform: rotateY(180deg); }
}

.flip-card-inner.flipped { transform: rotateY(180deg); }

.flip-card-front, .flip-card-back, .photo-frame {
    grid-area: 1 / 1; 
    background-color: #fff; 
    padding: 8px; 
    border: 1px solid #ccc;
    box-shadow: 3px 3px 15px rgba(0,0,0,0.5); 
    border-radius: 4px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-frame { display: inline-block; transition: transform 0.2s; }
.photo-frame:hover { transform: scale(1.02); }

.flip-card-front { z-index: 2; }
.flip-card-back { transform: rotateY(180deg); }
.custom-img { width: auto; max-width: 100%; height: auto; display: block; }


/* =========================================
   BOKSTAVSLISTAN (ABC-KNAPP OCH LISTA)
   ========================================= */
.letter-index-wrapper {
    /* Fyller ingen positioneringsfunktion längre eftersom knappen och listan styrs separat */
}

/* Den lilla, diskreta ABC-knappen nere till vänster */
.abc-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1040;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4); /* Diskret, mörk och genomskinlig */
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    backdrop-filter: blur(5px);
}

/* Hover-effekt BARA för datorer med muspekare (förhindrar att den hänger sig på touchskärmar) */
@media (hover: hover) and (pointer: fine) {
    .abc-btn:hover {
        background: rgba(0, 0, 0, 0.8);
        color: #fff;
        transform: scale(1.1);
        border-color: rgba(255, 255, 255, 0.3);
    }
}

/* Klick-effekt för mobiler - knappen "trycks in" lite snabbt när man rör den */
.abc-btn:active {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
}

/* Själva listan (Mitten till vänster, dold från början) */
.letter-list {
    position: fixed;
    top: 50%;
    left: 20px;
    z-index: 1030;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 10px 5px; /* Mindre padding så alla bokstäver får plats */
    width: 35px;
    backdrop-filter: blur(5px);
    
    /* Animationsinställningar och positionering */
    opacity: 0;
    visibility: hidden;
    /* Startar lite nerskalad. translateY(-50%) ser till att den är exakt centrerad i höjdled */
    transform: translateY(-50%) scale(0.9); 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* När listan vecklas ut */
.letter-list.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

.letter-list a {
    display: block; 
    color: rgba(255, 255, 255, 0.6); 
    text-align: center; 
    font-weight: bold; 
    text-decoration: none; 
    padding: 2px 0; /* Tightare mellanrum mellan bokstäverna */
    font-size: 0.75rem; /* Mindre text för att slippa scrolla */
    transition: all 0.2s; 
    width: 100%;
}

.letter-list a:hover { 
    color: #fff; 
    transform: scale(1.3); 
}

/* Anpassning för mindre skärmar/mobiler */
@media (max-width: 768px) {
    .abc-btn {
        bottom: 10px;
        left: 10px;
        width: 35px;
        height: 35px;
        font-size: 0.65rem;
    }
    .letter-list {
        left: 10px;
        width: 30px;
        padding: 5px 2px;
    }
    .letter-list a {
        font-size: 0.65rem;
        padding: 1px 0;
    }
}

/* =========================================
   KNAPPAR & SÖKFÄLT
   ========================================= */
.card-footer {
    background-color: transparent;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; 
}

.ring-btn {
    width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.4rem; text-decoration: none; border: 2px solid; transition: all 0.3s ease; line-height: 1; font-family: Georgia, "Times New Roman", Times, serif; font-style: italic; padding-bottom: 3px;
}

.btn-tradera { border-color: #fbbf24; color: #fbbf24; background-color: rgba(251, 191, 36, 0.1); }
.btn-tradera:hover { background-color: #fbbf24; color: #000; transform: scale(1.15) rotate(5deg); box-shadow: 0 0 15px rgba(251, 191, 36, 0.5); }

.btn-ebay { border-color: #ef4444; color: #ef4444; background-color: rgba(239, 68, 68, 0.1); }
.btn-ebay:hover { background-color: #ef4444; color: #fff; transform: scale(1.15) rotate(-5deg); box-shadow: 0 0 15px rgba(239, 68, 68, 0.5); }

.btn-info-link { border-color: #38bdf8; color: #38bdf8; background-color: rgba(56, 189, 248, 0.1); }
.btn-info-link:hover { background-color: #38bdf8; color: #fff; transform: scale(1.15) rotate(5deg); box-shadow: 0 0 15px rgba(56, 189, 248, 0.5); }

.form-select.bg-dark {
    background-color: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    border-radius: 50px;
    padding: 10px 20px;
}
.form-select.bg-dark:focus { box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.1); border-color: #fff; }
.btn-outline-light { border-radius: 50px; padding: 10px 25px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }

/* =========================================
   RUBRIKER
   ========================================= */
   h1 {
    font-size: 2rem !important;   /* Ändra storlek (standard är ofta ca 2.5rem) */
    letter-spacing: 3px;         /* Justera avståndet mellan bokstäverna */
}
.text-white-50.fs-5 {
    font-size: 1.0rem !important; /* Gör underrubriken mindre eller större */
    opacity: 0.8;                 /* Justera hur tydlig texten ska vara */
}
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem !important; /* Mindre rubrik på mobilen */
    }
    .text-white-50.fs-5 {
        font-size: 0.9rem !important; /* Mindre underrubrik på mobilen */
    }
}



/* =========================================
   NAMNLISTOR
   ========================================= */
   /* Ändrar textstorleken i söklistan */
.form-select {
    font-size: 1.0rem !important; /* Justera siffran efter smak */
    padding: 10px !important;     /* Ger lite mer luft inuti rutan */
}

/* Ändrar textstorleken specifikt för alternativen inuti listan */
.form-select option {
    font-size: 0,9rem !important;
    background-color: #1e293b;    /* Håller bakgrunden mörk */
    color: #fff;                  /* Vit text */
}
@media (max-width: 768px) {
    .form-select {
        font-size: 0.9rem !important; /* Något mindre text på mobilen */
    }
}