/* newsletter-footer.css - Premium Newsletter & Footer Styles */

/* ============================================
   PREMIUM NEWSLETTER SECTION
   ============================================ */

   .newsletter {
    padding: clamp(3rem, 8vw, 5rem) 0;
    background: linear-gradient(145deg, 
        var(--color-primary) 0%, 
        color-mix(in srgb, var(--color-primary) 85%, #000) 45%,
        color-mix(in srgb, var(--color-primary-dark) 90%, #000) 100%);
    color: var(--color-white);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.newsletter::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(255,255,255,0.15) 0%, transparent 25%),
        radial-gradient(circle at 90% 80%, rgba(255,255,255,0.1) 0%, transparent 25%),
        repeating-linear-gradient(45deg, 
            transparent, 
            transparent 10px, 
            rgba(255,255,255,0.03) 10px, 
            rgba(255,255,255,0.03) 20px);
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
    z-index: -1;
}

.newsletter::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%,
        var(--color-secondary) 20%,
        var(--color-primary) 50%,
        var(--color-secondary) 80%,
        transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes float {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg); 
        opacity: 0.8;
    }
    33% { 
        transform: translate(-15px, -10px) rotate(1deg); 
        opacity: 1;
    }
    66% { 
        transform: translate(10px, 15px) rotate(-1deg); 
        opacity: 0.9;
    }
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.newsletter-content {
    max-width: 48rem;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 0 var(--space-4);
}

.newsletter-header {
    margin-bottom: clamp(2rem, 5vw, 3rem);
    animation: slideUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.newsletter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(145deg, 
        rgba(255,255,255,0.2), 
        rgba(255,255,255,0.1));
    color: var(--color-white);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { 
        transform: translateY(0) scale(1);
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            0 0 0 1px rgba(255, 255, 255, 0.1);
    }
    50% { 
        transform: translateY(-2px) scale(1.02);
        box-shadow: 
            0 12px 40px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            0 0 0 1px rgba(255, 255, 255, 0.15);
    }
}

.newsletter-content h2 {
    color: var(--color-white);
    margin-bottom: 1rem;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(255, 255, 255, 0.85) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
    letter-spacing: -0.025em;
    position: relative;
}

.newsletter-content h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4rem;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--color-secondary), 
        transparent);
    border-radius: 2px;
}

.newsletter-content > p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: clamp(2.5rem, 6vw, 3rem);
    font-size: clamp(1.125rem, 3vw, 1.25rem);
    line-height: 1.7;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    opacity: 0.95;
    font-weight: 400;
}

/* Premium Alert Messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    text-align: left;
    animation: slideInRight 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-left: 4px solid transparent;
    backdrop-filter: blur(10px);
    border: 1px solid;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(255,255,255,0.1) 0%,
        rgba(255,255,255,0.05) 100%);
    z-index: -1;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-1.5rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert i {
    font-size: 1.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.alert-success {
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.15) 0%,
        rgba(16, 185, 129, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
    border-left-color: var(--color-success);
    color: var(--color-success);
}

.alert-error {
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.15) 0%,
        rgba(239, 68, 68, 0.1) 100%);
    border-color: rgba(239, 68, 68, 0.3);
    border-left-color: var(--color-error);
    color: var(--color-error);
}

.alert div {
    flex: 1;
    font-weight: 500;
}

/* Premium Newsletter Form */
.newsletter-form {
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.98) 0%,
        rgba(255, 255, 255, 0.95) 100%);
    padding: clamp(2rem, 4vw, 2.5rem);
    border-radius: 1.25rem;
    box-shadow: 
        0 32px 64px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 20px 40px -20px rgba(var(--color-primary-rgb), 0.3);
    max-width: 44rem;
    margin: 0 auto clamp(3rem, 6vw, 4rem);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    animation: formSlideUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
    position: relative;
    overflow: hidden;
}

.newsletter-form::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(var(--color-primary-rgb), 0.05) 0%,
        transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: -1;
}

@keyframes formSlideUp {
    from {
        opacity: 0;
        transform: translateY(3rem) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-gray-800);
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    color: var(--color-primary);
    font-size: 1rem;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.newsletter-form input[type="text"],
.newsletter-form input[type="email"] {
    width: 100%;
    padding: 1rem 1rem 1rem 2.75rem;
    border: 2px solid var(--color-gray-200);
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: linear-gradient(135deg, 
        var(--color-white) 0%,
        rgba(255, 255, 255, 0.95) 100%);
    color: var(--color-gray-800);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.04),
        0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    font-family: inherit;
    font-weight: 500;
}

.newsletter-form input:hover {
    border-color: var(--color-gray-300);
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.06),
        0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 
        0 0 0 4px rgba(var(--color-primary-rgb), 0.15),
        inset 0 2px 4px rgba(0, 0, 0, 0.04),
        inset 0 0 0 1px rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    background: var(--color-white);
}

.newsletter-form input:focus + .input-with-icon i {
    color: var(--color-secondary);
    transform: scale(1.2) translateY(-1px);
    animation: iconBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1.2) translateY(-1px); }
    50% { transform: scale(1.3) translateY(-2px); }
}

.newsletter-form input::placeholder {
    color: var(--color-gray-500);
    font-weight: 400;
    opacity: 0.7;
}

.input-hint {
    font-size: 0.75rem;
    color: var(--color-gray-600);
    margin-top: 0.375rem;
    margin-left: 0.125rem;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: all 0.3s ease;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.newsletter-form input:focus ~ .input-hint {
    opacity: 1;
    transform: translateY(0);
}

.input-hint::before {
    content: '💡';
    font-size: 0.875rem;
}

/* Premium Checkbox Group */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, 
        rgba(var(--color-primary-rgb), 0.05) 0%,
        rgba(var(--color-primary-rgb), 0.02) 100%);
    border-radius: 0.75rem;
    border-left: 4px solid var(--color-secondary);
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.04),
        0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.checkbox-group:hover {
    transform: translateY(-2px);
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.06),
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.1875rem;
    accent-color: var(--color-primary);
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.checkbox-group input[type="checkbox"]:checked {
    transform: scale(1.1);
    animation: checkboxCheck 0.3s ease;
}

@keyframes checkboxCheck {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1.1); }
}

.checkbox-group label {
    font-size: 0.875rem;
    color: var(--color-gray-700);
    line-height: 1.6;
    cursor: pointer;
    flex: 1;
    font-weight: 500;
    padding-right: 0.5rem;
}

.checkbox-group .privacy-link {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    padding: 0 0.125rem;
}

.checkbox-group .privacy-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.checkbox-group .privacy-link:hover {
    color: var(--color-secondary);
}

.checkbox-group .privacy-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Premium Submit Button */
.newsletter-form button {
    width: 100%;
    background: linear-gradient(145deg, 
        var(--color-secondary) 0%, 
        color-mix(in srgb, var(--color-secondary) 90%, #000) 100%);
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    color: var(--color-white);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(var(--color-secondary-rgb), 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    isolation: isolate;
}

.newsletter-form button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, 
        color-mix(in srgb, var(--color-secondary) 80%, white) 0%, 
        var(--color-secondary) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.newsletter-form button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255,255,255,0.1) 50%, 
        transparent 70%);
    transform: translateX(-100%) rotate(45deg);
    transition: transform 0.6s ease;
    z-index: -1;
}

.newsletter-form button:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 16px 48px rgba(var(--color-secondary-rgb), 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    letter-spacing: 0.075em;
}

.newsletter-form button:hover::before {
    opacity: 1;
}

.newsletter-form button:hover::after {
    transform: translateX(100%) rotate(45deg);
}

.newsletter-form button:active {
    transform: translateY(-1px);
    transition: transform 0.1s ease;
}

.newsletter-form button i {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 1.125rem;
}

.newsletter-form button:hover i {
    transform: translateX(0.25rem) rotate(-5deg) scale(1.1);
    animation: paperPlane 1s ease-in-out infinite;
}

@keyframes paperPlane {
    0%, 100% { transform: translateX(0.25rem) rotate(-5deg) scale(1.1); }
    50% { transform: translateX(0.5rem) rotate(-10deg) scale(1.15); }
}

.form-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-gray-200);
    text-align: center;
    position: relative;
}

.form-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3rem;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--color-gray-300), 
        transparent);
}

.form-footer p {
    font-size: 0.75rem;
    color: var(--color-gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    line-height: 1.6;
    font-weight: 500;
    opacity: 0.9;
}

.form-footer i {
    color: var(--color-success);
    flex-shrink: 0;
    animation: lockFloat 3s ease-in-out infinite;
}

@keyframes lockFloat {
    0%, 100% { 
        transform: translateY(0) rotate(0deg);
        color: var(--color-success);
    }
    25% { 
        transform: translateY(-2px) rotate(5deg);
        color: color-mix(in srgb, var(--color-success) 80%, var(--color-primary));
    }
    75% { 
        transform: translateY(2px) rotate(-5deg);
        color: color-mix(in srgb, var(--color-success) 80%, var(--color-secondary));
    }
}

/* Premium Features Section */
.newsletter-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: clamp(3rem, 6vw, 4rem);
    animation: fadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}

@media (max-width: 768px) {
    .newsletter-features {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 24rem;
        margin-left: auto;
        margin-right: auto;
    }
}

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

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    padding: 1.5rem 1rem;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.feature::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(var(--color-secondary-rgb), 0.1) 0%,
        transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.feature:hover {
    transform: translateY(-0.5rem) scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 16px 40px rgba(0, 0, 0, 0.3),
        0 8px 20px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.feature:hover::before {
    opacity: 1;
}

.feature i {
    color: var(--color-white);
    font-size: 1.5rem;
    background: linear-gradient(145deg, 
        var(--color-secondary) 0%, 
        color-mix(in srgb, var(--color-secondary) 80%, #000) 100%);
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 8px 20px rgba(var(--color-secondary-rgb), 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.feature:hover i {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 
        0 12px 28px rgba(var(--color-secondary-rgb), 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    background: linear-gradient(145deg, 
        color-mix(in srgb, var(--color-secondary) 80%, white) 0%, 
        var(--color-secondary) 100%);
}

.feature span {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* Premium Success Modal */
.newsletter-success {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(20px);
    animation: modalBgIn 0.4s ease both;
}

@keyframes modalBgIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.newsletter-success.show {
    display: flex;
}

.success-content {
    background: linear-gradient(145deg, 
        var(--color-white) 0%, 
        rgba(255, 255, 255, 0.98) 100%);
    padding: clamp(2rem, 4vw, 3rem);
    border-radius: 1.5rem;
    text-align: center;
    max-width: 32rem;
    width: 90%;
    box-shadow: 
        0 40px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: modalIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    position: relative;
    overflow: hidden;
}

.success-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: conic-gradient(
        from 0deg at 50% 50%,
        var(--color-success) 0deg,
        var(--color-secondary) 120deg,
        var(--color-primary) 240deg,
        var(--color-success) 360deg
    );
    opacity: 0.1;
    animation: rotate 10s linear infinite;
    z-index: -1;
}

.success-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--color-success) 0%, 
        var(--color-secondary) 33%, 
        var(--color-primary) 66%, 
        var(--color-success) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(2rem);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.success-content i {
    font-size: 4rem;
    color: var(--color-success);
    margin-bottom: 1.5rem;
    animation: successIcon 1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    text-shadow: 0 8px 32px rgba(16, 185, 129, 0.4);
    position: relative;
    display: inline-block;
}

.success-content i::after {
    content: '';
    position: absolute;
    inset: -1rem;
    background: radial-gradient(circle, 
        rgba(16, 185, 129, 0.2) 0%,
        transparent 70%);
    border-radius: 50%;
    animation: ripple 2s ease-out infinite;
    z-index: -1;
}

@keyframes successIcon {
    0% { 
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    60% { 
        transform: scale(1.2) rotate(10deg);
        opacity: 1;
    }
    100% { 
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

@keyframes ripple {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.success-content h3 {
    color: var(--color-gray-800);
    margin-bottom: 1rem;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.success-content p {
    color: var(--color-gray-600);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1rem;
    padding: 0 1rem;
    font-weight: 500;
}

.success-content .btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 0.875rem 2.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.success-content .btn-outline::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, 
        var(--color-primary) 0%, 
        color-mix(in srgb, var(--color-primary) 80%, #000) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.success-content .btn-outline:hover {
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(var(--color-primary-rgb), 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: transparent;
}

.success-content .btn-outline:hover::before {
    opacity: 1;
}

.success-content .btn-outline:active {
    transform: translateY(-1px);
}

.success-content .btn-outline i {
    font-size: 1rem;
    margin: 0;
    animation: none;
    text-shadow: none;
    color: currentColor;
}

.success-content .btn-outline i::after {
    display: none;
}

/* Loading State */
.newsletter-form.loading {
    position: relative;
}

.newsletter-form.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(10px);
    animation: loadingBgIn 0.3s ease;
}

@keyframes loadingBgIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.newsletter-form.loading button {
    position: relative;
    pointer-events: none;
    color: transparent;
}

.newsletter-form.loading button::after {
    content: '';
    position: absolute;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--color-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   PREMIUM FOOTER SECTION WITH DROPDOWNS
   ============================================ */

.footer {
    background: linear-gradient(145deg, 
        var(--color-gray-800) 0%,
        color-mix(in srgb, var(--color-gray-800) 90%, #000) 50%,
        var(--color-gray-900) 100%);
    color: var(--color-white);
    padding: clamp(3rem, 6vw, 4rem) 0 2rem;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--color-primary) 0%, 
        var(--color-secondary) 50%, 
        var(--color-primary-dark) 100%);
    border-radius: 2px;
}

.footer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(255,255,255,0.1) 50%,
        transparent 100%);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 1fr;
    gap: clamp(2rem, 4vw, 3rem);
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 640px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.footer-section {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }
.footer-section:nth-child(4) { animation-delay: 0.4s; }

.footer-section h3,
.footer-section h4 {
    color: var(--color-white);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.025em;
}

.footer-section h3 {
    font-size: 1.25rem;
}

.footer-section h4 {
    font-size: 1rem;
}

.footer-section h3 i,
.footer-section h4 i {
    color: var(--color-primary);
    font-size: 1.1em;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 0.875rem;
    font-weight: 400;
}

/* Pillar Section with Dropdown - Updated */
.pillar-section {
    position: relative;
}

.pillar-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pillar-dropdown {
    position: relative;
}

.pillar-main-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.pillar-main-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, 
        rgba(var(--color-primary-rgb), 0.15) 0%,
        rgba(var(--color-primary-rgb), 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.pillar-main-link:hover {
    transform: translateX(4px);
    border-color: rgba(var(--color-primary-rgb), 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.pillar-main-link:hover::before {
    opacity: 1;
}

.pillar-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    flex: 1;
    transition: color 0.3s ease;
}

.pillar-title:hover {
    color: var(--color-white);
}

.pillar-title i:first-child {
    color: var(--color-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.pillar-title:hover i:first-child {
    color: var(--color-secondary);
    transform: scale(1.1);
}

.dropdown-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 0.25rem;
}

.dropdown-toggle:hover {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dropdown-arrow.rotate {
    transform: rotate(180deg);
}

.pillar-submenu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: linear-gradient(145deg, 
        var(--color-gray-800) 0%,
        color-mix(in srgb, var(--color-gray-800) 95%, #000) 100%);
    border-radius: 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 12rem;
}

.pillar-dropdown.active .pillar-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pillar-submenu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 0.625rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.pillar-submenu a:hover {
    color: var(--color-white);
    background: linear-gradient(145deg, 
        rgba(var(--color-primary-rgb), 0.15) 0%,
        rgba(var(--color-primary-rgb), 0.05) 100%);
    border-color: rgba(var(--color-primary-rgb), 0.2);
    transform: translateX(4px);
}

.pillar-submenu a i {
    color: var(--color-primary);
    font-size: 0.875rem;
    width: 1rem;
    text-align: center;
}

/* Mobile dropdown adjustments */
@media (max-width: 768px) {
    .pillar-submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        border: none;
        box-shadow: none;
        background: transparent;
        transition: max-height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        margin-top: 0;
    }
    
    .pillar-dropdown.active .pillar-submenu {
        max-height: 12rem;
        padding: 0.75rem 0 0.75rem 1.5rem;
        margin-top: 0.5rem;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 0.5rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .pillar-submenu a {
        padding: 0.5rem 0.75rem;
        border: none;
        background: transparent !important;
    }
    
    .pillar-submenu a:hover {
        transform: translateX(2px);
    }
    
    .dropdown-toggle {
        display: flex;
    }
}

@media (min-width: 769px) {
    .dropdown-toggle {
        display: none;
    }
    
    .pillar-dropdown:hover .pillar-submenu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .pillar-dropdown:hover .dropdown-arrow {
        transform: rotate(180deg);
    }
}

/* Resources Section */
.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
    position: relative;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    position: relative;
    overflow: hidden;
    font-weight: 400;
    border: 1px solid transparent;
}

.footer-section ul li a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.05) 0%,
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.footer-section ul li a:hover {
    color: var(--color-white);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.1);
}

.footer-section ul li a:hover::before {
    opacity: 1;
}

.footer-section ul li a i {
    color: var(--color-primary);
    font-size: 0.875rem;
    width: 1rem;
    text-align: center;
}

.pillar-learn-more {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--color-secondary) !important;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pillar-learn-more:hover {
    color: var(--color-white) !important;
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-info p {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
    line-height: 1.5;
}

.contact-info p:hover {
    color: var(--color-white);
}

.contact-info i {
    color: var(--color-primary);
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.875rem;
    margin-top: 0.125rem;
}

/* Social Icons */
.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%);
    border-radius: 50%;
    color: var(--color-white);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.social-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, 
        var(--color-primary) 0%, 
        var(--color-secondary) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.social-icon::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(145deg, 
        var(--color-primary) 0%, 
        var(--color-secondary) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
    z-index: -2;
    filter: blur(8px);
}

.social-icon:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.social-icon:hover::before {
    opacity: 1;
}

.social-icon:hover::after {
    opacity: 0.3;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.025em;
}

.footer-legals {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legal-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.25rem 0;
    font-weight: 500;
    letter-spacing: 0.025em;
}

.legal-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transition: width 0.3s ease;
}

.legal-link:hover {
    color: var(--color-white);
}

.legal-link:hover::after {
    width: 100%;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(145deg, 
        var(--color-primary) 0%, 
        color-mix(in srgb, var(--color-primary) 80%, #000) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 
        0 8px 32px rgba(var(--color-primary-rgb), 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem) scale(0.9);
    isolation: isolate;
    overflow: hidden;
}

.back-to-top::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, 
        color-mix(in srgb, var(--color-primary) 80%, white) 0%, 
        var(--color-primary) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 
        0 16px 48px rgba(var(--color-primary-rgb), 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.back-to-top:hover::before {
    opacity: 1;
}

.back-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .newsletter {
        padding: 3rem 1rem;
    }
    
    .newsletter-form {
        padding: 1.5rem;
        margin-bottom: 2.5rem;
    }
    
    .checkbox-group {
        padding: 1rem;
    }
    
    .success-content {
        padding: 2rem 1.5rem;
    }
    
    .footer {
        padding: 3rem 1rem 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-legals {
        justify-content: center;
        gap: 1rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    /* Mobile dropdown adjustments */
    .pillar-submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        border: none;
        box-shadow: none;
        background: transparent;
        transition: max-height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    
    .pillar-dropdown.active .pillar-submenu {
        max-height: 12rem;
        padding: 0.75rem 0 0.75rem 1.5rem;
        margin-top: 0.5rem;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 0.5rem;
    }
    
    .pillar-submenu a {
        padding: 0.5rem 0.75rem;
        border: none;
        background: transparent !important;
    }
    
    .pillar-submenu a:hover {
        transform: translateX(2px);
    }
}

@media (max-width: 480px) {
    .newsletter-content h2 {
        font-size: 1.75rem;
    }
    
    .newsletter-content > p {
        font-size: 1rem;
    }
    
    .newsletter-features {
        max-width: 100%;
    }
    
    .footer-section {
        text-align: left;
    }
    
    .footer-section h3,
    .footer-section h4 {
        justify-content: flex-start;
    }
    
    .pillar-main-link {
        padding: 0.75rem;
    }
}

/* Form Validation States */
.newsletter-form input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: var(--color-error);
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.05) 0%,
        var(--color-white) 100%);
}

.newsletter-form input:valid:not(:placeholder-shown) {
    border-color: var(--color-success);
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.05) 0%,
        var(--color-white) 100%);
}

/* Focus Visible Fallback */
.newsletter-form input:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .newsletter,
    .footer {
        display: none;
    }
}