@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr); 
        gap: 5px;
    }

    .grid-item {
        min-width: 130px;
        min-height: 130px; 
    }

    .person-image {
        max-width: 100px; 
        max-height: 100px;
    }
    #osobaForm {
        max-height: 70vh;
    }
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr; 
        gap: 5px;
    }

    .grid-item {
        min-width: 100%; 
        min-height: 200px; 
    }

    .person-image {
        max-width: 80px;  
        max-height: 80px;
    }
}
#imendanForm{
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 20px auto; 
    display: none;
}

#osobaForm {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 20px auto;
    display: none;
    overflow-y: auto;  
    max-height: 80vh;  
    padding-right: 10px;
}

#datumSelect, #nameInput, #styleSelect,
#ime, #prezime, #fotografija,
#obiteljskoPrezime, #fotografijaSupruznik,
#imendan, #rodendan, #vjencanje, #smrt {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

button {
    background-color: #8e8e8e; 
    color: white;
    font-size: 16px;
    padding: 12px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    width: 100%;
    margin-bottom: 10px;
}

@media screen and (max-width: 480px) {
    #datumSelect, #nameInput, #styleSelect {
        font-size: 14px;
    }

    #imendanForm {
        padding: 20px;
    }
    #osobaForm {
        max-height: 60vh; 
    }
}

html, body {
    height: 100%;
    margin: 0;
    display: flex;
    justify-content: center;  
    align-items: center;      
}

.icon-container {
    position: absolute;
    top: 10px; 
    right: 10px; 
    z-index: 10;
}

.container {
    border: 10px solid lightblue;
    background: white;
    width: 100%; 
    height: 100%;
    align-items: center;
}
.header-container {
    display: flex;
    width: 100%;
    border-bottom: 1px solid black;
}
.header {
    background: darkblue;
    color: white;
    font-size: 24px;
    font-weight: bold;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25%;
}
.day-month-container {
    flex: 1;
    text-align: center;
    background: white;
    border-left: 1px solid black;
}
.day-month {
    background: lightgray;
    border-bottom: 1px solid black;
    padding: 5px;
    font-weight: bold;
    color: darkblue;
}
.month {
    margin-top: 2px;
    font-size: 14px;
    font-weight: bold;
}
.name-day {
    background: lightgray;
    padding: 10px;
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 10px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 10px;
}
.grid-item {
    border: 2px solid gray;
    padding: 10px;
    text-align: center;
    background: white;
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    width: 100%; 
}
.person-image {
    max-width: 140px; 
    max-height: 140px;
    object-fit: cover; 
}

.person-name {
    margin-top: 10px;
    font-weight: bold;
    font-size: 14px;
    color: #333;
}
input[type="date"] {
    width: 95%;
    padding: 10px;
    font-size: 16px;
    margin-top: 5px;
    border: 2px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-sizing: border-box;
    transition: border-color 0.3s;
    margin: 5px;
}
input[type="date"]:focus {
    border-color: #6c5ce7;
    outline: none;
    background-color: #fff;
}
label{
    margin: 10px;
}
.green-border { border: 5px solid green; }
.red-border { border: 5px solid red; }
.blue-border { border: 5px solid blue; }
.black-border { border: 5px solid black; }
.transparent-black-background {
    background: rgba(0, 0, 0, 0.3); 
}