/* -------------------------
   CSS RESET & NORMALIZATION
------------------------- */
html {
  box-sizing: border-box;
  font-size: 16px;
}
*, *::before, *::after {
  box-sizing: inherit;
}
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, dl, dd, fieldset, legend, input, textarea, button {
  margin: 0;
  padding: 0;
  font-weight: normal;
}
ul, ol {
  list-style: none;
}
img {
  border: 0;
  vertical-align: middle;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
}
button { cursor: pointer; }

/* -------------------------
   ROOT & BRAND VARIABLES (with fallbacks)
------------------------- */
:root {
  --primary: #243674;
  --primary-light: #5168ad;
  --secondary: #5CB8B2;
  --secondary-dark: #37877f;
  --accent: #F0F4F8;
  --green: #6E9B7B;
  --deep-green: #406451;
  --earth: #B1A58A;
  --brown: #886b48;
  --outline: #dad7cd;
  --card-bg: #fafaf5;
  --shadow: 0 4px 24px 0 rgba(36,54,116,0.08);
  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: 'Montserrat', Arial, sans-serif;
  --font-body: 'Roboto', Arial, sans-serif;
  --text-dark: #243674;
  --text-body: #32382f;
  --text-light: #ffffff;
  --text-muted: #5C6C5B;
  --section-bg: #f7faf6;
  --organic-bg1: #f5f3e6;
  --organic-bg2: #e9f5ee;
  --testimonial-bg: #fff;
  --testimonial-border: #d2dac2;
}

/* -------------------------
   TYPOGRAPHY
------------------------- */
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--section-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, .h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--deep-green);
  margin-bottom: 24px;
  line-height: 1.18;
}
h2, .h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 18px;
}
h3, .h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--deep-green);
  margin-bottom: 14px;
}
h4, .h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
}
p, li {
  font-size: 1rem;
  color: var(--text-body);
}
strong {
  font-weight: 600;
  color: var(--deep-green);
}
small {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* -------------------------
   CONTAINER & LAYOUTS
------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  padding: 0 18px;
  margin: 0 auto;
}
.content-wrapper {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  background: transparent;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--section-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* -------------------------
   HEADER & NAVIGATION
------------------------- */
header {
  width: 100%;
  background: var(--organic-bg1);
  box-shadow: 0 2px 8px 0 rgba(110,155,123,0.07);
  z-index: 20;
  position: relative;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
}
header img[alt="Nebulozni Upravitelj"] {
  height: 48px;
  min-width: 130px;
}
nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
nav a {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--deep-green);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.2s;
  font-weight: 500;
}
nav a:hover, nav a:focus {
  background: var(--secondary);
  color: var(--text-light);
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 32px;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  border-radius: 32px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 3px 24px 0 rgba(110, 155, 123, 0.10);
  border: 2px solid var(--green);
  letter-spacing: 0.02em;
  margin-left: 16px;
  transition: background 0.18s, color 0.18s, border 0.22s, box-shadow 0.18s;
  outline: none;
}
.cta-btn:hover, .cta-btn:focus {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 5px 32px 0 rgba(36,54,116,0.10);
}

/* Burger button (Mobile menu) */
.mobile-menu-toggle {
  display: none;
  position: relative;
  background: var(--secondary);
  color: var(--text-light);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  z-index: 80;
  margin-left: 16px;
  border: 2px solid var(--secondary-dark);
  transition: background 0.14s, color 0.14s;
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  background: var(--green);
  color: #fff;
}
/* Mobile menu overlay */
.mobile-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: var(--organic-bg2);
  z-index: 1000;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(.68,-0.25,.265,1.25);
  box-shadow: 0 8px 48px 0 rgba(110,155,123,0.16);
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0 1.5rem 1.5rem;
  background: var(--deep-green);
  color: #fff;
  font-size: 1.7rem;
  border-radius: 50%;
  width: 40px; height: 40px;
  border: none;
  transition: background 0.18s;
}
.mobile-menu-close:focus,
.mobile-menu-close:hover {
  background: var(--primary-light);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0 2.5rem 2rem 2.5rem;
  gap: 24px;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.25rem;
  padding: 8px 0;
  color: var(--deep-green);
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.18s;
  font-weight: 600;
}
.mobile-nav a:hover,
.mobile-nav a:focus {
  background: var(--secondary);
  color: #fff;
}

@media (max-width: 992px) {
  header .container nav,
  header .container .cta-btn {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
}

@media (min-width: 993px) {
  .mobile-menu {
    display: none !important;
  }
}

/* --------------
   MAIN SECTIONS
--------------- */
main {
  min-height: 60vh;
  background: transparent;
  width: 100%;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--section-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
@media (max-width: 768px) {
  .section {
    padding: 26px 8px;
    margin-bottom: 38px;
  }
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
@media (max-width:768px) {
  .content-grid,
  .text-image-section {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
}

/* ORGANIC CARDS & CONTAINERS */
.card-container,
.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  padding: 28px 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 240px;
  max-width: 400px;
  transition: box-shadow 0.18s, transform 0.16s;
}
.card:hover {
  box-shadow: 0 8px 36px rgba(36,54,116,0.13);
  transform: translateY(-4px) scale(1.017);
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 16px;
}

/* BLOG GRID */
.blog-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
}
.blog-grid article {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px 16px 18px;
  margin-bottom: 20px;
  flex: 1 1 calc(300px - 24px);
  min-width: 250px;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.15s, transform 0.13s;
}
.blog-grid article:hover {
  box-shadow: 0 8px 36px rgba(36,54,116,0.14);
  transform: translateY(-2px) scale(1.011);
}

.blog-category {
  font-size: 0.98rem;
  font-family: var(--font-display);
  background: var(--green);
  color: #fff;
  border-radius: var(--radius-sm);
  align-self: flex-start;
  margin-top: 7px;
  padding: 3px 10px;
}

/* --------------
   TESTIMONIALS
--------------- */
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--testimonial-bg);
  border: 1.5px solid var(--testimonial-border);
  box-shadow: 0 4px 24px 0 rgba(110,155,123,0.07);
  border-radius: var(--radius-"); /* Prevent variable clash in copy */
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  padding: 20px;
  min-width: 0;
  color: var(--text-dark);
  transition: box-shadow 0.16s;
}
.testimonial-card strong {
  color: var(--primary);
}
.testimonial-card span[aria-label] {
  color: var(--secondary);
  font-size: 1.28rem;
  letter-spacing: 0.11em;
  margin-left: 7px;
}
.testimonial-card p {
  font-size: 1.08rem;
  color: var(--deep-green);
  margin-bottom: 0;
}
.testimonial-card:hover {
  box-shadow: 0 7px 36px rgba(110,155,123,0.12);
}

/* CASE TAG */
.case-tag {
  display: inline-block;
  background: var(--secondary);
  color: #fff;
  font-size: 0.96rem;
  border-radius: 12px;
  padding: 2px 11px;
  margin-left: 6px;
}

/* --------------
   FOOTER
--------------- */
footer {
  background: var(--organic-bg1);
  padding: 40px 0 18px 0;
  border-top: 2px solid var(--outline);
  font-size: 1rem;
}
.footer-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}
footer nav {
  flex-direction: column;
  gap: 14px;
  margin-bottom: 19px;
}
footer nav a {
  color: var(--deep-green);
  opacity: 0.8;
  font-family: var(--font-display);
  font-size: 1rem;
}
footer nav a:hover {
  color: var(--secondary-dark);
  opacity: 1;
}
.contact-brief {
  color: var(--text-muted);
  font-size: 0.97rem;
  margin-bottom: 8px;
}
.newsletter-form {
  background: var(--accent);
  padding: 18px 22px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 3px 14px rgba(110,155,123,0.05);
}
.newsletter-form input[type=email] {
  border: 1.5px solid var(--outline);
  border-radius: var(--radius-sm);
  padding: 8px 13px;
  font-size: 1rem;
  font-family: var(--font-body);
  min-width: 180px;
  outline: none;
  background: #fff;
  color: var(--text-dark);
  transition: border 0.16s;
}
.newsletter-form input[type=email]:focus {
  border-color: var(--secondary-dark);
}
.newsletter-form button {
  padding: 7px 20px;
  border-radius: 16px;
  font-family: var(--font-display);
  background: var(--green);
  color: #fff;
  font-size: 1rem;
  border: none;
  opacity: 0.65;
  cursor: not-allowed;
}
.newsletter-form button:active {
  opacity: 0.65;
}
.legal-links {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin-top: 10px;
  width: 100%;
}
.legal-links a {
  color: var(--deep-green);
  opacity: 0.7;
  transition: color .15s;
}
.legal-links a:hover {
  color: var(--secondary-dark);
  opacity: 1;
}

/* Footer logo */
.footer-wrapper > img {
  height: 48px;
  margin-right: 12px;
  margin-bottom: 20px;
}

@media (max-width: 992px) {
  .footer-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .newsletter-form {
    width: 100%;
    max-width: 350px;
  }
}

/* --------------
   BUTTONS
--------------- */
button:not(.cta-btn):not(.mobile-menu-close):not(.mobile-menu-toggle),
input[type='submit'],
.newsletter-benefits button {
  background: var(--secondary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  padding: 9px 28px;
  border-radius: 18px;
  border: 0;
  box-shadow: 0 2px 8px 0 rgba(92,184,178,0.10);
  transition: background 0.13s, box-shadow 0.15s;
}
button:not(.cta-btn):not(.mobile-menu-close):not(.mobile-menu-toggle):hover,
input[type='submit']:hover,
.newsletter-benefits button:hover {
  background: var(--primary);
  box-shadow: 0 6px 24px 0 rgba(36,54,116,0.11);
}
button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

/* --------------
   ORGANIC EFFECTS & TEXTURES
--------------- */
.section, .card, .testimonial-card, .blog-grid article {
  position: relative;
  overflow: hidden;
}
.section::before, .card::before, .testimonial-card::before, .blog-grid article::before {
  content: '';
  display: block;
  position: absolute;
  z-index: 0;
  border-radius: 38% 62% 44% 56%/45% 34% 66% 55%;
  background: rgba(92,184,178,0.16);
  pointer-events: none;
}
.section::before {
  width: 180px;
  height: 110px;
  top: -40px;
  left: -56px;
  filter: blur(2px);
}
.card::before {
  width: 80px;
  height: 54px;
  bottom: -24px;
  right: -24px;
  opacity: 0.18;
  filter: blur(1px);
}
.testimonial-card::before {
  width: 60px;
  height: 85px;
  right: -18px;
  top: -28px;
  opacity: 0.1;
  filter: blur(1.5px);
}
.blog-grid article::before {
  width: 70px;
  height: 44px;
  left: -14px;
  bottom: -8px;
  opacity: 0.16;
}

/* --------------
   ORGANIC ICONS
--------------- */
.services ul img,
.resitve ul img,
.feature-item img,
.card img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f5f9f6;
  box-shadow: 0 1.5px 9px 0 rgba(36,54,116,0.07);
  margin-bottom: 6px;
  margin-right: 13px;
}

/* --------------
   FORMS
--------------- */
input[type="email"], input[type="text"] {
  border: 1.5px solid var(--outline);
  border-radius: var(--radius-sm);
  padding: 8px 13px;
  font-size: 1rem;
  min-width: 180px;
  background: #fff;
  color: var(--text-dark);
  transition: border 0.16s;
}
input[type=email]:focus, input[type=text]:focus {
  border-color: var(--secondary-dark);
  outline: none;
}

/* --------------
   SPACING: Override for cards/sections containers
--------------- */
.card-container > *, .card-grid > *, .content-grid > *, .blog-grid > *, .newsletter-benefits > * {
  margin-bottom: 0 !important;
}

/* Ensure minimum spacing between content blocks */
.card, .testimonial-card, .blog-grid article {
  margin-bottom: 20px;
}
.section + .section {
  margin-top: 0;
}

/* --------------
   MICRO ANIMATIONS
--------------- */
.cta-btn, button, .mobile-menu-toggle, .mobile-menu-close {
  will-change: background, color, box-shadow, transform;
  transition: background 0.18s, color 0.18s, border 0.22s, box-shadow 0.16s, transform 0.15s;
}
.card, .testimonial-card, .blog-grid article {
  transition: box-shadow 0.16s, transform 0.14s;
}
.cta-btn:active, button:active,
.mobile-menu-toggle:active, .mobile-menu-close:active {
  transform: scale(0.97);
}

/* --------------
   SPECIAL STATE CLASSES
--------------- */
.disabled, [disabled] {
  opacity: 0.56;
  pointer-events: none;
}

/* --------------
   RESPONSIVE DESIGN
--------------- */
@media (max-width: 768px) {
  h1, .h1 { font-size: 1.88rem; }
  h2, .h2 { font-size: 1.35rem; }
  .section { padding: 24px 6px; border-radius: 10px; }
  .content-wrapper { max-width: 98vw; }
  .card-grid, .card-container, .blog-grid, .content-grid {
    flex-direction: column;
    gap: 8px;
  }
  .testimonial-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* --------------
   UTILITY CLASSES
--------------- */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-8 { margin-bottom: 8px !important; }
.mb-16 { margin-bottom: 16px !important; }
.mb-32 { margin-bottom: 32px !important; }
.pt-32 { padding-top: 32px !important; }
.gap-24 { gap: 24px !important; }

/* --------------
   COOKIE CONSENT BANNER
--------------- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 2222;
  background: var(--card-bg);
  color: var(--text-dark);
  box-shadow: 0 -2px 20px 0 rgba(36,54,116,0.10);
  padding: 22px 12px 16px 12px;
  border-top: 2px solid var(--organic-bg2);
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 1rem;
  transition: transform 0.28s cubic-bezier(0.86,0,0.07,1);
}
.cookie-banner.hide {
  transform: translateY(120%);
}
.cookie-banner p {
  flex: 1 1 220px;
  font-size: 1rem;
  color: var(--deep-green);
}
.cookie-banner .cookie-btn {
  padding: 7px 26px;
  background: var(--green);
  color: #fff;
  border-radius: 18px;
  border: none;
  margin-left: 7px;
  font-size: 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  transition: background 0.17s;
}
.cookie-banner .cookie-btn:hover, .cookie-banner .cookie-btn:focus {
  background: var(--primary);
  color: #fff;
}

.cookie-banner .cookie-btn.cookie-reject {
  background: var(--brown);
}
.cookie-banner .cookie-btn.cookie-reject:hover {
  background: #c0922e;
}
.cookie-banner .cookie-btn.cookie-settings {
  background: var(--secondary);
  color: var(--text-light);
}
.cookie-banner .cookie-btn.cookie-settings:hover {
  background: var(--primary-light);
}

@media (max-width: 600px) {
  .cookie-banner {
    padding: 15px 5px 10px 5px;
    font-size: 0.97rem;
    gap: 8px;
  }
}

/* --------------
   COOKIE MODAL
--------------- */
.cookie-modal-backdrop {
  position: fixed;
  z-index: 3000;
  inset: 0;
  background: rgba(93, 141, 92, 0.17);
}
.cookie-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%) scale(1);
  z-index: 3333;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 48px 0 rgba(36,54,116, 0.12);
  padding: 32px 28px 22px 28px;
  min-width: 320px;
  max-width: 97vw;
  display: flex;
  flex-direction: column;
  gap: 19px;
  animation: fadeInModal 0.34s ease;
}
@keyframes fadeInModal {
  from { opacity: 0; transform: translate(-50%,-48%) scale(0.9); }
  to   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
}
.cookie-modal h3 {
  font-family: var(--font-display);
  color: var(--primary);
  font-size: 1.45rem;
  margin-bottom: 13px;
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.cookie-modal .cookie-category input[type=checkbox]{
  accent-color: var(--green);
  min-width: 22px;
  min-height: 22px;
}
.cookie-modal .category-label {
  font-weight: 600;
  color: var(--deep-green);
}
.cookie-modal .cookie-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.cookie-modal .cookie-btn {
  padding: 7px 26px;
  border-radius: 18px;
  font-family: var(--font-display);
  background: var(--green);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.16s;
}
.cookie-modal .cookie-btn:hover,
.cookie-modal .cookie-btn:focus {
  background: var(--primary);
}

/* --------------
   ACCESSIBILITY
--------------- */
:focus {
  outline: 2px dashed var(--secondary);
  outline-offset: 2px;
}

/* --------------
   MISCELLANEOUS
--------------- */
@media (max-width: 400px) {
  .footer-wrapper > img,
  header img[alt="Nebulozni Upravitelj"] {
    height: 36px;
    min-width: 82px;
  }
}
@media (max-width: 420px) {
  body {
    font-size: 0.95rem;
  }
}

/* --------------
   END OF CSS
--------------- */
