* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html{
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

h1,h2,h3,h4,h5,h6{
    font-family: Montserrat, sans-serif;
}

h1{
    font-size: 4rem;
    color: #1a2855;
}
h2{
    font-size: 3rem;
    color: #1a2855;
}
h3{
    font-size: 2rem;
    color: #1a2855;
}
h4{
    font-size: 1.5rem;
    color: #1a2855;
}
h5{
    font-size: 1rem;
    color: #1a2855;
}
h6{
    font-size: 0.8rem;
    color: #1a2855;
}


p{
    font-family: Montserrat Alternates, sans-serif;
    font-size: 1rem;
}

header {
    background-image:
        linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.5) 100%),
        url("img/naslovna.jpg");
    height: 100vh;
    width: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

nav{
    padding-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 100;
}

.hamburger {
    display: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
}

.nav-menu li {
    padding: 0;
    border: none;
}

nav a{
    text-decoration: none;
    color: white;
    font-size: 24px;
    padding-left: 3rem;
    padding-right: 3rem;
    font-family: Montserrat, sans-serif;
    animation: fadeIn 1s ease-in-out;
    display: inline-block;
    position: relative;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
    }
}

header button:hover{
    transform: translateY(0) scale(1.05);
}

nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: white;
    transition: transform 0.25s ease-out;
    transform-origin: bottom center;
}

nav a:hover::after {
    transform: scaleX(1);
}

nav a::after {
  transform-origin: bottom center;
}

nav a:hover::after {
  transform-origin: bottom center;
}

nav a:hover{
    transition: 0.3s ease;
    transform: scale(1.05);
}

header p{
    color: white;
    font-family: Montserrat Alternates, sans-serif;
    font-weight: 400;
    text-align: center;
    max-width: 600px;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease-in-out;
    animation-delay: 0.5s;
    opacity: 0;
    animation-fill-mode: forwards;
}

header button{
    padding: 1rem 2rem;
    background-color: white;
    border: none;
    border-radius: 2rem;
    font-family: Montserrat Alternates, sans-serif;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease-in-out;
    animation-delay: 1s;
    opacity: 0;
    animation-fill-mode: forwards;
    transition: transform 0.3s ease;
    transform: translateY(0);
}

header button:hover{
    transform: scale(1.05);
}


/* VIJESTI -------------------------------------------------------------------------------------------------- */
.vijesti-section {
  background-color: white;
  padding: 4rem 3rem;
}

.container {
  margin: 0 auto;
}

.vijesti-section h1 {
  font-family: Montserrat, serif;
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 300;
}

.vijesti-section hr {
  border: none;
  border-top: 1px solid #333;
  margin-bottom: 3rem;
}

.vijesti-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* Featured article (left side) */
.featured-article {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.featured-article img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.featured-content {
  background-color: #1a2855;
  color: white;
  padding: 2rem;
  flex-grow: 1;
}

.featured-content h2, .featured-content h4{
    color: white;
}

.featured-content button {
    padding: 1rem 2rem;
    margin-top: 1.5rem;
    background-color: white;
    border: none;
    border-radius: 2rem;
    font-family: Montserrat Alternates, sans-serif;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 2rem;
}

.featured-content button:hover{
    transform: scale(1.05);
}

.featured-content h2 {
  font-family: Montserrat, serif;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  font-weight: 300;
  line-height: 1.3;
}

.featured-content h4{
    font-family: Montserrat, sans-serif;
    font-weight: 400;
    margin-bottom: 3rem;
    font-size: 1rem;
}

.featured-content p {
  font-size: 1rem;
  line-height: 1.6;
}

/* Article list (right side) */
.article-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.article-item {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 2rem;
  align-items: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid #ddd;
}

.article-item:last-child {
  border-bottom: none;
}

.article-text h3 {
  font-family: Montserrat, serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 300;
}

.article-text p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
}

.article-text button{
    padding: 1rem 2rem;
    background-color: #1a2855;
    color: white;
    border: none;
    border-radius: 2rem;
    font-family: Montserrat Alternates, sans-serif;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.article-text button:hover{
    transform: scale(1.05);
}

.article-item img {
  width: 200px;
  height: 150px;
  object-fit: cover;
}

/* Aktualno -------------------------------------------------------------------------------------------------- */

.aktualno-section {
    padding: 3rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.aktualno-section h1 {
    font-family: Montserrat, serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.aktualno-section hr {
    border: none;
    border-top: 1px solid #333;
    margin-bottom: 3rem;
}

.row {
    display: flex;
    background-color: #1a2855;
    color: white;
    height: 500px;
}

.row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
}

.row-text, .row-img{
    flex: 0 0 50%;
}

.row-text {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.row-text h3 {
    color: white;
    margin-bottom: 1rem;
}

.row-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.aktualno-section button {
    padding: 1rem 2rem;
    background-color: white;
    border: none;
    border-radius: 2rem;
    font-family: Montserrat Alternates, sans-serif;
    font-weight: 500;
    cursor: pointer;
    margin-top: 1rem;
    transition: 0.3s ease;
}

.aktualno-section button:hover {
    transform: scale(1.05);
}


/* Natjecaji -------------------------------------------------------------------------------------------------- */

.natjecaji {
    padding: 3rem;
    margin-top: 5rem;
    margin-bottom: 3rem;
}

.natjecaji h1 {
    font-family: Montserrat, serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.natjecaji hr {
    border: none;
    border-top: 1px solid #333;
    margin-bottom: 3rem;
}

.natjecaji-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.natjecaji-section {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    border: 1px solid #1a2855;
    min-height: 150px;
}

.natjecaji-header {
    background-color: #1a2855;
    color: white;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #1a2855;
}

.natjecaji-header h3 {
    color: white;
    font-size: 1.3rem;
    margin: 0;
    text-align: center;
}

.natjecaji-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1.5rem;
}

.natjecaji-item {
    margin: 0;
}

.natjecaji-item h5 {
    margin: 0 0 0.3rem 0;
    font-size: 0.95rem;
    font-weight: 500;
}

.natjecaji-item p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.natjecaji-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.natjecaji-content ul li {
    padding-bottom: 1.5rem;
    margin: 0;
    font-size: 0.95rem;
    color: #333;
}

.natjecaji-button {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #1a2855;
}

.natjecaji-button button {
    padding: 1rem 2rem;
    background-color: #1a2855;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-family: Montserrat Alternates, sans-serif;
    font-weight: 500;
    cursor: pointer;
}

.natjecaji-button button:hover {
    transform: scale(1.05);
}


 /* GRID-------------------------------------------------------------------------------------- */

.fotogalerija{
    padding: 3rem;
    margin-top: 5rem;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: auto;
    gap: 20px;
    padding: 2rem 3rem 5rem 3rem;
    width: 100%;
    box-sizing: border-box;
}

.grid-item {
    position: relative;
    overflow: visible;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.grid-item img:hover {
    filter: grayscale(0);
    transform: scale(1.2);
    position: relative;
    z-index: 10;
}

/* TOP ROW */
.item-1 {
    grid-column: span 2;
    grid-row: span 2;
    height: 300px;
}

.item-2 {
    grid-column: span 2;
    grid-row: span 2;
    height: 300px;
}

.item-3 {
    grid-column: span 2;
    grid-row: span 2;
    height: 300px;
}

/* MIDDLE ROW */
.item-4 {
    grid-column: span 2;
    grid-row: span 2;
    height: 300px;
}

.item-5 {
    grid-column: span 2;
    grid-row: span 2;
    height: 300px;
}

.item-6 {
    grid-column: span 2;
    grid-row: span 2;
    height: 300px;
}

/* BOTTOM ROW */
.item-7 {
    grid-column: span 2;
    grid-row: span 2;
    height: 300px;
}

.item-8 {
    grid-column: span 2;
    grid-row: span 2;
    height: 300px;
}

.item-9 {
    grid-column: span 2;
    grid-row: span 2;
    height: 300px;
}

/* AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA */

.poveznice{
    margin-left: 3rem;
    margin-right: 3rem;
    margin-top: 5rem;
    margin-bottom: 7rem;
}

.poveznice-tekst{
    display: flex;
    align-items: center;
}

.poveznice-lijevo{
    flex: 0 0 50%;
    padding-top: 2rem;
}

.poveznice-lijevo p{
    line-height: 1.6;
    width: 90%;
}

.poeznice-desno{
    flex: 0 0 50%;
}

.poveznice-desno img{
    width: 100px;
    height: 100px;
    margin-left: 3rem;
    margin-top: 2rem;
}

/* FOOOTER -------------------------------------------------------------------------------------------------- */

footer {
    background-color: #1a2855;
    color: white;
    padding-top: 3rem;
    padding-bottom: 2rem;
    margin-top: 4rem;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 3rem;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h4 {
    font-family: Montserrat, serif;
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: white;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    font-family: Montserrat Alternates, sans-serif;
    font-size: 0.95rem;
    transition: 0.3s ease;
    padding: 0;
}

.footer-section a:hover {
    color: white;
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-block;
}

.social-links img {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
    transition: 0.3s ease;
}

.social-links a:hover img {
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: #aaa;
    font-size: 0.9rem;
    font-family: Montserrat Alternates, sans-serif;
}

#myBtn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 30px;
  z-index: 99;
  font-size: 18px;
  border: none;
  outline: none;
  background-color: #1a2855;
  color: white;
  cursor: pointer;
  padding: 15px;
  border-radius: 15px;
    animation: fadeIn 0.5s ease-in-out;
}

#myBtn:hover {
  background-color: white;
    color: #1a2855;
    border: 1px solid #1a2855;
}



/* TABLET (768px to 1024px) */
@media (max-width: 1024px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.2rem; }
    h3 { font-size: 1.5rem; }

    nav a {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        font-size: 18px;
    }

    header p {
        max-width: 500px;
        font-size: 0.95rem;
    }

    .vijesti-section {
        padding: 3rem 2rem;
    }

    .vijesti-grid {
        gap: 1.5rem;
    }

    .article-item {
        grid-template-columns: 1fr 150px;
        gap: 1.5rem;
    }

    .article-item img {
        width: 150px;
        height: 120px;
    }

    .aktualno-section {
        padding: 2rem;
    }

    .row {
        height: 400px;
    }

    .row-text {
        padding: 2.5rem;
    }

    .natjecaji {
        padding: 2rem;
    }

    .natjecaji-section {
        grid-template-columns: 150px 1fr auto;
    }

    .natjecaji-header {
        padding: 1.5rem;
    }

    .natjecaji-content {
        padding: 1.5rem;
    }

    .grid-container {
        padding: 1.5rem 2rem 3rem 2rem;
        gap: 15px;
    }

    .item-1, .item-2, .item-3, .item-4, .item-5, .item-6, .item-7, .item-8, .item-9 {
        height: 250px;
    }

    .footer-container {
        padding: 0 2rem;
        gap: 20px;
    }

    .footer-section {
        min-width: 150px;
    }

    .izvori-desno img {
        width: 80px;
        height: 80px;
        margin-left: 1.5rem;
    }
}

/* MOBILE (up to 768px) */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.3rem; }
    h4 { font-size: 1.1rem; }
    h5 { font-size: 0.9rem; }
    
    header{
    background-image:
        linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.5) 100%),
        url("img/naslovna3.jpg");
    height: 60vh;
    width: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    }

    p { font-size: 0.9rem; }

    nav {
        padding-top: 1rem;
    }

    nav a {
        padding-left: 1rem;
        padding-right: 1rem;
        font-size: 14px;
    }

    header p {
        max-width: 90%;
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }

    header button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .vijesti-section {
        padding: 2rem 1.5rem;
    }

    .vijesti-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .featured-article img {
        height: 200px;
    }

    .featured-content {
        padding: 1.5rem;
    }

    .featured-content h2 {
        font-size: 1.4rem;
    }

    .article-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding-bottom: 1.5rem;
    }

    .article-item img {
        width: 100%;
        height: 150px;
    }

    .aktualno-section {
        padding: 1.5rem;
    }

    .aktualno-section h1 {
        font-size: 2rem;
    }

    .row {
        flex-direction: column;
        height: auto;
    }

    .row img {
        width: 100%;
        height: 200px;
    }

    .row-text {
        flex: 0 0 auto;
        padding: 2rem 1.5rem;
    }

    .row-text h3 {
        font-size: 1.3rem;
    }

    .natjecaji {
        padding: 1.5rem;
    }

    .natjecaji h1 {
        font-size: 2rem;
    }

    .natjecaji-section {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .natjecaji-header {
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid #1a2855;
    }

    .natjecaji-header h3 {
        font-size: 1.1rem;
    }

    .natjecaji-content {
        padding: 1.5rem;
        gap: 1rem;
    }

    .natjecaji-item h5 {
        font-size: 0.85rem;
    }

    .natjecaji-item p {
        font-size: 0.75rem;
    }

    .natjecaji-button {
        padding: 1.5rem;
        border-left: none;
        border-top: 1px solid #1a2855;
    }

    .natjecaji-button button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .fotogalerija {
        padding: 1.5rem;
    }

    .fotogalerija h1 {
        font-size: 2rem;
    }

    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        padding: 1rem 1rem 2rem 1rem;
        gap: 10px;
    }

    .item-1, .item-2, .item-3, .item-4, .item-5, .item-6, .item-7, .item-8, .item-9 {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
        height: 150px;
    }

    .grid-item img:hover {
        transform: scale(1.05);
    }

    .povijest {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
        margin-top: 3rem;
        margin-bottom: 3rem;
    }

    .zgodovine h1 {
        font-size: 2rem;
    }

    .zgodovine-tekst {
        flex-direction: column;
    }

    .povijesti-lijevo {
        flex: 0 0 auto;
        padding-top: 0;
        margin-bottom: 2rem;
    }

    .povijesti-lijevo p {
        width: 100%;
        font-size: 0.85rem;
    }

    .povijest-desno {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .povijest-desno img {
        width: 60px;
        height: 60px;
        margin-left: 0;
        margin-top: 0;
    }

    footer {
        padding-top: 2rem;
        padding-bottom: 1rem;
    }

    .footer-container {
        flex-direction: column;
        padding: 0 1.5rem;
        gap: 2rem;
    }

    .footer-section {
        min-width: auto;
    }

    .footer-section h4 {
        font-size: 1.1rem;
    }

    .footer-section a {
        font-size: 0.85rem;
    }

    .social-links {
        gap: 10px;
    }

    .social-links img {
        width: 30px;
        height: 30px;
    }

    .footer-bottom {
        font-size: 0.8rem;
    }

    #myBtn {
        bottom: 15px;
        right: 15px;
        padding: 12px;
        font-size: 16px;
    }
}

/* SMALL MOBILE (up to 480px) */
@media (max-width: 768px) {

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.1rem; }

    nav a{
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        font-size: 1rem;
    }

    .vijesti-section {
        padding: 1.5rem 1rem;
    }

    .aktualno-section {
        padding: 1rem;
    }

    .row-text {
        padding: 1.5rem 1rem;
    }

    .natjecaji {
        padding: 1rem;
    }

    .grid-container {
        grid-template-columns: 1fr;
        padding: 0.75rem;
    }

    .item-1, .item-2, .item-3, .item-4, .item-5, .item-6, .item-7, .item-8, .item-9 {
        height: 120px;
    }

    .povezave {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .footer-container {
        padding: 0 1rem;
    }
}
