:root {
    --primary-color: #0052CC;
    --primary-hover: #0747A6;
    --text-color: #172B4D;
    --background: #F4F5F7;
    --card-background: #FFFFFF;
    --input-border: #DFE1E6;
    --input-focus: #4C9AFF;
    --success-color: #36B37E;
    --error-color: #FF5630;
    --muted-text: #5E6C84;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================= HEADER ================= */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 24px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--text-color);
  border-radius: 3px;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--card-background);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    display: none;
    border-top: 1px solid var(--input-border);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-link {
    display: block;
    padding: 1rem;
    border-radius: 0;
    text-align: center;
  }

  .dropdown-content {
    position: static;
    transform: none;
    min-width: 100%;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }

  .dropdown-item {
    padding: 0.8rem 1rem;
  }
}

.header {
    background: var(--card-background);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--input-border);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    height: 80px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(0, 82, 204, 0.1);
}

/* ================= DROPDOWN ================= */
.nav-item {
    position: relative;
}

.has-dropdown .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-right: 2rem;
}

.arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-70%) rotate(45deg);
    transition: var(--transition);
}

.has-dropdown:hover .arrow {
    transform: translateY(-30%) rotate(-135deg);
}

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--card-background);
    min-width: 300px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 0.5rem;
    z-index: 1000;
    transition: all 0.3s ease;
    pointer-events: none;
}

.has-dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-content:before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
}

.dropdown-item {
    display: block;
    text-decoration: none;
    padding: 1rem;
    color: var(--text-color);
    border-radius: 6px;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: rgba(0, 82, 204, 0.1);
}

/* ================= CUSTOM DROPDOWN ================= */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.custom-dropbtn {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e1e1e1;
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.custom-dropbtn:hover {
  border-color: var(--primary-color);
}

.custom-dropbtn.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.1);
  color: var(--primary-color);
}

.custom-dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  margin-top: 5px;
  max-height: 280px; /* SCROLL OVDJE */
  overflow-y: auto;
  z-index: 3000;
  display: none;
}

.custom-dropdown-content.show {
  display: block;
}

.custom-dropdown-content div,
.custom-dropdown-content a {
  padding: 0.8rem 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: block;
  text-decoration: none;
  color: var(--text-color);
}

.custom-dropdown-content div:hover,
.custom-dropdown-content a:hover {
  background: rgba(0, 82, 204, 0.08);
  color: var(--primary-color);
}

/* ================= SEARCH FIELD UNUTAR DROPDOWN ================= */
#officeSearch {
  width: 92%;
  margin: 10px auto;
  padding: 10px;
  border: 2px solid #e1e1e1;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  display: block;
}

#officeSearch:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

/* Selektovana stavka */
.custom-dropdown-content .selected {
  background: rgba(0, 82, 204, 0.15);
  font-weight: 600;
  color: var(--primary-color);
}

/* ================= CONTACT FORM ================= */
.contact-form-container {
    max-width: 800px;
    margin: 4rem auto;
    padding: 2rem;
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 5;
}

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

.form-header h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.form-header p {
    color: #666;
    font-size: 1.1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 1rem;
    background: transparent;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    pointer-events: auto !important;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.1);
    outline: none;
}

.form-label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    padding: 0 0.5rem;
    color: #666;
    font-size: 1rem;
    transition: all 0.3s ease;
    pointer-events: none;
    background: white;
}

.form-control:focus + .form-label,
.form-control:not(:placeholder-shown) + .form-label,
.form-control.filled + .form-label {
    top: -0.5rem;
    left: 0.8rem;
    font-size: 0.85rem;
    color: var(--primary-color);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.submit-button {
    grid-column: span 2;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 199;
}

.submit-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 82, 204, 0.2);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button.loading {
    pointer-events: none;
    opacity: 0.95;
}

.loading-spinner {
    display: none;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.submit-button.loading .loading-spinner {
    display: block;
}

.submit-button.loading span {
    opacity: 0;
}

/* ================= FOOTER ================= */
.footer {
    background: #003366;
    color: white;
    padding: 3rem 2rem;
    margin-top: 4rem;
    text-align: center;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--card-background);
        position: absolute;
        top: 80px;
        left: 0;
        padding: 1rem 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        z-index: 999;
    }

    .nav-menu.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        cursor: pointer;
        gap: 5px;
        width: 30px;
        height: 25px;
    }

    .menu-toggle span {
        height: 3px;
        width: 100%;
        background: var(--text-color);
        border-radius: 2px;
        transition: 0.3s ease;
    }
}

@media (max-width: 992px) {
    .nav-menu {
        gap: 1rem;
    }
    .form-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .contact-form-container {
        margin: 2rem;
        padding: 1.5rem;
    }
    .nav-menu {
        flex-direction: column;
        height: auto;
        padding: 1rem 0;
    }
}

@media (max-width: 480px) {
    .form-header h2 {
        font-size: 1.6rem;
    }
    .submit-button {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
}

/* Floating label fix */
.form-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
    background: white;
    padding: 0 0.3rem;
}

.form-control:focus + .form-label,
.form-control:not(:placeholder-shown) + .form-label {
    top: -0.6rem;
    left: 0.8rem;
    font-size: 0.8rem;
    color: var(--primary-color);
    transform: none;
}

/* Popup */
.popup {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--success-color);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: none;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    animation: fadeIn 0.4s ease;
    z-index: 9999;
}

.popup.show {
    display: flex;
}

.popup-icon {
    font-size: 1.5rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
