@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600;700&family=Montserrat:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400&display=swap');



/* ===== ROOT VARIABLES - NAVY & TEAL SCHEME ===== */
:root {
    --primary: #0f172a;      /* Dark navy */
    --primary-light: #1e293b; /* Lighter navy */
    --secondary: #0d9488;     /* Teal */
    --accent: #14b8a6;        /* Light teal */
    --accent-light: #99f6e4;  /* Very light teal */
    --light: #f8fafc;         /* Off-white */
    --dark: #020617;          /* Almost black */
    --gray: #64748b;          /* Slate gray */
    --border: #cbd5e1;        /* Light slate */
    --white: #ffffff;
    --radius: 8px;
    --shadow: 0 2px 4px rgba(15, 23, 42, 0.05), 0 4px 6px rgba(15, 23, 42, 0.05);
    --shadow-hover: 0 4px 8px rgba(15, 23, 42, 0.08), 0 6px 12px rgba(15, 23, 42, 0.08);
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Lato', sans-serif;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}
body, input, select, textarea, button, .form-label, .helper-text, .error-message {
    font-family: var(--font-body);
}

/* Headings - Apply Cormorant Garamond with italics */
.header-text h1,
.section-title,
.family-card h4,
.child-row-header h5,
.success-message h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-style: italic; /* Makes headings italic */
    letter-spacing: -0.3px;
}

/* Specific styling for header */
.header-text h1 {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    font-style: normal; /* Main heading normal, not italic */
    margin-bottom: 8px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.header-text p {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 300;
    font-style: italic; /* Makes paragraph italic */
    opacity: 0.95;
    max-width: 500px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Section titles with italic */
.section-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    font-style: italic;
    color: var(--primary);
}

/* Family card headings with italic */
.family-card h4 {
    font-family: var(--font-heading);
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 600;
    font-style: italic;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Child headers with italic */
.child-row-header h5 {
    font-family: var(--font-heading);
    color: var(--primary);
    font-weight: 600;
    font-style: italic;
    margin: 0;
}

/* Form labels - Lato, normal */
.form-label {
    font-family: var(--font-body);
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 8px;
}

/* Helper text - Lato, italic */
.helper-text {
    font-family: var(--font-body);
    font-size: 13px;
    font-style: italic;
    color: var(--gray);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Submit button - Lato */
.submit-button {
    font-family: var(--font-body);
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    justify-content: center;
}

/* Required badge - Lato */
.required-badge, .search-badge {
    font-family: var(--font-body);
    font-size: 0.75rem;
    background: var(--secondary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 10px;
    font-weight: 400;
    font-style: normal;
}

/* Child status message - Lato italic */
.child-status-message {
    font-family: var(--font-body);
    margin-top: 10px;
    padding: 8px;
    border-radius: 20px;
    background: #f1f5f9;
    text-align: center;
    font-style: italic;
    font-size: 0.9rem;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
}

/* ===== HEADER WITH BANNER IMAGE ===== */
.header {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.header-banner {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* This ensures the image covers the entire header */
    object-position: center;  /* Centers the image */
    display: block;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.7) 50%, rgba(15, 23, 42, 0.4) 100%);
    display: flex;
    align-items: center;
}

.header-content {
    width: 100%;
    padding: 0 40px;
}

.header-text h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.header-text p {
    font-size: 16px;
    opacity: 0.95;
    max-width: 500px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ===== FORM CONTAINER ===== */
.form-container { 
    padding: 40px; 
}

@media (max-width: 768px) {
    .form-container { 
        padding: 24px; 
    }
    .header { 
        height: 180px; 
    }
    .header-content {
        padding: 0 20px;
    }
    .header-text h1 {
        font-size: 24px;
    }
    .header-text p {
        font-size: 14px;
    }
}

/* ===== FORM SECTIONS ===== */
.form-section {
    margin-bottom: 40px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 28px;
    transition: all 0.2s ease;
}

.form-section:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-light);
}

.section-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
}

/* ===== FORM GRID & FIELDS ===== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

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

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

.required::after {
    content: '*';
    color: #dc2626;
    margin-left: 4px;
}

/* Form Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    background: white;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* Error states */
input.error,
select.error,
textarea.error {
    border-color: #dc2626;
    background-color: #fef2f2;
}

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

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

.helper-text {
    font-size: 13px;
    color: var(--gray);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== FAMILY CARDS ===== */
.family-card {
    background: linear-gradient(to right, #f8fafc, #ffffff);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.family-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.family-card h4 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.family-card h4 i {
    font-size: 1.4rem;
    background: var(--secondary);
    color: white;
    padding: 8px;
    border-radius: 50%;
}

.required-badge {
    font-size: 0.75rem;
    background: var(--secondary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 10px;
    font-weight: normal;
}

.search-badge {
    font-size: 0.75rem;
    background: var(--secondary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 10px;
    font-weight: normal;
}

.conditional-address {
    display: none;
    margin-top: 20px;
    padding: 15px;
    background: #f0fdf4;
    border-left: 4px solid var(--secondary);
    border-radius: 4px;
    animation: slideDown 0.3s ease;
}

/* ===== CHILDREN SECTION ===== */
#children-container {
    margin-bottom: 20px;
}

.child-entry {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.child-entry:hover {
    border-color: var(--secondary);
}

.child-entry.has-error {
    border-left: 4px solid #dc2626;
    background-color: #fef2f2;
}

.child-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border);
}

.child-row-header h5 {
    color: var(--primary);
    font-weight: 600;
    margin: 0;
}

.btn-remove-child {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove-child:hover {
    background: #dc2626;
    color: white;
}

.btn-add-child {
    background: linear-gradient(145deg, var(--secondary) 0%, var(--accent) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.btn-add-child:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(13, 148, 136, 0.3);
}

.child-status-message {
    margin-top: 10px;
    padding: 8px;
    border-radius: 20px;
    background: #f1f5f9;
    text-align: center;
}

/* ===== SUBMIT BUTTON ===== */
.submit-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.submit-button {
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    justify-content: center;
}

.submit-button:hover {
    background: linear-gradient(145deg, var(--primary-light) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.2);
}

.submit-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.submit-button.loading::after {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 0.5rem;
}

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

.success-message {
    display: none;
    background: var(--accent-light);
    color: var(--primary);
    padding: 16px;
    border-radius: var(--radius);
    margin-top: 20px;
    text-align: center;
}

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

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

/* Mobile Optimizations */
@media (max-width: 640px) {
    body { 
        padding: 12px; 
    }
    .form-container { 
        padding: 20px 16px; 
    }
    .form-section { 
        padding: 20px; 
    }
    .form-grid { 
        grid-template-columns: 1fr; 
    }
    .submit-button { 
        width: 100%; 
    }
}

