/* Newsletter Modal Styles */
.newsletter-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.newsletter-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.newsletter-modal-content {
    background-color: var(--bg-primary, #ffffff);
    border-radius: 12px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: slideIn 0.3s ease-out;
    position: relative;
}

.newsletter-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    position: relative;
}

.newsletter-modal-header h2 {
    margin: 0 0 10px 0;
    font-size: 1.8em;
    font-weight: 600;
}

.newsletter-modal-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1em;
}

.newsletter-close {
    position: absolute;
    right: 15px;
    top: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.newsletter-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.newsletter-modal-body {
    padding: 0;
}

/* Override MailerLite form styles for modal */
.newsletter-modal #mlb2-28385272.ml-form-embedContainer {
    margin: 0;
    box-sizing: border-box;
}

.newsletter-modal #mlb2-28385272.ml-form-embedContainer .ml-form-embedWrapper {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 30px;
    margin: 0;
}

.newsletter-modal #mlb2-28385272.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody {
    padding: 0;
}

.newsletter-modal #mlb2-28385272.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedContent {
    display: none; /* Hide the default header since we have our own */
}

.newsletter-modal #mlb2-28385272.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow input {
    padding: 15px;
    font-size: 16px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
}

.newsletter-modal #mlb2-28385272.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.newsletter-modal #mlb2-28385272.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    padding: 15px 30px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    cursor: pointer;
}

.newsletter-modal #mlb2-28385272.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3) !important;
}

/* Newsletter Nav Button */
.newsletter-nav-btn {
    background: rgba(59, 130, 246, 0.1); /* Subtle blue background using primary blue */
    color: #3B82F6; /* Primary blue color for text */
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 20px;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.1), 0 2px 8px rgba(59, 130, 246, 0.1);
    outline: 1px solid rgba(59, 130, 246, 0.2);
    outline-offset: 1px;
}

/* Header layout adjustment for newsletter button beside logo */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}

.newsletter-nav-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2), 0 4px 15px rgba(59, 130, 246, 0.2);
    outline: 2px solid rgba(59, 130, 246, 0.3);
    outline-offset: 2px;
}

.newsletter-nav-btn i {
    margin-right: 8px;
}

/* Newsletter Footer Button */
.newsletter-footer-btn {
    background: rgba(59, 130, 246, 0.9); /* More solid for footer visibility */
    color: white;
    border: 1px solid rgba(59, 130, 246, 0.4);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    width: 100%;
    max-width: 200px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2), 0 2px 8px rgba(59, 130, 246, 0.15);
    outline: 1px solid rgba(59, 130, 246, 0.3);
    outline-offset: 1px;
}

.newsletter-footer-btn:hover {
    background: rgba(59, 130, 246, 1);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3), 0 4px 15px rgba(59, 130, 246, 0.3);
    outline: 2px solid rgba(59, 130, 246, 0.4);
    outline-offset: 2px;
}

.newsletter-footer-btn i {
    margin-right: 8px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Dark mode support */
[data-theme="dark"] .newsletter-modal-content {
    background-color: var(--bg-primary, #1a1a1a);
    color: var(--text-primary, #ffffff);
}

[data-theme="dark"] .newsletter-modal #mlb2-28385272.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow input {
    background-color: var(--bg-secondary, #2a2a2a);
    border-color: var(--border-color, #3a3a3a);
    color: var(--text-primary, #ffffff);
}

[data-theme="dark"] .newsletter-modal #mlb2-28385272.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow input:focus {
    border-color: #3B82F6;
    background-color: var(--bg-secondary, #2a2a2a);
}

/* Dark mode button styling */
[data-theme="dark"] .newsletter-nav-btn {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA; /* Lighter blue for dark mode */
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.15), 0 2px 8px rgba(59, 130, 246, 0.15);
    outline: 1px solid rgba(96, 165, 250, 0.2);
    outline-offset: 1px;
}

[data-theme="dark"] .newsletter-nav-btn:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
    color: #93C5FD;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.25), 0 4px 15px rgba(59, 130, 246, 0.25);
    outline: 2px solid rgba(96, 165, 250, 0.3);
    outline-offset: 2px;
}

[data-theme="dark"] .newsletter-footer-btn {
    background: rgba(59, 130, 246, 0.8);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.2), 0 2px 8px rgba(59, 130, 246, 0.2);
    outline: 1px solid rgba(96, 165, 250, 0.25);
    outline-offset: 1px;
}

[data-theme="dark"] .newsletter-footer-btn:hover {
    background: rgba(59, 130, 246, 0.9);
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.3), 0 4px 15px rgba(59, 130, 246, 0.35);
    outline: 2px solid rgba(96, 165, 250, 0.4);
    outline-offset: 2px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .newsletter-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .newsletter-modal-header {
        padding: 15px;
    }
    
    .newsletter-modal-header h2 {
        font-size: 1.5em;
    }
    
    .newsletter-modal #mlb2-28385272.ml-form-embedContainer .ml-form-embedWrapper {
        padding: 20px;
    }
    
    .newsletter-nav-btn {
        display: none; /* Hide on mobile to save space */
    }
    
    .newsletter-footer-btn {
        font-size: 13px;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .newsletter-modal-content {
        width: 100%;
        margin: 10px;
        border-radius: 8px;
    }
    
    .newsletter-modal-header {
        border-radius: 8px 8px 0 0;
        padding: 12px;
    }
    
    .newsletter-modal-header h2 {
        font-size: 1.3em;
    }
    
    .newsletter-modal #mlb2-28385272.ml-form-embedContainer .ml-form-embedWrapper {
        padding: 15px;
    }
} 