:root {
    --primary: #1E3480;
    --secondary: #1E3480;
    --background: #1E3480;
    --text: white;
    --error: #ff7675;
    --success: #55efc4;
    --button-bg: #FBD824;
}

#wpcf7-f1294-p1269-o1{
    background: var(--background);
}

#after-submission-message {
    display: none;
    color: var(--text);
}

#Grant {
    position: relative;
    background: var(--background);
}

#Grant .decorator {
    position: absolute;
    object-fit: contain;
    max-width: 400px;
    height: auto;
    z-index: 3;
}

#Grant .decorator-up {
    position: absolute;
    top: 0;
    left: 0;
}

#Grant .decorator-bottom {
    position: absolute;
    bottom: 0;
    right: 0;
}

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

.intro-step {
    width: auto;
}

.intro-step p {
    color: var(--text);
    margin-bottom: 2rem;
}

.intro-step-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text);
    margin-bottom: 2rem;
    background-color: rgba(255, 255, 255, 0.3);
    padding: 1rem;
    border-radius: 25px;
    width: max-content;

    p {
        font-size: 1rem;
        font-weight: 500;
        margin: 0;
        color: var(--text);
        text-align: left;
        line-height: 160%;
    }
}

.intro-step .start-application {
    font-weight: 600;
    color: var(--primary);
    background: var(--button-bg);
    border: none;
    padding: 10px 20px;
    font-size: 1.4rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-sidebar h2 {
    text-align: left;
    color: var(--text);
    margin-bottom: 2rem;
    font-size: 6.4rem;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-bar {
    flex: 1;
    height: 5px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: visible;
    position: relative;
}

.progress-percentage {
    font-weight: bold;
    color: var(--text);
    min-width: 50px;
    text-align: right;
}

.progress {
    width: 0%;
    height: 100%;
    background: var(--button-bg);
    transition: width 0.3s ease;
}

.progress-checkpoints {
    position: absolute;
    top: -50%;
    left: 0;
    right: 0;
    height: 0;
    transform: translateY(-50%);
    transform-origin: center;
    padding: 0;
}

.checkpoint:nth-child(1) {
    position: absolute;
    left: 25%;
    transform: translateX(-50%);
}

.checkpoint:nth-child(2) {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.checkpoint:nth-child(3) {
    position: absolute;
    left: 75%;
    transform: translateX(-50%);
}

.checkpoint {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f0f0f0;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.checkpoint.active {
    width: 14px;
    height: 14px;
    background: var(--button-bg);
    border-color: var(--button-bg);
    transform: translateX(-50%) translateY(-1px);
}

.checkpoint.completed {
    background: var(--button-bg);
    border-color: var(--button-bg);
}

.form-layout {
    display: flex;
    gap: 10rem;
    align-items: flex-start;
    justify-content: space-between;
}

.form-content {
    flex: 1;
    max-width: 495px;
    display: none;
}

.form-sidebar {
    flex: 1;
    max-width: 380px;
    position: sticky;
    top: 8rem;
}

.form-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.form-section.active {
    display: block;
}

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

.form-section textarea{
    border-radius: 20px;
    resize: none;
}
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.grant-form-container select {
    /* Remove default styling in Safari */
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

/* input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea,
select {
    width: -webkit-fill-available;
    width: -moz-available;
} */

textarea {
    max-height: 200px;
}

::placeholder {
    color: gray;
    opacity: 1;
    text-transform: none;
    font-weight: 500;
}


select:focus {
    outline: 2px solid #3294f6;
    outline-offset: 2px;
}

input.error,
textarea.error,
select.error,
.wpcf7-select.error {
    border-color: var(--error) !important;
    background-color: rgba(255, 118, 117, 0.1) !important;
}

input.error:focus,
textarea.error:focus,
select.error:focus,
.wpcf7-select.error:focus {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 3px rgba(255, 118, 117, 0.2) !important;
}


select {
    color: gray;
    font-weight: 500;
    text-transform: none;
    padding: 10px 22px 10px 22px;
}

.grant-form-container .checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Custom Checkbox Styles */
.grant-form-container .wpcf7-checkbox {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.grant-form-container .wpcf7-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0;
    margin-bottom: 0.5rem;
}

.grant-form-container .wpcf7-list-item-label {
    display: flex;
    flex:1;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--text);
    font-size: 1.4rem;
    pointer-events: none;
}

/* Hide the default checkbox */
.grant-form-container .wpcf7-list-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Custom checkbox checked state */
.grant-form-container .wpcf7-list-item input[type="checkbox"]:checked {
    background: white;
    /* border: 2px solid var(--primary); */
}

/* Custom checkmark - blur square fill */
.grant-form-container .wpcf7-list-item input[type="checkbox"]:checked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    background: var(--primary);
    border-radius: 2px;
}

/* Focus effect */
.grant-form-container .wpcf7-list-item input[type="checkbox"]:focus {
    border: 1px solid rgb(255, 255, 255);
}

/* Custom File Upload Styles */
.wpcf7-file {
    position: relative;
    display: inline-block;
    width: 100%;
}

.wpcf7-file input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
    top: 0;
    left: 0;
}

/* Fallback: Hide default file input only when custom UI exists */
.wpcf7-file .wpcf7-file-button + input[type="file"] {
    opacity: 0 !important;
    position: absolute !important;
    z-index: 2 !important;
}

.wpcf7-file-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 10px 20px;
    background: transparent;
    color: var(--text);
    border: 2px dashed var(--text);
    border-radius: 40px;
    font-size: 1.4rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: -webkit-fill-available;
    width: -moz-available;
    text-align: center;
    position: relative;
}

.wpcf7-file-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--button-bg);
    border-color: var(--button-bg);
}

/* Left side: Upload icon and text */
.wpcf7-file-button-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wpcf7-file-button-upload-icon {
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Right side: Info icon */
.wpcf7-file-button-info {
    width: 22px;
    height: 22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 22 22' stroke='%23ffffff'%3E%3Cpath d='M11 15V11M11 7H11.01M21 11C21 16.5228 16.5228 21 11 21C5.477 21 1 16.5228 1 11C1 5.477 5.477 1 11 1C16.523 1 21 5.477 21 11Z' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    cursor: help;
 
}

/* Tooltip */
.wpcf7-file-button-info::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -35px;
    right: 0;
    background: #FBD824;
    color: #1E3480;
    padding: 8px;
    font-size: 1.2rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.wpcf7-file-button-info:hover::after {
    opacity: 1;
}

/* Tooltip arrow */
.wpcf7-file-button-info::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.wpcf7-file-button-info:hover::before {
    opacity: 1;
}

.wpcf7-file-info {
    margin-top: 0.5rem;
    padding: 8px 12px;
    background: rgba(183, 20, 20, 0.1);
    border-radius: 5px;
    color: var(--text);
    font-size: 1.2rem;
    min-height: 20px;
    display: none;
}

.wpcf7-file-info.has-file {
    display: block;
}

.wpcf7-file-info .file-name {
    font-weight: 500;
    color: var(--button-bg);
}

.wpcf7-file-info .file-size {
    color: #ccc;
    font-size: 1rem;
}

/* File upload error state */
.wpcf7-file.error .wpcf7-file-button {
    border-color: var(--error);
    color: var(--error);
    background: transparent;
}

/* File upload drag and drop styles */
.wpcf7-file.drag-over .wpcf7-file-button {
    background: rgba(251, 216, 36, 0.2);
    border-color: var(--button-bg);
    border-style: dashed;
}

.buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap:2rem;
	position:relative;
}

.buttons button {
    width: 100%;
    text-align: left;
}

button:hover {
    transform: translateY(-2px);
}

.buttons input[type="submit"] {
    width: 100%;
    font-weight: 600;
    text-align: left;
}

.current-step {
    /* background: var(--background); */
    color: var(--text);
    padding: 0;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.current-step-title {
    font-weight: 600;
    line-height: 1.3;
}


.form-sidebar-main-title .step-title {
    white-space: break-spaces;
}

.wpcf7-spinner {
    /* display: none; */
    background-color: transparent;
    border: 2px solid #ffffff;
    position: absolute;
    right: 40%;
    bottom: 17%;
}
.wpcf7-spinner::before {
    /* display: none; */
    background-color: #1E3480;
    top: 2px;
    left: 0px;
    width: 6px;
    height: 6px;
    transform-origin: 13px 11px;
}

.text__single .text__single-wrapper h2 {
    font-size: 5.8rem;
    line-height: 5.8rem;
}

/* .wpcf7-response-output {
    display: block;
    margin: 0;
    border: 20px;
    border-radius: 20px;
} */

hr {
	color: var(--primary);
	height: 1px;
	border: none;
	background-color: var(--primary);
	width: 100%;
}

/* Custom Validation Styles */
.validation-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2) !important;
    background-color: rgba(255, 255, 255, 1) !important;
}

.validation-error-message {
    color: #e74c3c;
    font-size: 1.2rem;
    margin-top: 0.5rem;
    display: block;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tooltip-info {
    position: absolute;
    right: 3%;
    top:25%;
    z-index: 98;
}

.tooltip-info-textarea {
    top:5%;
    
}

.tooltip-info-forma-pravna {
    position: absolute;
    right: 9%;
    top:25%;
    cursor: help;
    z-index: 98;
}

.select-carret {
    position: absolute;
    right: 3%;
    top:50%;
    transform: translateY(-50%);
    z-index: 98;
}

@keyframes checkmarkPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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


/* Submissions */
.cf7-form-count-wrapper {
	display:flex;
	flex-direction:column;
	/* background: #1E3480;
	width:max-content;
	margin-left:auto; */
	font-family:'Gotham Narrow';
	font-style:italic;
}

.cf7-form-count-wrapper span {
	color: #FBD723;
	line-height:1;
	font-weight: 900;
    text-align: center;
}

.applications-number {
	font-size: 48px;
	font-weight: 900;
}

.applications-label {
	max-width: 100px;
    text-align: center;
}

/* Countdown */
.countdown-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    background: #FBD723;
    padding: 1.6rem;
    max-width: 122px;
    height: 107px;
    width: 100%;
    clip-path: polygon(0 0, 100% 0, 83% 100%, 0% 100%);
    margin-left: auto;
    position: absolute;
    right: 0;
    top: 60%
}

.countdown-number {
    font-size: 5.8rem;
    font-weight: 900;
    color: #1E3480;
    line-height: 100%;
    margin-bottom: 0.5rem;
}

.countdown-label {
    font-size: 1.6rem;
    font-weight: 500;
    color: #1E3480;
}

/* Shield */
.shield-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: absolute;
    right: 250px;
    z-index: 9999;
    max-width: 137px;
    width: 100%;
    height: 179px;
}

.text__single .shield-svg {
    position: absolute;
    top: 0;
    z-index: 1;
   
}

.cf7-form-count-wrapper {
    position: relative;
    z-index: 2;
}

.grant-form-container .mailchimp-checkbox {
  display: none;
}


/* Responsive design */
/* @media (max-width: 1500px) {
    .countdown-block {
        right: 200px;
    }
} */

@media (max-width: 1280px) {
    .shield-wrapper {
        right: 150px;
    }
}

@media (max-width: 1024px) {
    .countdown-block {
        /* top: 65%; */
        right: 100px;
    }

    .shield-wrapper {
       display: none;
    }
}
/* Responsive design */
@media (max-width: 900px) {
    .form-layout {
        flex-direction: column;
        gap: 2rem;
    }
    
    .form-sidebar {
        position: static;
        order: -1;
    }
    
    .current-step {
        padding: 1.5rem;
    }
    
    .current-step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .current-step-title {
        font-size: 1rem;
    }
    
    .thank-you-message {
        padding: 2rem 1rem;
    }
    
    .thank-you-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .thank-you-message h2 {
        font-size: 1.8rem;
    }
    
    .thank-you-message > p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .form-sidebar h2 {
        word-break: break-all;
        font-size: 4rem;
        line-height: 4.8rem;
        white-space: break-spaces;
    }

    .intro-step-info {
        width: auto;
    }

    .text__single .text__single-wrapper h2 {
        font-size: 4.8rem;
        line-height: 4.8rem;
    }

    .form-sidebar h1 {
        font-size: 4.8rem;
        line-height: 4.8rem;
    }

    #Grant .decorator {
        display: none;
    }

    .grant-form-container {
        padding: 8rem 2rem;
    }

    .form-sidebar-main-title.step-title {
        font-size: 4rem;
    }

    .countdown-number {
        font-size: 2.8rem;
        font-weight: 900;
        color: #1E3480;
        line-height: 100%;
        margin-bottom: 0.5rem;
    }

    .countdown-block {
        height: 79px;
        right: unset;
        left: 25px;
        top: -180px;
    }
}

@media (max-width: 767px) {
    .intro-step-info {
        width: max-content;
    }
}

@media (max-width: 600px) {
    
    .container {
        padding: 1rem;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .progress-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .progress-percentage {
        text-align: center;
        min-width: auto;
    }

    .intro-step-info {
        width: unset;
    }
   
}

@media (max-width: 480px) {
	.form-content {
		flex: 1;
		max-width: 495px;
		width:100%;
		display: none;
	}
    .form-sidebar {
        width: 100%
    }

    .countdown-block {
        height: 79px;
        right: unset;
        left: 25px;
        top: -140px;
    }
}

