#blurryformpop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 99999999;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
}

/* When popup is shown */
#blurryformpop[style*="display: flex"],
#blurryformpop[style*="display:flex"] {
    display: flex !important;
    background: rgba(0, 0, 0, 0.7) !important;
}

/* Lower header z-index when popup is open */
body:has(#blurryformpop[style*="display: flex"]) #header-placeholder,
body:has(#blurryformpop[style*="display: flex"]) #header-placeholder *,
body:has(#blurryformpop[style*="display: flex"]) .navbar,
body:has(#blurryformpop[style*="display: flex"]) .mobile-nav {
    z-index: 1 !important;
}

.popup-form {
    background: #ffffff;
    padding: 36px;
    border-radius: 18px;
    max-width: 700px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 100000000;
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(15, 23, 42, 0.08);
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: all 0.35s ease;
}

#blurryformpop[style*="display: flex"] .popup-form {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Professional Custom Scrollbar */
.popup-form::-webkit-scrollbar {
    width: 10px;
}

.popup-form::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    margin: 10px 0;
}

.popup-form::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0052CC, #0747A6);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 6px rgba(0, 82, 204, 0.3);
}

.popup-form::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0747A6, #0052CC);
    box-shadow: 0 3px 8px rgba(0, 82, 204, 0.4);
}

.popup-form::-webkit-scrollbar-thumb:active {
    background: #0052CC;
}

/* Removed heavy animations for performance */

/* Form Group Styling */
.popup-form .form-group {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.popup-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.popup-form .form-grid .full-width {
    grid-column: 1 / -1;
}

.popup-form .form-label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* 3D Input Fields */
.popup-form input,
.popup-form textarea,
.popup-form .form-control,
.popup-form select {
    width: 100%;
    padding: 12px 14px;
    margin: 0;
    border: 1px solid #dfe1e6;
    border-radius: 10px;
    font-size: 14px;
    background: #ffffff;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Invalid field styling */
.popup-form input:invalid:not(:placeholder-shown),
.popup-form textarea:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

.popup-form input:focus,
.popup-form textarea:focus,
.popup-form .form-control:focus,
.popup-form select:focus {
    outline: none;
    border-color: #0b2c5f;
    box-shadow: 0 0 0 3px rgba(11, 44, 95, 0.12);
}

.popup-form textarea {
    height: 100px;
    resize: vertical;
}

.popup-form .submit-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0b2c5f 0%, #0d3c86 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(11, 44, 95, 0.22);
}

.popup-form .submit-button:hover {
    background: linear-gradient(135deg, #0d3c86 0%, #0b2c5f 100%);
    box-shadow: 0 10px 24px rgba(11, 44, 95, 0.3);
    transform: translateY(-1px);
}

.popup-form .submit-button:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(11, 44, 95, 0.22);
}

.popup-form .submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.close-button {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    font-size: 18px;
    background: #ffffff;
    border: 1px solid #e6e8ee;
    border-radius: 50%;
    cursor: pointer;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000001;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    transition: all 0.2s ease;
    font-weight: 700;
    line-height: 0;
    padding: 0;
    margin: 0;
}

.close-button:hover {
    background: #f8fafc;
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

.close-button:active {
    transform: scale(0.95);
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.12);
}

.success-message {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.success-message img {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    display: block;
}

.success-message h3 {
    color: #0052CC;
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 700;
}

.success-message p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.error-message {
    display: none;
    color: #dc3545;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    background: rgba(220, 53, 69, 0.1);
}

.loading-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Professional Form Header with Glass Effect */
.popup-form .form-header {
    text-align: center;
    margin-bottom: 28px;
    padding: 16px;
    background: #f6f8fc;
    border-radius: 14px;
    border: 1px solid rgba(11, 44, 95, 0.08);
}

.popup-form .form-header h2 {
    color: #0b2c5f;
    font-size: 26px;
    margin-bottom: 8px;
    font-weight: 700;
}

.popup-form .form-header p {
    color: #666;
    font-size: 15px;
}

/* Dropdown styling for popup */
.popup-form .custom-dropdown {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    overflow: visible;
}

/* Regija dropdown - highest priority */
.popup-form .custom-dropdown[data-label="Regija"] {
    z-index: 30;
}

/* Poslovnica dropdown - lower priority */
.popup-form .custom-dropdown[data-label="Poslovnica"] {
    z-index: 20;
}

/* Dropdown labels */
.popup-form .custom-dropdown::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.popup-form .custom-dropbtn {
    width: 100%;
    padding: 14px 18px;
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #333;
    position: relative;
    z-index: 1;
    box-shadow: 
        inset 2px 2px 5px rgba(0, 0, 0, 0.05),
        inset -2px -2px 5px rgba(255, 255, 255, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.05);
}

.popup-form .custom-dropbtn:hover {
    border-color: #0b2c5f;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    box-shadow: 
        inset 2px 2px 5px rgba(11, 44, 95, 0.05),
        inset -2px -2px 5px rgba(255, 255, 255, 0.8),
        0 4px 12px rgba(11, 44, 95, 0.2);
    transform: translateY(-1px);
}

.popup-form .custom-dropbtn:active {
    transform: translateY(0);
    box-shadow: 
        inset 2px 2px 5px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.05);
}

.popup-form .custom-dropbtn:focus {
    outline: none;
    border-color: #0b2c5f;
    box-shadow: 0 0 0 3px rgba(11, 44, 95, 0.1);
}

.popup-form .custom-dropdown-content {
    display: none;
    position: absolute;
    background: white;
    width: 100%;
    max-width: 100%;
    max-height: 180px;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 100;
    border-radius: 12px;
    margin-top: 8px;
    border: 1px solid rgba(11, 44, 95, 0.2);
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateY(-10px);
    animation: dropdownSlideIn 0.25s ease forwards;
}

/* Custom scrollbar for dropdowns */
.popup-form .custom-dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.popup-form .custom-dropdown-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
}

.popup-form .custom-dropdown-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0052CC, #0747A6);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.popup-form .custom-dropdown-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0747A6, #0052CC);
}

@keyframes dropdownSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popup-form .custom-dropdown-content div {
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    border-left: 3px solid transparent;
}

.popup-form .custom-dropdown-content div:hover {
    background: linear-gradient(90deg, rgba(11, 44, 95, 0.08), rgba(11, 44, 95, 0.02));
    color: #0b2c5f;
    border-left-color: #0b2c5f;
    padding-left: 22px;
    transform: translateX(2px);
}

.popup-form .custom-dropdown-content div:active {
    background: linear-gradient(90deg, rgba(11, 44, 95, 0.15), rgba(11, 44, 95, 0.05));
    transform: scale(0.98);
}

.popup-form .custom-dropdown-content input {
    width: calc(100% - 30px);
    margin: 10px 15px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.popup-form .custom-dropdown-content input:focus {
    outline: none;
    border-color: #0b2c5f;
}

/* Popup tabs + extra tools */
.popup-tabs {
    display: flex;
    gap: 8px;
    margin: -10px 0 18px 0;
    flex-wrap: wrap;
}

.popup-tab {
    border: 1px solid #d9d9d9;
    background: #ffffff;
    color: #172B4D;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-tab:hover {
    border-color: #0b2c5f;
    color: #0b2c5f;
}

.popup-tab.active {
    background: linear-gradient(135deg, #0b2c5f 0%, #0d3c86 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 6px 14px rgba(11, 44, 95, 0.25);
}

.popup-panel {
    display: none;
}

.popup-panel.active {
    display: block;
}

.popup-panel[data-panel="apply"].active {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.popup-panel[data-panel="calc"].active {
    display: grid;
    gap: 12px;
}

.popup-extra-grid {
    margin-top: 18px;
    display: grid;
    gap: 16px;
}

.popup-calc-card {
    border: 1px solid #e1e7f0;
    border-radius: 14px;
    padding: 16px;
    background: linear-gradient(135deg, #f7f9fc 0%, #ffffff 100%);
    display: grid;
    gap: 12px;
}

.popup-workbench {
    border: 1px solid #e1e7f0;
    border-radius: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #f6f9ff 0%, #ffffff 60%);
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.popup-workbench-head h4 {
    margin: 0;
    color: #0b2c5f;
    font-size: 18px;
}

.popup-workbench-head p {
    margin: 6px 0 0 0;
    color: #5E6C84;
    font-size: 13px;
}

.popup-workbench-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.popup-range-item {
    background: #ffffff;
    border: 1px solid #dfe6f4;
    border-radius: 12px;
    padding: 10px 12px;
    display: grid;
    gap: 6px;
}

.popup-range-item span {
    font-size: 12px;
    color: #5e6c84;
}

.popup-range-item strong {
    color: #0b2c5f;
    font-size: 14px;
}

.popup-range-item input[type="range"] {
    width: 100%;
    accent-color: #0b2c5f;
}

.popup-workbench-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e1e7f0;
    border-radius: 12px;
    padding: 10px;
}

.popup-workbench-results span {
    display: block;
    font-size: 12px;
    color: #5e6c84;
}

.popup-workbench-results strong {
    font-size: 16px;
    color: #0b2c5f;
}

.popup-calc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.popup-calc-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e1e7f0;
    border-radius: 12px;
    padding: 10px;
}

.popup-calc-results span {
    display: block;
    font-size: 12px;
    color: #5E6C84;
}

.popup-calc-results strong {
    font-size: 16px;
    color: #0b2c5f;
}

.popup-mini-title {
    font-weight: 700;
    color: #0b2c5f;
}

.popup-mini-note {
    font-size: 12px;
    color: #5E6C84;
    margin: 0;
}

@media (max-width: 768px) {
    .popup-calc-grid,
    .popup-calc-results,
    .popup-workbench-grid,
    .popup-workbench-results {
        grid-template-columns: 1fr;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .popup-form {
        width: 95%;
        margin: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .popup-form {
        padding: 22px 18px;
        border-radius: 16px;
    }

    .popup-form .form-header {
        padding: 12px;
        margin-bottom: 18px;
    }

    .popup-form .form-header h2 {
        font-size: 22px;
    }

    .popup-tabs {
        gap: 6px;
    }

    .popup-tab {
        flex: 1 1 0;
        text-align: center;
    }

    .close-button {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 640px) {
    .popup-tabs {
        flex-direction: column;
        align-items: stretch;
    }

    .popup-tab {
        width: 100%;
    }
}

@media (min-width: 900px) {
    .popup-panel[data-panel="apply"] {
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
        align-items: start;
    }

    .popup-panel[data-panel="apply"] .popup-mini-note {
        grid-column: 1 / -1;
    }

    .popup-panel[data-panel="apply"] .popup-workbench {
        grid-column: 1;
    }

    .popup-panel[data-panel="apply"] #popup-apply-form {
        grid-column: 2;
    }
}

#popup-contact-form {
    display: grid;
    gap: 15px;
}

/* Change circle to lighter blue with professional animations - MORE STANDOUT */
.project_circle_wrap {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35) !important;
    transition: all 0.3s ease !important;
    animation: softPulse 4s ease-in-out infinite !important;
    position: relative !important;
    overflow: visible !important;
}

/* Glowing ring effect */
.project_circle_wrap::before {
    content: '' !important;
    position: absolute !important;
    top: -4px !important;
    left: -4px !important;
    right: -4px !important;
    bottom: -4px !important;
    background: linear-gradient(135deg, #93C5FD, #3B82F6) !important;
    border-radius: 50% !important;
    opacity: 0.18 !important;
    z-index: -1 !important;
    animation: softGlow 4s ease-in-out infinite !important;
}

@keyframes softGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.18;
    }
    50% {
        transform: scale(1.06);
        opacity: 0.28;
    }
}

.project_circle_wrap:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.4) !important;
    transform: scale(1.06) !important;
    animation: none !important;
}

.project_circle_wrap:active {
    transform: scale(0.95) !important;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.4) !important;
}

/* Pulse animation for attention */
@keyframes softPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 10px 24px rgba(37, 99, 235, 0.4);
    }
}

/* Icon animation on hover - KEEP ICON VISIBLE */
.project_circle_wrap:hover .rocket_icon,
.project_circle_wrap:hover img {
    transform: scale(1.15) rotate(-5deg) !important;
    filter: brightness(1.1) drop-shadow(0 2px 8px rgba(255,255,255,0.5)) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.rocket_icon,
.project_circle_wrap img {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    z-index: 10 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Click animation */
.project_circle_wrap.clicked {
    animation: clickPulse 0.6s ease-out !important;
}

@keyframes clickPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 0 20px rgba(41, 182, 246, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(41, 182, 246, 0);
    }
}
