/*
Theme Name: Agencija GDS
Theme URI: https://agencijagds.rs/
Author: IPantic
Author URI: https://ipantic.com/
Description: Blok tema za Agenciju GDS (BZR, ZOP, vanredne situacije). Sve stranice se uređuju u Gutenberg editoru, a zaglavlje, podnožje i šabloni u Site Editoru.
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.0.7
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gds
*/

/* ---------- Osnova ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
img { height: auto; }
::selection { background: var(--wp--preset--color--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; }

/* ---------- Gornja traka i zaglavlje ---------- */
.gds-topbar a { color: inherit; text-decoration: none; }
.gds-topbar a:hover { color: #fff; }
.gds-ico { position: relative; padding-left: 26px; }
.gds-ico::before { position: absolute; left: 0; top: .3em;
	flex: none; content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--gds-ico) no-repeat center / contain; mask: var(--gds-ico) no-repeat center / contain; }
.gds-topbar .gds-ico { display: inline-flex; gap: 8px; align-items: center; padding-left: 0; }
.gds-topbar .gds-ico::before { position: static; }
.gds-ico-phone { --gds-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E"); }
.gds-ico-mail { --gds-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 6L2 7'/%3E%3C/svg%3E"); }
.gds-ico-pin { --gds-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
.gds-ico-clock { --gds-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E"); }
@media (max-width: 781px) { .gds-topbar .gds-hide-mobile { display: none !important; } }

.gds-header .wp-block-site-logo img { max-height: 64px; width: auto; }
.gds-header .wp-block-site-logo + .wp-block-group { display: none; } /* logo već sadrži naziv */
@media (max-width: 600px) { .gds-header .wp-block-site-logo img { max-height: 48px; } }
.gds-header .wp-block-navigation .wp-block-navigation-item__content { padding-block: 6px; border-bottom: 2px solid transparent; }
.gds-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.gds-header .wp-block-navigation .wp-block-navigation-item__content:hover { border-bottom-color: var(--wp--preset--color--accent); }
.gds-header .wp-block-navigation .wp-block-navigation__submenu-container { border: 1px solid var(--wp--preset--color--line) !important; border-radius: 8px; box-shadow: 0 16px 40px rgba(14, 26, 43, .12); padding: 8px 0; min-width: 300px !important; }
.gds-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 10px 18px; border-bottom: 0; }
.gds-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--sand); color: var(--wp--preset--color--accent); }
.gds-header .gds-nav-cta .wp-block-button__link { padding: 11px 20px; }

/* ---------- Sekcije i kartice ---------- */
.gds-eyebrow { letter-spacing: 1.5px; text-transform: uppercase; }
.gds-grid-bg { background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 48px 48px; }
.is-style-gds-card { transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.is-style-gds-card:hover { border-color: #D3CFC6 !important; box-shadow: 0 18px 40px rgba(14, 26, 43, .08); transform: translateY(-2px); }
.gds-card-link { display: flex; flex-direction: column; height: 100%; }
.gds-card-link > .wp-block-buttons, .gds-card-link > .gds-more { margin-top: auto !important; }
.gds-more a, a.gds-more { font-weight: 600; text-decoration: none; }
.gds-more a::after, a.gds-more::after { content: " →"; }
.gds-list-check { list-style: none; padding-left: 0; }
.gds-list-check li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.gds-list-check li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px; background: var(--wp--preset--color--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / contain; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / contain; }
.gds-dark-links a { display: flex; justify-content: space-between; align-items: center; gap: 16px; text-decoration: none; color: #fff; }
.gds-dark-links a::after { content: "→"; }
.gds-dark-links .wp-block-group:hover { background: rgba(255,255,255,.14) !important; }

/* Bočna kolona na stranicama usluga */
@media (min-width: 782px) { .gds-sticky { position: sticky; top: 32px; } }
.gds-service-nav a { display: block; padding: 10px 0; border-bottom: 1px solid var(--wp--preset--color--line); text-decoration: none; color: var(--wp--preset--color--ink); font-weight: 500; }
.gds-service-nav a:hover { color: var(--wp--preset--color--accent); }
.gds-service-nav li { list-style: none; }
.gds-service-nav ul { padding: 0; margin: 0; }

/* Sadržaj stranica usluga */
.gds-prose h2 { margin-top: 2.2em; }
.gds-prose h2:first-child { margin-top: 0; }
.gds-prose ul li { margin-bottom: 6px; }
.gds-prose .wp-block-image img { border-radius: 12px; }

/* Reference */
.gds-logos .wp-block-image { display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 10px; padding: 18px; aspect-ratio: 3 / 2; margin: 0; }
.gds-logos .wp-block-image img { max-height: 70px; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .2s, opacity .2s; }
.gds-logos .wp-block-image:hover img { filter: none; opacity: 1; }

/* Novosti (query loop) */
.gds-posts .wp-block-post { display: flex; }
.gds-posts .wp-block-post > .wp-block-group { width: 100%; }
.gds-posts .wp-block-post-featured-image img { border-radius: 8px; aspect-ratio: 3 / 2; object-fit: cover; }
.gds-posts .wp-block-post-title a { text-decoration: none; color: inherit; }
.gds-posts .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }

/* Footer */
.gds-footer a { color: inherit; text-decoration: none; }
.gds-footer a:hover { color: #fff; text-decoration: underline; }
.gds-footer .wp-block-latest-posts { padding: 0; }
.gds-footer .wp-block-latest-posts li { margin-bottom: 10px; }

/* Kontakt forma */
.gds-form { display: grid; gap: 16px; }
.gds-form .gds-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.gds-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--wp--preset--color--navy); }
.gds-form input, .gds-form textarea { width: 100%; box-sizing: border-box; padding: 13px 14px; border: 1px solid #CFCAC0; border-radius: 6px; font: inherit; color: inherit; background: #fff; }
.gds-form input:focus, .gds-form textarea:focus { border-color: var(--wp--preset--color--navy); outline: 2px solid rgba(14, 26, 43, .15); }
.gds-form textarea { min-height: 150px; resize: vertical; }
.gds-form .gds-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gds-form button { justify-self: start; cursor: pointer; border: 0; background: var(--wp--preset--color--accent); color: #fff; font: inherit; font-weight: 600; padding: 15px 28px; border-radius: 6px; }
.gds-form button:hover { background: var(--wp--preset--color--accent-dark); }
.gds-form-msg { padding: 14px 16px; border-radius: 6px; font-weight: 500; }
.gds-form-msg.is-ok { background: #E8F4EC; color: #1D5B33; }
.gds-form-msg.is-err { background: #FBEAEA; color: #8A1F24; }

/* Mapa */
.gds-map iframe { width: 100%; height: 380px; border: 0; border-radius: 12px; display: block; }

/* Sekcije pune širine se nastavljaju jedna na drugu bez razmaka */
.wp-site-blocks > main, .wp-site-blocks > footer, .wp-site-blocks > header + * { margin-block-start: 0; }
.wp-block-post-content > .alignfull { margin-block-start: 0; margin-block-end: 0; }
.wp-block-post-content > .alignfull + * { margin-block-start: 0; }
main > .wp-block-template-part, main > .wp-block-group.alignfull { margin-block-start: 0; }
.gds-card-link h3 a { color: inherit; text-decoration: none; }
.gds-card-link h3 a:hover { color: var(--wp--preset--color--accent); }
@media (max-width: 600px) {
	.gds-header > .alignwide { flex-wrap: nowrap !important; }
	.gds-header .wp-block-site-title + p { display: none; }
	.gds-header .gds-nav-cta .wp-block-button__link { padding: 9px 14px; }
}
.gds-stat p:last-child { white-space: nowrap; }
@media (max-width: 1100px) {
	.gds-stat p:last-child { white-space: normal; }
	.wp-block-group.gds-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 560px) { .wp-block-group.gds-stats { grid-template-columns: minmax(0, 1fr) !important; } }

/* ---------- CTA sa staklenim panelom ---------- */
.gds-cta { position: relative; overflow: hidden; isolation: isolate;
	background: radial-gradient(60% 90% at 12% 10%, rgba(255,255,255,.14), transparent 60%),
		radial-gradient(50% 80% at 92% 100%, rgba(14,26,43,.55), transparent 65%),
		linear-gradient(135deg, var(--wp--preset--color--accent) 0%, #B42C32 50%, var(--wp--preset--color--accent-dark) 100%) !important; }
.gds-cta::before, .gds-cta::after { content: ""; position: absolute; border-radius: 50%; filter: blur(8px); z-index: -1; pointer-events: none; }
.gds-cta::before { width: 420px; height: 420px; right: 6%; top: -180px; background: radial-gradient(circle, rgba(255,255,255,.35), rgba(255,255,255,0) 70%); }
.gds-cta::after { width: 520px; height: 520px; left: -160px; bottom: -300px; background: radial-gradient(circle, rgba(14,26,43,.6), rgba(14,26,43,0) 70%); }
.gds-glass { background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.03)); border: 1px solid rgba(255,255,255,.28);
	box-shadow: 0 30px 60px rgba(70, 8, 12, .28), inset 0 1px 0 rgba(255,255,255,.35);
	-webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }
.gds-pill { display: inline-block; padding: 6px 14px; border-radius: 999px; letter-spacing: 1px; text-transform: uppercase;
	background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); }
.gds-cta-title { letter-spacing: -0.8px; }
@media (min-width: 1100px) { .gds-cta-title { white-space: nowrap; } }
.gds-cta .wp-block-button__link { padding: 16px 28px; transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease; }
.gds-btn-arrow .wp-block-button__link::after { content: " →"; }
.gds-btn-arrow .wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(14,26,43,.25); background: #fff !important; color: var(--wp--preset--color--accent) !important; }
.gds-btn-glass .wp-block-button__link { background: rgba(255,255,255,.12) !important; border: 1px solid rgba(255,255,255,.45) !important; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.gds-btn-glass .wp-block-button__link:hover { background: rgba(255,255,255,.24) !important; color: #fff !important; transform: translateY(-2px); }
@media (max-width: 600px) { .gds-glass { padding: 28px 22px !important; } }

/* ---------- Usluge: glass kartice ---------- */
.gds-mesh { position: relative; overflow: hidden; isolation: isolate; background-color: #F7F6F3 !important; }
.gds-mesh::before, .gds-mesh::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.gds-mesh::before { width: 520px; height: 520px; left: 8%; top: 22%; background: rgba(200, 53, 59, .22); }
.gds-mesh::after { width: 520px; height: 520px; right: 6%; top: 30%; background: rgba(14, 26, 43, .09); }
.gds-glass-card { position: relative; background: linear-gradient(160deg, rgba(255,255,255,.82), rgba(255,255,255,.55));
	border: 1px solid rgba(255,255,255,.95); box-shadow: inset 0 1px 0 #fff, 0 18px 40px rgba(14, 26, 43, .08);
	-webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
	transition: transform .25s ease, box-shadow .25s ease; }
.gds-glass-card:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 #fff, 0 26px 50px rgba(14, 26, 43, .14); }
.gds-glass-card:hover .gds-card-title a { color: var(--wp--preset--color--accent); }
.gds-card-title { font-size: 21px !important; letter-spacing: -0.3px; }
@media (min-width: 1100px) { .gds-card-title { white-space: nowrap; } }
.gds-chip { display: inline-flex !important; align-self: flex-start; width: max-content; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px;
	color: var(--wp--preset--color--accent); background: rgba(200, 53, 59, .08); border: 1px solid rgba(200, 53, 59, .18); }
.gds-chip::before { content: ""; width: 15px; height: 15px; background: currentColor; -webkit-mask: var(--gds-ico) no-repeat center / contain; mask: var(--gds-ico) no-repeat center / contain; }
.gds-ico-doc { --gds-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h6'/%3E%3C/svg%3E"); }
.gds-ico-shield { --gds-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); }
.gds-ico-flame { --gds-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.07-2.14-.22-4.05 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.15.43-2.29 1-3a2.5 2.5 0 0 0 2.5 2.5z'/%3E%3C/svg%3E"); }
.gds-glass-card .gds-more { padding-top: 10px; }

/* ---------- Footer sa boxovima ---------- */
.gds-footer { position: relative; overflow: hidden; isolation: isolate; }
.gds-footer::before, .gds-footer::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.gds-footer::before { width: 520px; height: 520px; left: -120px; top: -200px; background: rgba(200, 53, 59, .22); }
.gds-footer::after { width: 560px; height: 560px; right: -160px; bottom: -260px; background: rgba(90, 120, 170, .18); }
.gds-foot-card { background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.025)); border: 1px solid rgba(255,255,255,.10);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.06); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: border-color .2s ease; }
.gds-foot-card:hover { border-color: rgba(255,255,255,.18); }
.gds-foot-brand { background: linear-gradient(160deg, rgba(200,53,59,.20), rgba(200,53,59,.05)); border-color: rgba(242,165,168,.22); }
.gds-foot-title { display: flex; align-items: center; gap: 10px; margin-bottom: 4px !important; }
.gds-foot-title::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--wp--preset--color--accent); }
.gds-foot-meta { opacity: .75; }
.gds-footer .gds-ico::before { width: 16px; height: 16px; top: .25em; color: var(--wp--preset--color--accent-on-dark); background: var(--wp--preset--color--accent-on-dark); }
.gds-foot-links { list-style: none; padding: 0 !important; margin: 0; }
.gds-foot-links li { margin: 0; }
.gds-foot-links a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.gds-foot-links li:last-child a { border-bottom: 0; }
.gds-foot-links a::after { content: "→"; opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s; color: var(--wp--preset--color--accent-on-dark); }
.gds-footer .gds-foot-links a:hover { text-decoration: none; color: #fff; }
.gds-foot-links a:hover::after { opacity: 1; transform: none; }
.gds-foot-news li { padding: 10px 0; margin: 0 !important; border-bottom: 1px solid rgba(255,255,255,.07); }
.gds-foot-news li:first-child { padding-top: 2px; }
.gds-foot-news li:last-child { border-bottom: 0; }
.gds-foot-news .wp-block-latest-posts__post-date { color: var(--wp--preset--color--accent-on-dark); font-size: 12px; margin-top: 4px; }
.gds-footer .gds-foot-brand .wp-block-button__link { color: #fff; padding: 12px 18px; white-space: nowrap; }
@media (max-width: 1100px) { .wp-block-group.gds-foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 600px) { .wp-block-group.gds-foot-grid { grid-template-columns: minmax(0, 1fr) !important; } }
