/* CSS Document */

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    overflow: hidden; /* Prevents vertical scroll on the body */
}

a {
    text-decoration: none;
    color: inherit;
}


.app-wrapper {
    position: relative;
    /* CHANGE: Replaced 100dvh with 100% to fix Android navigation bugs */
    height: 100%; 
    width: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    overflow: hidden;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    
    background-image: url("/assets/images/Cerknica-iz-zraka.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* --- Header --- */
.app-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 25px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    z-index: 10;
    
}
.app-header2 {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 25px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    z-index: 10;
    
}


.header-icon {
    font-size: 1.8rem;
    color: #4C9AD2;
}

.header-icon img{
    width: 35px;
    height: auto;
}

.header-title {
    text-align: center;
    color: #4C9AD2;
    font-size: 20px;
}
.header-title span {
    display: block;
    font-weight: 400;
    font-size: 1rem;
}
.header-title strong {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.main-content {
    -webkit-box-flex: 1;
        -ms-flex-positive: 1;
            flex-grow: 1; 
    -ms-flex-negative: 1; 
        flex-shrink: 1; /* NEW: Allows the middle to compress slightly */
    min-height: 50px; /* NEW: Prevents it from collapsing entirely */
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center; 
    -webkit-box-align: center; 
        -ms-flex-align: center; 
            align-items: center;
    position: relative; 
    padding-bottom: 2vh; 
    -webkit-box-sizing: border-box; 
            box-sizing: border-box; 
}

.coat-of-arms {

    width: 100px;
    height: auto;
}

.header-title::after {
    content: " v2.9";
    color: rgba(255, 255, 255, 0.315);
    font-size: 14px;
    font-weight: bold;
}

.btn-vstopi {
    background: #4C9AD2;
    border: none;
    border-radius: 50px;
    padding: 7px 52px;
    margin-top: 30px; /* Replaced 10vh with a safe 30px */
    font-size: 16px;
    -webkit-box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.25);
            box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.25);
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.btn-vstopi:hover {
    -webkit-transform: translateY(-2px);
            transform: translateY(-2px);
    -webkit-box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.3);
            box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.3);
}

/* --- Bottom FLOATING CARD --- */
.card-slider-container {
    position: relative;
    width: 100%;
    z-index: 3;
    /* NEW: Protects cards from modern Android/iPhone bottom gesture bars */
    padding-bottom: calc(20px + env(safe-area-inset-bottom)); 
    -ms-flex-negative: 0; 
        flex-shrink: 0; 
}

.novica-naslov{
    font-size: 1rem;
    color: black;
    font-weight: 500;
}

.novica-text{
    font-size:11px;
}

.vreme-dan {
    font-size: 0.55rem;
}

.napoved-datum{
    font-size: 12px;
}

.weather-emoji {
  font-size: 2.5rem;   /* Makes the emoji nice and big */
  text-align: center;
  line-height: 1;      /* Prevents extra vertical space */
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.wind-compass {
  -webkit-transition: -webkit-transform 0.5s ease-out;
  transition: -webkit-transform 0.5s ease-out;
  transition: transform 0.5s ease-out;
  transition: transform 0.5s ease-out, -webkit-transform 0.5s ease-out;
}


.card-slider {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    /* 1. Use gap for spacing instead of margin on the cards */
    gap: 10px; /* Adjust the space between cards here */
    
    /* 2. Enable horizontal scrolling */
    overflow-x: auto;

    /* 3. This is the key for centering the first and last cards */
    /* It adds padding on the left/right so the cards have space to be centered. */
    /* The calculation is: (100% of viewport width - card width) / 2 */
    padding: 0 calc((100vw - 90vw) / 2);

    /* 4. Define the scroll snap behavior */
    -ms-scroll-snap-type: x mandatory;
        scroll-snap-type: x mandatory;
scroll-behavior: smooth; 
    /* Hide the scrollbar visually across browsers */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.card-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.slider-card {
    /* 5. Make cards smaller to see the ones on the side */
    -webkit-box-flex: 0;
        -ms-flex: 0 0 90vw;
            flex: 0 0 90vw; /* Card takes up 80% of the viewport width. Adjust as needed. */
    
    /* 6. This is the most important part: snap to the CENTER */
    scroll-snap-align: center;
    
    border-radius: 20px;
    border: none;
    -webkit-box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-height: 300px; 
    
    /* 7. Added for the "frosted glass" effect seen in the images */
    background-color: rgba(255, 255, 255, 0.85); /* Slightly more transparent */
    -webkit-backdrop-filter: blur(15px); /* iOS and Safari */
    backdrop-filter: blur(15px); /* Modern browsers */
}

.slider-card:last-child {
    margin-right: 0;
}

/* Stil za posamezno kartico - Vreme (primer) */
.card-weather .temperature {
    font-size: 2rem;
    font-weight: 300;
}
.card-weather .weather-icon {
    font-size: 3rem;
    color: #ffc107; /* Rumena za sonce */
}
.alert-warning {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex; /* Za lepši izgled z ikono */
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    padding: .4rem .8rem;
    border-radius: 50px;
}

.temperatura-napoved{
    font-size: 10px;
}

.card-slider.no-transition {
    scroll-behavior: auto; /* Disables smooth scroll for the instant jump */
}

.slika-novica{
    width: 70px;
    height: 70px;
    -o-object-fit: cover;
       object-fit: cover;
    border-radius: 10px;
}

.slika-novice{
    width: 94px;
    height: 94px;
    -o-object-fit: cover;
       object-fit: cover;
    border-radius: 10px;
}





.main-content-prijava {
    -webkit-box-flex: 1;
        -ms-flex-positive: 1;
            flex-grow: 1; /* This makes it fill the available space */
    position: relative; 
    background-image: url("/assets/images/ozadje.png");
    background-size: cover;
    background-position: top center;
}

.overlay{
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    background-color: #3983b7ab;
}

.prijava{
    position: relative;
    z-index: 2;
        color: #FFFFFF;
        padding: 4rem;
}

.prijava h1{
    font-size:4rem;
    font-weight: bold;
    margin: 0;
}

.prijava span {
    font-size: 24px;
}


.login-container {
    width: 100%;
    max-width: 350px; /* Adjust width as needed */
    text-align: center; /* Centers the header text */
    color: white;
}

.login-form{
    margin-top: 4rem;
}

/* The login form itself */
.login-form h3 {
    font-size: 1rem;
    font-weight: normal;
    text-align: left;
    margin-bottom: 10px;
    padding-left: 15px; /* Align with input text */
}

.form-group {
    margin-bottom: 15px;
}

/* Custom styling for input fields */
.form-control-custom {
    width: 100%;
    height: 37px;
    padding: 15px;
    background-color: rgba(245, 245, 245, 0.95);
    border: none;
    border-radius: 50px; /* This creates the pill shape */
    font-size: 1rem;
    color: #333;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
}

.form-control-custom::-webkit-input-placeholder {
    color: #6c757d;
    opacity: 1;
}

.form-control-custom::-moz-placeholder {
    color: #6c757d;
    opacity: 1;
}

.form-control-custom:-ms-input-placeholder {
    color: #6c757d;
    opacity: 1;
}

.form-control-custom::-ms-input-placeholder {
    color: #6c757d;
    opacity: 1;
}

.form-control-custom::placeholder {
    color: #6c757d;
    opacity: 1;
}

/* "Pozabljeno geslo" link */
.forgot-password {
    display: block;
    text-align: left;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 25px;
    padding-left: 15px; /* Align with input text */
}

.forgot-password:hover {
    text-decoration: underline;
}

/* "ali" separator */
.separator {
    margin: 25px 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* "Se registriraj" button */
.btn-register {
    width: 100%;
    
    height: 37px;
    background-color: rgba(245, 245, 245, 0.95);
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    color: #333;
    cursor: pointer;
    -webkit-transition: background-color 0.2s ease-in-out;
    transition: background-color 0.2s ease-in-out;
}

.btn-register:hover {
    background-color: white;
}



/* =========================================
   DESKTOP / TABLET MEDIA QUERIES
   (Screens larger than 1024px)
   ========================================= */

@media screen and (min-width: 1024px) {

    /* --- General Layout Adjustments --- */
    .app-wrapper {
        padding-top: 0; /* Slightly less padding needed on desktop headers */
    }

    .app-header {
        padding: 25px 50px; /* More padding on sides for wide screens */
    }
    
    .header-title {
        font-size: 24px; /* Larger title text */
    }

    /* --- Main Content & Coat of Arms --- */
    .coat-of-arms {
        /* Reset the negative margin used for mobile overlapping */
        margin-top: 2vh; 
        margin-bottom: 3vh;
        width: 140px; /* Larger logo on desktop */
    }

    .btn-vstopi {
        margin-top: 5vh;
        font-size: 18px;
        padding: 10px 70px; /* Bigger button */
    }

    /* --- Card Slider for Desktop --- */
    .card-slider-container {
        /* Lift it up slightly from the very bottom edge */
        bottom: 20px; 
        padding-bottom: 20px;
    }

    .card-slider {
        /* Reset the centering calculation used for mobile (90vw) */
        padding: 0 50px; 
        
        /* Show scrollbar on desktop if user prefers clicking drag, 
           or keep hidden if using trackpad/wheel */
        gap: 25px; /* Bigger gaps between cards */
        
        /* Optional: Center the cards if there are few of them */
        -webkit-box-pack: center;
            -ms-flex-pack: center;
                justify-content: center; 
    }

    .slider-card {
        /* 
           CHANGE: instead of 90vw (full width), 
           we make them fixed width or percentage to fit ~3 or 4 cards 
        */
        -webkit-box-flex: 0;
            -ms-flex: 0 0 350px; 
                flex: 0 0 350px; /* Fixed width cards look cleaner on desktop */
        
        /* Alternatively use percentage for responsive 3-column:
           flex: 0 0 30vw; 
        */

        min-height: 350px; /* Slightly taller */
    }

    .main-content {
    -webkit-box-flex: 1;
        -ms-flex-positive: 1;
            flex-grow: 1; /* This makes it fill the available space */
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: start;
        -ms-flex-pack: start;
            justify-content: flex-start;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    
    position: relative; 
    padding-bottom: 5vh; 
    background-image: url("/assets/images/slivnica.jpg");
    background-size: cover;
    background-position: top center;
}

    .main-content-prijava {
        /* Center content perfectly on desktop */
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: center;
            -ms-flex-pack: center;
                justify-content: center;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
    }

    .prijava {
        padding: 0;
        /* Organize Login into a Grid or Side-by-Side layout */
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
            -ms-flex-direction: row;
                flex-direction: row;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
        gap: 80px; /* Space between text and form */
        max-width: 1200px;
        margin: 0 auto;
    }

    .prijava h1 {
        font-size: 5rem;
        line-height: 1.1;
    }

    .login-form {
        margin-top: 0; /* Remove top margin since it's side-by-side now */
        background: rgba(255, 255, 255, 0.1); /* Subtle box behind form */
        -webkit-backdrop-filter: blur(10px);
                backdrop-filter: blur(10px);
        padding: 40px;
        border-radius: 20px;
        min-width: 400px;
    }
}