/* ==========================================================================
   CCCE Membership Application Page Styles
   ========================================================================== */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Color Palette */
:root {
    --primary-red: #c41e3a;
    --primary-red-dark: #a01729;
    --primary-blue: #0066cc;
    --primary-blue-dark: #004d99;
    --success-green: #10b981;
    --warning-yellow: #f59e0b;
    --error-red: #dc2626;
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;
    --white: #ffffff;
    --black: #000000;
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--neutral-900);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo-icon {
    font-size: 28px;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: var(--neutral-700);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav a:hover,
.nav a.active {
    color: var(--primary-red);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: width 0.3s ease;
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--neutral-700);
    transition: all 0.3s ease;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(196, 30, 58, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 102, 204, 0.06) 0%, transparent 50%);
    z-index: 1;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
    text-align: center;
}

.breadcrumb {
    font-size: 14px;
    color: var(--neutral-600);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.breadcrumb a {
    color: var(--primary-red);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.hero-headline {
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.1;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero-subhead {
    font-size: clamp(18px, 2.5vw, 22px);
    line-height: 1.5;
    color: var(--neutral-600);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Benefits Section
   ========================================================================== */

.benefits-section {
    padding: 100px 0;
    background: var(--white);
}

.section-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-headline {
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.2;
    font-weight: 700;
    color: var(--neutral-900);
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -0.02em;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.benefit-card {
    background: var(--white);
    border: 2px solid var(--neutral-200);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.benefit-card:hover {
    border-color: var(--primary-red);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(196, 30, 58, 0.1);
}

.benefit-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.benefit-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 12px;
}

.benefit-card p {
    font-size: 16px;
    color: var(--neutral-600);
    line-height: 1.6;
}

/* ==========================================================================
   Application Section
   ========================================================================== */

.application-section {
    padding: 100px 0;
    background: var(--neutral-50);
    min-height: 100vh;
}

.form-header {
    text-align: center;
    margin-bottom: 60px;
}

.form-header h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 16px;
}

.form-header p {
    font-size: 18px;
    color: var(--neutral-600);
    max-width: 700px;
    margin: 0 auto;
}

.form-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* ==========================================================================
   Progress Indicator
   ========================================================================== */

.progress-indicator {
    display: flex;
    justify-content: space-between;
    padding: 32px 40px;
    background: var(--neutral-50);
    border-bottom: 1px solid var(--neutral-200);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 60%;
    right: -40%;
    height: 2px;
    background: var(--neutral-300);
    z-index: 1;
}

.progress-step.active:not(:last-child)::after,
.progress-step.completed:not(:last-child)::after {
    background: var(--primary-red);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--neutral-300);
    color: var(--neutral-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: var(--primary-red);
    color: var(--white);
}

.progress-step.completed .step-number {
    background: var(--success-green);
    color: var(--white);
}

.step-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--neutral-600);
    text-align: center;
}

.progress-step.active .step-label {
    color: var(--primary-red);
}

.progress-step.completed .step-label {
    color: var(--success-green);
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

.membership-form {
    padding: 40px;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

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

.form-step h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 32px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-red);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--neutral-700);
    margin-bottom: 8px;
}

/* Style asterisks in required field labels */
.form-group label::after {
    content: none; /* Default: no asterisk */
}

/* Add red asterisk to labels containing asterisk in text */
.form-group label:has(+ input[required])::after,
.form-group label:has(+ select[required])::after,
.form-group label:has(+ textarea[required])::after {
    content: ' *';
    color: var(--error-red);
    font-weight: 700;
}

.field-hint {
    font-size: 14px;
    color: var(--neutral-500);
    margin-top: 4px;
    font-style: italic;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--neutral-300);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background: var(--white);
    transition: all 0.3s ease;
    resize: vertical;
}

/* Remove browser default required field styling */
.form-group input[required],
.form-group select[required],
.form-group textarea[required] {
    box-shadow: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

/* Only show error styling when field has .error class (added by JavaScript validation) */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: var(--error-red);
}

.form-group input.valid,
.form-group select.valid,
.form-group textarea.valid {
    border-color: var(--success-green);
}

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-weight: 400;
    line-height: 1.5;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.checkbox-label:hover {
    background: var(--neutral-50);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--neutral-400);
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-red);
    border-color: var(--primary-red);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.terms-link,
.privacy-link {
    color: var(--primary-red);
    text-decoration: none;
}

.terms-link:hover,
.privacy-link:hover {
    text-decoration: underline;
}

/* Error Messages */
.field-error {
    color: var(--error-red);
    font-size: 14px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.field-error::before {
    content: '⚠';
    font-size: 12px;
}

/* ==========================================================================
   Review Section
   ========================================================================== */

.review-section {
    margin-bottom: 32px;
}

.review-section h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 20px;
}

#applicationSummary {
    background: var(--neutral-50);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--neutral-200);
}

.summary-section {
    margin-bottom: 20px;
}

.summary-section h5 {
    font-size: 16px;
    font-weight: 700;
    color: var(--neutral-800);
    margin-bottom: 8px;
    border-bottom: 1px solid var(--neutral-300);
    padding-bottom: 4px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 4px 0;
}

.summary-label {
    font-weight: 600;
    color: var(--neutral-700);
}

.summary-value {
    color: var(--neutral-600);
    text-align: right;
    flex: 1;
    margin-left: 16px;
}

.info-box {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: var(--white);
    padding: 24px;
    border-radius: 12px;
    margin-top: 32px;
}

.info-box h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.info-box ul {
    list-style: none;
    padding: 0;
}

.info-box li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

.info-box li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--white);
    font-weight: bold;
}

/* ==========================================================================
   Form Navigation
   ========================================================================== */

.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--neutral-200);
    margin-top: 32px;
}

.nav-spacer {
    flex: 1;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 120px;
    text-align: center;
}

.btn-primary {
    background: var(--primary-red);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(196, 30, 58, 0.4);
}

.btn-primary:disabled {
    background: var(--neutral-400);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: transparent;
    color: var(--neutral-700);
    border: 2px solid var(--neutral-300);
}

.btn-secondary:hover {
    background: var(--neutral-100);
    border-color: var(--neutral-400);
}

/* ==========================================================================
   Success Message
   ========================================================================== */

.success-message {
    padding: 60px 40px;
    text-align: center;
}

.success-content {
    max-width: 500px;
    margin: 0 auto;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    margin: 0 auto 24px;
    animation: successPulse 0.6s ease-out;
}

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

.success-message h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 8px;
}

.success-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-red);
    margin-bottom: 24px;
}

.success-details p {
    font-size: 16px;
    color: var(--neutral-600);
    margin-bottom: 16px;
    line-height: 1.6;
}

.success-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background: var(--neutral-50);
    border-top: 1px solid var(--neutral-200);
    padding: 60px 0 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 16px;
    color: var(--neutral-600);
    margin-bottom: 8px;
}

.footer-tagline {
    font-style: italic;
    color: var(--primary-red) !important;
    font-weight: 500;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-section h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 16px;
}

.footer-section a {
    display: block;
    color: var(--neutral-600);
    text-decoration: none;
    font-size: 16px;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-red);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid var(--neutral-200);
}

.footer-bottom p {
    color: var(--neutral-500);
    font-size: 14px;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: var(--neutral-500);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--primary-red);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-container {
        margin: 0 20px;
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: saturate(180%) blur(20px);
        border-bottom: 1px solid var(--neutral-200);
        flex-direction: column;
        padding: 20px 24px;
        gap: 20px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav.mobile-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav a {
        padding: 12px 0;
        border-bottom: 1px solid var(--neutral-200);
        font-size: 18px;
        font-weight: 600;
    }
    
    .nav a:last-child {
        border-bottom: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        position: relative;
        z-index: 1001;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .application-section {
        padding: 60px 0;
    }
    
    .form-container {
        margin: 0 16px;
        border-radius: 16px;
    }
    
    .progress-indicator {
        padding: 24px 20px;
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .progress-step {
        flex: none;
        width: calc(50% - 8px);
    }
    
    .progress-step:nth-child(odd)::after {
        display: none;
    }
    
    .membership-form {
        padding: 24px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 16px;
    }
    
    .form-navigation .btn {
        width: 100%;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 16px;
    }
    
    .hero-content,
    .section-content {
        padding: 0 16px;
    }
    
    .form-container {
        margin: 0 8px;
        border-radius: 12px;
    }
    
    .progress-indicator {
        padding: 20px 16px;
    }
    
    .progress-step {
        width: 100%;
        margin-bottom: 16px;
    }
    
    .membership-form {
        padding: 20px 16px;
    }
    
    .footer-content {
        padding: 0 16px;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .header,
    .mobile-menu-toggle,
    .form-navigation {
        display: none;
    }
    
    .hero {
        padding: 20px 0;
        background: none;
    }
    
    .application-section,
    .benefits-section {
        padding: 20px 0;
    }
    
    .form-container {
        box-shadow: none;
        border: 1px solid var(--neutral-300);
    }
    
    .form-step {
        display: block !important;
        page-break-inside: avoid;
    }
    
    .progress-indicator {
        display: none;
    }
}