/* --- OSNOVNI STILOVI I VARIJABLE --- */
:root {
    --primary-color: #0078d4; /* Plava boja, inspirirano Windowsom */
    --background-color: #f0f2f5;
    --tile-bg-color: #ffffff;
    --text-color: #333333;
    --text-light: #ffffff;
    --border-color: #e0e0e0;
    --shadow-light: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 5px 15px rgba(0, 0, 0, 0.1);
    --gap: 1.25rem; /* Razmak između pločica */
}

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

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--gap);
}

/* --- ZAGLAVLJE I PODNOŽJE --- */
.site-header, .site-footer {
    background-color: var(--tile-bg-color);
    padding-top: 1rem;
    padding-bottom: 1rem;
    box-shadow: var(--shadow-light);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 80px;
    width: 210px;
    object-fit: cover;
}

.logo i {
    margin-right: 0.75rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    margin: 0 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* Dropdown Navigation */
.nav-item {
    position: relative;
    display: inline-block;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid #e0e0e0;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

.dropdown li {
    margin: 0;
}

.dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
}

.dropdown a:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-icon i {
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.2s ease;
}

.search-icon i:hover {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
}

.mobile-menu-toggle button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.mobile-menu-toggle button:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

.site-footer {
    background-color: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: calc(2 * var(--gap));
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-main {
    max-width: 400px;
}

.footer-logo {
    max-width: 150px;
    margin-bottom: 1rem;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.footer-title a {
    color: white;
    text-decoration: none;
}

.footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-list li {
    margin-bottom: 0.5rem;
}

.footer-list a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-list a:hover {
    color: white;
}

.footer-main p {
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #bdc3c7;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
}

.footer-copyright {
    font-size: 0.85rem;
    color: #95a5a6;
}

/* --- HOMEPAGE LAYOUT --- */
.featured-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.featured-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    position: relative;
    overflow: hidden;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.featured-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.featured-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.featured-button {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.featured-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.contact-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.contact-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.contact-arrow {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: transform 0.2s ease;
}

.contact-card:hover .contact-arrow {
    transform: translateX(4px);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.service-tile {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.service-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.service-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    flex: 1;
}

.service-arrow {
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: transform 0.2s ease;
}

.service-tile:hover .service-arrow {
    transform: translateX(4px);
}

.news-section {
    margin-bottom: 3rem;
}

.news-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Article Images */
.article-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-title {
    padding: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    line-height: 1.4;
}

.news-link {
    display: block;
    text-align: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.news-link:hover {
    color: #0056b3;
}

/* --- GLAVNA MREŽA PLOČICA --- */
main {
    padding-top: calc(2 * var(--gap));
}

.tile-grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* --- STIL POJEDINAČNE PLOČICE --- */
.tile {
    background-color: var(--tile-bg-color);
    padding: 1.5rem;
    border-radius: 6px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    min-height: 160px;
}

.tile[data-link] {
    cursor: pointer;
}

/* Remove link styling from ALL tiles that are links to make them look like buttons/cards */
a.tile {
    text-decoration: none;
    color: inherit;
}

a.tile:hover {
    text-decoration: none;
    color: inherit;
}

a.tile:visited {
    color: inherit;
}

a.tile:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.tile i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tile h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
    line-height: 1.3;
}

.tile__arrow {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-color);
    opacity: 0.5;
    transition: right 0.3s ease;
}

.tile:hover .tile__arrow {
    right: 1.25rem;
}

/* --- MODIFIKATORI ZA PLOČICE --- */

/* Velika horizontalna pločica (za vijesti) */
.tile--large-h {
    grid-column: span 2;
    grid-row: span 1;
}
.tile--large-h h3 {
    font-size: 1.5rem;
}
.tile--large-h p {
    font-size: 1rem;
    margin-top: 0.5rem;
    flex-grow: 1; /* Gura link na dno */
}
.tile--large-h .tile__link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    align-self: flex-start;
    margin-top: 1rem;
}

/* Primarna pločica (istaknuta) */
.tile--primary {
    background-color: var(--primary-color);
    color: var(--text-light);
}
.tile--primary i, 
.tile--primary .tile__arrow {
    color: var(--text-light);
}

/* --- RESPONZIVNOST --- */
@media (max-width: 992px) {
    .tile-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .tile--large-h {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none; /* Sakrij navigaciju na mobitelima, trebao bi burger menu */
    }
    .tile--large-h {
        grid-column: auto; /* Puna širina */
        grid-row: auto;
    }
}

/* --- STILOVI ZA UNUTARNJE STRANICE --- */
.page-content { padding-top: 2rem; padding-bottom: 2rem; }
.page-title { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 1rem; line-height: 1.2; }

/* --- Stilovi za članak --- */
.article-header .article-meta { color: #777; margin-bottom: 2rem; }
.article-meta span { margin-right: 1.5rem; }
.article-meta i { margin-right: 0.5rem; color: #aaa; }
.article-image { width: 100%; border-radius: 6px; margin-bottom: 2rem; }
.article-body p { font-size: 1.1rem; margin-bottom: 1.5rem; }
.article-body blockquote {
    border-left: 4px solid var(--primary-color);
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    background-color: #f9f9f9;
    font-style: italic;
    font-size: 1.2rem;
}

/* --- Stilovi za ostale novosti --- */
.related-news { margin-top: 4rem; }
.section-title { font-size: 1.8rem; border-bottom: 2px solid #eee; padding-bottom: 0.5rem; margin-bottom: 2rem; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }
.news-card { background: var(--tile-bg-color); border-radius: 6px; box-shadow: var(--shadow-light); overflow: hidden; transition: all 0.3s ease; }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.news-card img { width: 100%; height: 180px; object-fit: cover; }
.news-card h3 { font-size: 1.2rem; padding: 1rem 1.5rem 0.5rem; }
.news-card a { display: block; padding: 0 1.5rem 1.5rem; text-decoration: none; color: var(--primary-color); font-weight: 600; }

/* --- Stilovi za uvod na unutarnjim stranicama --- */
.page-intro {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #2c3e50;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin-bottom: 2rem;
    max-width: none;
}

.page-intro p {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.page-intro p:last-child {
    margin-bottom: 0;
}

.page-intro ul {
    margin: 1.5rem 0;
    padding-left: 0;
    list-style: none;
}

.page-intro li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: #2c3e50;
    line-height: 1.6;
}

.page-intro li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.page-intro a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.page-intro a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.page-intro h2 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.page-intro h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
}

.page-intro h4 {
    color: var(--primary-color);
    margin-top: 1.2rem;
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.page-intro strong {
    color: #2c3e50;
    font-weight: 600;
}

.page-intro em {
    color: #555;
    font-style: italic;
}

/* Stil za podtekst na pločici (npr. broj dokumenata) */
.tile__subtext {
    font-size: 0.9rem;
    color: #777;
    margin-top: 0.5rem;
}

/* Osigurava da se podtekst na primarnoj pločici također vidi */
.tile--primary .tile__subtext {
    color: rgba(255, 255, 255, 0.8);
}

/* --- Dodaci za dinamički prikaz --- */

/* Klasa za skrivanje elemenata */
.hidden {
    display: none !important;
}

/* Kontejner za prikaz sadržaja */
#content-view {
    /* Animacija pojavljivanja */
    animation: fadeIn 0.5s ease-in-out;
}

.content-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
}

.back-btn {
    background-color: transparent;
    border: 1px solid #ccc;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.back-btn:hover {
    background-color: #f0f0f0;
    border-color: #aaa;
}

#content-title {
    margin: 0;
    padding: 0;
    border: none;
}

/* Animacija za fade-in */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === NOVI, POBOLJŠANI STILOVI ZA LISTU DOKUMENATA === */

/* Uklanjamo stari, osnovni stil liste */
.document-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--border-color);
}

.document-list li {
    border-bottom: 1px solid var(--border-color);
}

/* Glavni kontejner za link - sada je Flexbox! */
.document-list a {
    display: flex;
    align-items: center;
    padding: 1.25rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    transition: background-color 0.2s ease-in-out;
}

.document-list a:hover {
    background-color: #f8f9fa; /* Suptilna pozadina na hover */
}

/* Kontejner za ikonu datoteke */
.document-list .doc-icon-container {
    font-size: 1.8rem;
    margin-right: 1.5rem;
    width: 40px; /* Fiksna širina za poravnanje */
    text-align: center;
}

/* Boje za različite tipove datoteka */
.document-list .fa-file-pdf { color: #e64b3c; }
.document-list .fa-file-word { color: #2a5699; }
.document-list .fa-file-excel { color: #1e7145; }

/* Glavni dio s naslovom i metapodacima */
.document-list .doc-info {
    flex-grow: 1; /* Ovo gura akciju preuzimanja na desni rub */
}

.document-list .doc-title {
    font-weight: 600;
    display: block; /* Osigurava da je naslov u svom redu */
    margin-bottom: 0.25rem;
}

.document-list .doc-meta {
    font-size: 0.9rem;
    color: #777;
}

/* Akcija za preuzimanje (ikona na desnoj strani) */
.document-list .doc-action {
    font-size: 1.2rem;
    color: #aaa;
    margin-left: 1rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

/* Efekt na hover - ikona postaje plava i malo se poveća */
.document-list a:hover .doc-action {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Uklanjamo stari stil za download-icon jer sada imamo .doc-action */
.document-list .download-icon {
    display: none;
}

/* --- Stilovi za sadržaj usluge (tekst) --- */
.service-content {
    max-width: 800px; /* Ograničava širinu teksta radi lakšeg čitanja */
    margin: 0 auto; /* Centriranje sadržaja */
    padding: 1rem 0;
}

.service-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #444;
}

.service-content h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.service-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.service-content li {
    margin-bottom: 0.5rem;
}

/* --- Stil za tražilicu na kontakt stranici --- */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 2rem auto 3rem auto; /* Centriranje i razmak */
}
.search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}
#office-search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem; /* Prostor za ikonu */
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 50px; /* Zaobljeni rubovi */
    transition: border-color 0.3s, box-shadow 0.3s;
}
#office-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.2);
}

/* Stil za prikaz info Središnje službe */
#main-content-display {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
    animation: fadeIn 0.5s ease-in-out;
}

/* === NOVI, POBOLJŠANI STILOVI ZA LISTU UREDA === */

/* Uklanjamo stari, jednodijelni link */
.office-list a {
    text-decoration: none;
    color: var(--text-color);
}

/* Glavni stil za stavku liste */
.office-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.office-list li:hover {
    background-color: #f8f9fa;
}

/* Kontejner za sadržaj (ikona + tekst) */
.office-item-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

/* Koristimo već postojeće stilove za .doc-icon-container, .doc-info, .doc-title, .doc-meta */
/* Ako je potrebno, možemo ih prilagoditi */
.doc-info .doc-meta {
    color: #555; /* Malo tamnija boja za bolju čitljivost */
}

/* Kontejner za akcijske gumbe */
.office-item-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Razmak između gumba */
    margin-left: 1rem;
}

/* Stil za pojedinačni akcijski gumb */
.action-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Okrugli gumbi */
    background-color: #f0f2f5;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

    height: 350px;
    width: 100%;
    object-fit: cover;
}

/* --- CUSTOM COMPONENTS --- */

/* Document title styling */
.document-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Error section styling */
.error-section {
    padding: 4rem 0;
    text-align: center;
    background-color: #f8f9fa;
}

.error-section h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-section p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}
/* Accordion */
.custom-accordion {
    margin: 0;
    padding: 0;
    list-style: none;
}

.custom-accordion > :nth-child(n+2) {
    margin-top: 0;
}

.custom-accordion-title {
    display: block;
    padding: 15px;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    border-radius: 6px;
    background-color: #ececec;
    margin-bottom: 0;
    transition: background-color 0.2s ease;
}

.custom-accordion-title::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 10px;
    border-left: 5px solid var(--primary-color);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    transition: transform 0.2s ease;
}

.custom-accordion-title.active::before {
    transform: rotate(90deg);
}

.custom-accordion-title:hover {
    background-color: #e0e0e0;
}

.custom-accordion-content {
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ececec;
    border-radius: 6px;
    margin-top: 0;
    display: none;
}

.custom-accordion-content.active {
    display: block;
}

.custom-accordion-content > :last-child {
    margin-bottom: 0;
}

/* Alert */
.custom-alert {
    padding: 0;
    margin: 0;
    border-radius: 0;
    border: none;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.custom-alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.custom-alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.custom-alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.custom-alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-content {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    gap: 0.75rem;
    position: relative;
}

.alert-icon {
    font-size: 1rem;
    opacity: 0.8;
    flex-shrink: 0;
}

.alert-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.alert-text strong {
    font-weight: 600;
    font-size: 0.9rem;
}

.alert-text span {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.3;
}

.alert-close {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.alert-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.alert-close:active {
    transform: translateY(-50%) scale(0.95);
}

/* Pagination */
.pagination-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.pagination li {
    margin: 0;
}

.pagination li a,
.pagination li span {
    display: block;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.pagination li a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination li.active span {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination li.disabled span {
    color: #999;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

/* Margin utilities */
.margin-medium {
    margin-bottom: 20px;
}

.margin-large {
    margin-bottom: 40px;
}

.margin-large-top {
    margin-top: 40px;
}

.margin-xlarge-top {
    margin-top: 60px;
}

/* Slider */
.custom-slider {
    position: relative;
    touch-action: pan-y;
}

.custom-slider-items {
    display: flex;
    transition: transform 0.3s ease;
}

.custom-slider-item {
    flex: 0 0 auto;
    width: 100%;
}

.position-relative {
    position: relative;
}

.visible-toggle {
    visibility: hidden;
}

.visible-toggle:hover {
    visibility: visible;
}

.light-text {
    color: #fff;
}

/* Service Content Layout */
.service-content {
    line-height: 1.7;
    color: #2c3e50;
    font-size: 1.05rem;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: none;
}

.service-content h2 {
    color: var(--primary-color);
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.service-content h3 {
    color: #34495e;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.service-content h4 {
    color: #34495e;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
}

.service-content p {
    margin-bottom: 1.5rem;
    text-align: left;
    color: #2c3e50;
    font-size: 1.05rem;
    line-height: 1.7;
    font-weight: 400;
}

.service-content ul, .service-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    color: #2c3e50;
}

.service-content li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    font-size: 1.05rem;
    position: relative;
}

.service-content ul li::marker {
    color: var(--primary-color);
    font-weight: bold;
}

.service-content ol li::marker {
    color: var(--primary-color);
    font-weight: bold;
}

.service-content strong {
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.01em;
}

.service-content em {
    font-style: italic;
    color: #7f8c8d;
    font-weight: 500;
}

.service-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    padding: 0 2px;
}

.service-content a:hover {
    border-bottom-color: var(--primary-color);
    background-color: rgba(0, 120, 212, 0.05);
    border-radius: 2px;
}

.service-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    color: #555;
    font-size: 1.1rem;
    line-height: 1.6;
}

.service-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.service-content th,
.service-content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.service-content th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-content td {
    font-size: 1rem;
    color: #2c3e50;
}

.service-content tr:nth-child(even) {
    background-color: #f8f9fa;
}

.service-content tr:hover {
    background-color: rgba(0, 120, 212, 0.05);
}

.service-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.service-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    margin: 3rem 0;
}

.service-content code {
    background-color: #f1f3f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    color: #d63384;
}

.service-content pre {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-color);
}

.service-content pre code {
    background: none;
    padding: 0;
    color: #2c3e50;
}

/* Content Header Styling */
.content-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.back-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn:hover {
    background: #005a9e;
    transform: translateY(-1px);
}

.back-btn i {
    transition: transform 0.2s ease;
}

.back-btn:hover i {
    transform: translateX(-2px);
}


/* Crest image styling */
.crest-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 10px;
}

/* Alert close button */
.alert-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    float: right;
    color: inherit;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

/* Gallery Styles */
.gallery-container {
    margin: 2rem 0;
}

.gallery-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Single image gallery - smaller display */
.gallery-grid.single-image {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 1rem auto;
}

.gallery-grid.single-image .gallery-item {
    aspect-ratio: 16/9;
    max-height: 400px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 1;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 2rem;
}

/* Gallery Modal */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.gallery-modal.active {
    display: flex;
}

.gallery-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.gallery-modal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.gallery-modal-close:hover {
    color: var(--primary-color);
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 90%;
    max-height: 80%;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #666;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.mobile-menu-close:hover {
    background-color: #f0f0f0;
}

.mobile-menu-title {
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
}

.mobile-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item {
    margin-bottom: 0.5rem;
}

.mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 600;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.mobile-nav-toggle:hover {
    background-color: var(--primary-color);
    color: white;
}

.mobile-nav-toggle i {
    transition: transform 0.2s ease;
}

.mobile-nav-item.active .mobile-nav-toggle i {
    transform: rotate(180deg);
}

.mobile-subnav {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.mobile-nav-item.active .mobile-subnav {
    max-height: 500px;
}

.mobile-subnav li {
    margin: 0;
}

.mobile-subnav a {
    display: block;
    padding: 0.75rem 2rem;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.mobile-subnav a:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.mobile-nav > li:not(.mobile-nav-item) {
    margin-bottom: 0.5rem;
}

.mobile-nav > li:not(.mobile-nav-item) a {
    display: block;
    padding: 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.mobile-nav > li:not(.mobile-nav-item) a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 90%;
    max-height: 80%;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 600px;
}

.search-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #666;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.search-modal-close:hover {
    background-color: #f0f0f0;
}

.search-title {
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
}

.search-form {
    margin-bottom: 2rem;
}

.search-input-group {
    position: relative;
    margin-bottom: 1rem;
}

.search-input-group .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-submit-btn:hover {
    background-color: #0056b3;
}

.suggestions-title {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.suggestion-item {
    margin-bottom: 0.5rem;
}

.suggestion-card {
    padding: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.suggestion-card:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.suggestion-text {
    margin: 0;
    font-weight: 600;
    color: var(--text-color);
    transition: color 0.2s ease;
}

.suggestion-card:hover .suggestion-text {
    color: white;
}

/* Map Section */
.map-section {
    background-color: #f8f9fa;
    padding: 4rem 0;
    margin-top: 3rem;
}

.map-header {
    text-align: center;
    margin-bottom: 3rem;
}

.map-header .section-title {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.map-description {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

.map-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.map-container:hover {
    box-shadow: var(--shadow-hover);
}

.map-container iframe {
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.map-container:hover iframe {
    transform: scale(1.02);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .tile-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tile--large-h {
        grid-column: 1;
    }
    
    .tile--large-v {
        grid-row: span 1;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .site-header .main-nav {
        display: none;
    }
    
    .site-header .search-icon {
        margin-left: auto;
    }
    
    .service-content h2 {
        font-size: 1.5rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }
    
    .service-content h3 {
        font-size: 1.25rem;
        margin-top: 1.5rem;
    }
    
    .service-content h4 {
        font-size: 1.1rem;
        margin-top: 1.25rem;
    }
    
    /* Map section responsive */
    .map-section {
        padding: 2rem 0;
        margin-top: 2rem;
    }
    
    .map-header .section-title {
        font-size: 1.5rem;
    }
    
    .map-description {
        font-size: 1rem;
    }
    
    .map-container iframe {
        height: 300px;
    }
    
    /* Footer responsive */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-main {
        max-width: none;
        text-align: center;
    }
    
    .footer-column {
        text-align: center;
    }
    
    /* Mobile header adjustments */
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    /* Alert responsive */
    .alert-content {
        padding: 0.5rem 0;
        gap: 0.5rem;
    }
    
    .alert-text strong {
        font-size: 0.8rem;
    }
    
    .alert-text span {
        font-size: 0.75rem;
    }
    
    .alert-close {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    /* Pagination responsive */
    .pagination {
        gap: 0.25rem;
        flex-wrap: wrap;
    }
    
    .pagination li a,
    .pagination li span {
        padding: 0.4rem 0.5rem;
        min-width: 35px;
        font-size: 0.9rem;
    }
    
    /* Homepage responsive */
    .featured-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .featured-card {
        padding: 1.5rem;
    }
    
    .featured-title {
        font-size: 1.5rem;
    }
    
    .featured-description {
        font-size: 0.9rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-tile {
        padding: 1rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .news-title {
        font-size: 1.5rem;
    }
    
    /* Article Images responsive */
    .article-image {
        height: 250px;
        margin: 1rem 0;
    }
    
    .news-card img {
        height: 150px;
    }
    
    .service-content p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.25rem;
    }
    
    .service-content ul, .service-content ol {
        padding-left: 1.5rem;
        margin-bottom: 1.25rem;
    }
    
    .service-content li {
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }
    
    .service-content table {
        font-size: 0.9rem;
        margin: 1.5rem 0;
    }
    
    .service-content th,
    .service-content td {
        padding: 0.75rem 0.5rem;
    }
    
    .service-content blockquote {
        padding: 1rem;
        margin: 1.5rem 0;
        font-size: 1rem;
    }
    
    .service-content img {
        margin: 1.5rem 0;
    }
}