/* Base Reset & Variables */
:root {
    --primary: #1d9d95; /* Nanit Teal */
    --primary-hover: #167a73;
    --navy: #112a46;
    --navy-light: #1f426a;
    --bg-color: #6691AB;
    --text-main: #333333;
    --text-muted: #666666;
    --white: #ffffff;
    --border: #e2e8f0;
    --error: #e53e3e;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Nunito', sans-serif;
    
    --radius-lg: 16px;
    --radius-md: 8px;
    --shadow-soft: 0 10px 40px rgba(17, 42, 70, 0.08);
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 30%;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(17, 42, 70, 0.6), rgba(17, 42, 70, 0.8));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 650px;
    margin: 0 auto;
}

/* Main Container */
.main-container {
    flex: 1;
    width: 100%;
    max-width: 800px;
    margin: -60px auto 60px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

/* Card Style */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 40px;
    margin-bottom: 30px;
}

.text-center {
    text-align: center;
}

/* Form Styles */
.form-section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--navy);
    margin: 32px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f4f8;
    font-weight: 600;
}

.form-section-title:first-child {
    margin-top: 0;
}

.section-desc {
    margin-top: -10px;
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 24px;
    width: 100%;
}

.form-group.half {
    width: 50%;
    margin-bottom: 0;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--navy);
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-main);
    background-color: #fdfdfd;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 157, 149, 0.15);
    background-color: var(--white);
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23112a46' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.radio-label:hover {
    background: #f1f5f9;
}

input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Conditional Groups */
.conditional-group {
    animation: fadeInDown 0.4s ease forwards;
    padding: 20px;
    background: #f0f7f7;
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-top: 16px;
}

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

/* Button */
.submit-btn {
    width: 100%;
    background: #2D4977;
    color: var(--white);
    border: none;
    padding: 16px;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
    font-family: var(--font-body);
}

.submit-btn:hover {
    background: #203658;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 73, 119, 0.3);
}

.submit-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Error Box */
.error-box {
    background: #fff5f5;
    color: var(--error);
    padding: 16px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--error);
    margin: 24px 0;
    font-weight: 500;
}

/* Success State */
.success-icon {
    width: 80px;
    height: 80px;
    background: #e6f6f5;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

#success-state h2 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 2.5rem;
    margin-bottom: 16px;
}

#success-state p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(29, 157, 149, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 40px auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-state p {
    text-align: center;
    font-weight: 600;
    color: var(--navy);
}

/* Powered By Slot Padding */
#wbx-powered-by-slot {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Hide Woobox SDK close buttons in full screen/popup embeds and any other injected close buttons */
#woobox-popup-close,
.woobox-popup-close,
#wbx-close,
.wbx-close,
#wbx-popup-close,
.wbx-popup-close,
.woobox-close,
.fancybox-close,
.fancybox-item,
.fancybox-close-small,
[class*="close-btn"],
[id*="close-btn"] {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        height: 350px;
    }
    .hero-content h1 {
        font-size: 2.25rem;
    }
    .card {
        padding: 24px;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .form-group.half {
        width: 100%;
        margin-bottom: 24px;
    }
    .main-container {
        margin-top: -40px;
    }
}
