/* Case Study Info Page Styles */
.case-study-info {
    background-color: var(--primary-color);
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
    min-height: calc(100vh - 200px);
}

.case-study-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 102, 255, 0.1), transparent 70%);
    z-index: 1;
}

.info-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.info-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.info-content > p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.info-form-container {
    background: linear-gradient(145deg, rgba(26, 26, 26, 0.7), rgba(13, 13, 13, 0.7));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: left;
}

.info-form-container h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.info-form-container > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.info-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-form label {
    color: var(--text-color);
    font-weight: 500;
}

/* Required field indicator */
label[for="firstname"],
label[for="lastname"],
label[for="email"] {
    position: relative;
}

label[for="firstname"]::after,
label[for="lastname"]::after,
label[for="email"]::after {
    content: '*';
    color: var(--accent-color);
    margin-left: 4px;
}

.info-form input,
.info-form textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* Validation styles */
.info-form input:invalid:not(:placeholder-shown):not(:focus) {
    border-color: #ff4444;
}

/* Remove the data-touched rule */
.info-form input[data-touched="true"]:invalid:not(:placeholder-shown) {
    border-color: #ff4444;
}

/* Override validation for email field */
.info-form input[type="email"] {
    border-color: rgba(255, 255, 255, 0.1);
}

.info-form input[type="email"].error {
    border-color: #ff4444;
}

/* Update valid input styling to only show after blur */
.info-form input:valid:not(:placeholder-shown):not(:focus) {
    border-color: #00C851;
}

/* Remove the automatic valid styling */
.info-form input:valid:not(:placeholder-shown) {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Add a class for valid inputs that will be applied via JavaScript */
.info-form input.valid {
    border-color: #00C851;
}

.error-message {
    display: none;
    color: #ff4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.error-message.visible {
    display: block;
}

.info-form input:focus,
.info-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.info-form textarea {
    min-height: 120px;
    resize: vertical;
}

.info-form input::placeholder,
.info-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.button {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.button.primary {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.button.primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.button.secondary {
    background-color: transparent;
    border: 1px solid var(--accent-color);
    color: var(--text-color);
}

.button.secondary:hover {
    background-color: rgba(0, 102, 255, 0.1);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .case-study-info {
        padding: 4rem 0;
    }

    .info-content h1 {
        font-size: 2rem;
    }

    .info-form-container {
        padding: 2rem;
        margin: 0 1rem;
    }

    .form-buttons {
        flex-direction: column;
    }

    .form-buttons button {
        width: 100%;
    }
}

/* HubSpot Form Styling */
.hubspot-form-container {
    margin-bottom: 30px;
}

/* Override HubSpot form styles to match our design */
.hubspot-form-container form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hubspot-form-container .form-group {
    margin-bottom: 0;
}

.hubspot-form-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.hubspot-form-container input,
.hubspot-form-container select,
.hubspot-form-container textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.hubspot-form-container input:focus,
.hubspot-form-container select:focus,
.hubspot-form-container textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2);
}

.hubspot-form-container textarea {
    min-height: 100px;
    resize: vertical;
}

.hubspot-form-container .hs-button {
    display: none; /* Hide the default HubSpot submit button */
}

.hubspot-form-container .hs-error-msg {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: 5px;
}

.hubspot-form-container .hs-form-required {
    color: var(--accent-color);
}

.hubspot-form-container .hs-form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.hubspot-form-container .hs-form-checkbox input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

.hubspot-form-container .hs-form-checkbox label {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Responsive adjustments for HubSpot form */
@media (max-width: 768px) {
    .hubspot-form-container input,
    .hubspot-form-container select,
    .hubspot-form-container textarea {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
}

/* Hide HubSpot sprocket icon - more specific selectors */
[data-test-id="spocket-icon-forms"],
.IconHolder__StyledIconHolder-egj2sp-0,
.IconHolder__StyledIconWrapper-egj2sp-1,
.StyledIcon-sc-16vzoxu-0,
.hs-form-0 .IconHolder__StyledIconHolder-egj2sp-0,
.hs-form-0 .IconHolder__StyledIconWrapper-egj2sp-1,
.hs-form-0 .StyledIcon-sc-16vzoxu-0,
.hs-form-0 [data-test-id="spocket-icon-forms"],
.hs-form-0 svg[data-icon-name="Sprocket"],
.hs-form-0 svg[aria-hidden="true"][data-icon-name="Sprocket"],
.hs-form-0 path[d*="M23.2 11.21V7.88c.88-.42 1.48-1.29 1.48-2.31V5.5c0-1.41-1.15-2.56-2.56-2.56h-.07c-1.41 0-2.56 1.15-2.56 2.56v.07c0 1.02.6 1.9 1.46 2.31h.02v3.34c-1.33.2-2.5.74-3.47 1.53h.01L8.37 5.63c.06-.22.1-.47.11-.73 0-1.6-1.29-2.89-2.89-2.89S2.7 3.3 2.7 4.9a2.89 2.89 0 0 0 2.88 2.89c.53 0 1.02-.15 1.44-.4h-.01l8.99 7c-.76 1.13-1.21 2.53-1.21 4.03s.5 3.03 1.35 4.22l-.02-.02-2.78 2.73c-.18-.05-.38-.08-.59-.08-1.31 0-2.37 1.06-2.37 2.37s1.06 2.37 2.37 2.37 2.37-1.06 2.37-2.37v-.03c0-.24-.05-.47-.12-.69v.02l2.67-2.66c1.2.9 2.72 1.45 4.36 1.45 4.03 0 7.3-3.27 7.3-7.3a7.29 7.29 0 0 0-6.06-7.19h-.04Zm-1.12 10.95c-2.07 0-3.75-1.68-3.75-3.75s1.68-3.75 3.75-3.75 3.75 1.68 3.75 3.75c0 2.08-1.68 3.75-3.74 3.75Z"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Error highlight animation */
@keyframes highlightError {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

.highlight-error {
    animation: highlightError 2s ease-in-out;
    border-color: #ff4444 !important;
}

/* Ensure error messages are visible when scrolled to */
.error-message.visible {
    display: block;
    color: #ff4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(78, 68, 206, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color, #4E44CE);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
} 