:root {
    --primary-color: #ff2e54;
    --lighter-primary: #f47b91;
    --secondary-color: #357055;
    --text-color: #666;
    --light-gray: #f5f2f3;
    --border-color: #ddd;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@font-face {
    font-family: 'Proxima Nova';
    src: url('https://cdn.jsdelivr.net/npm/@fontsource/proxima-nova@4.5.0/latin-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Proxima Nova';
    src: url('https://cdn.jsdelivr.net/npm/@fontsource/proxima-nova@4.5.0/latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Proxima Nova', Arial, sans-serif;
    color: var(--text-color);
}

body {
    font-family: 'Proxima Nova', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #FAF9F6;
    padding: 0;
    margin: 0;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.page-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 2.25rem;
    font-weight: 700;
}

.page-header .subtitle {
    color: var(--text-color);
    font-size: 1.25rem;
    margin: 0 auto;
    max-width: 800px;
    line-height: 1.5;
}

/* Main Header */
header {
    background-color: transparent;
    box-shadow: none;
    padding: 0;
    margin-bottom: 1rem;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

h1, h2, h3, h4, h5, h6 {
    color: #000;
    font-weight: 700;
    margin: 0 0 1rem 0;
}

h1 {
    color: var(--primary-color);
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.subtitle {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 1rem;
}

/* Project Tabs */
.project-tabs {
    max-width: 1000px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.project-tabs .tab-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.project-tabs .tab-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color);
    background-color: white;
    color: var(--text-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.project-tabs .tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.project-tabs .tab-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Main container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    gap: 2rem;
}

/* Responsive grid */
.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .main-grid {
        grid-template-columns: 1fr 1fr;
        margin-bottom: 30px;
    }
}

h2 {
    color: #000;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.form-container {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #000;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 46, 84, 0.2);
}

/* Form hints and help text */
.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-style: italic;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    text-decoration: none;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #e61e4d;
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: var(--light-gray);
}

input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.preview-container {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.signature-preview {
    min-height: 150px;
    border: 1px dashed var(--border-color);
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
    background-color: #fff;
    overflow: auto;
}

.signature-placeholder {
    color: #999;
    text-align: center;
    padding: 30px 0;
}

.copy-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-top: 10px;
    width: 100%;
}

.copy-btn i {
    color: white !important;
}

.copy-btn:hover:not(:disabled) {
    background-color: var(--lighter-primary);
}

.copy-btn:active:not(:disabled),
.copy-btn:focus:not(:disabled) {
    background-color: var(--lighter-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 46, 84, 0.3);
}

.copy-btn:disabled {
    background-color: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
    opacity: 0.7;
}

.copy-btn:disabled i {
    opacity: 0.7;
}

/* Raw HTML View */
.raw-html-container {
    margin: 30px 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #eee;
    position: relative;
}

.raw-html-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.copy-html-btn {
    background: #fff;
    color: var(--primary-color);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.copy-html-btn i {
    color: var(--primary-color);
    font-size: 14px;
}

.copy-html-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.copy-html-btn:hover:not(:disabled) i {
    color: white;
}

.copy-html-btn:active:not(:disabled) {
    background: var(--lighter-primary);
    transform: translateY(1px);
}

.copy-html-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f0f0f0;
    border-bottom: 1px solid var(--border-color);
}

.section-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

#raw-html {
    margin: 0;
    padding: 15px;
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    max-height: 200px;
    overflow: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    border-radius: 0 0 8px 8px;
}

#raw-html code {
    display: block;
    white-space: pre-wrap;
}

/* Instructions */
.instructions-container {
    margin-top: 40px;
}

.instructions-container h3 {
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 20px;
}

.instruction-tabs {
    margin-top: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-buttons {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e1e4e8;
    padding: 0.5rem 1rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--gray);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
    border-radius: 4px 4px 0 0;
}

.tab-btn:last-child {
    margin-right: 0;
}

.tab-btn:hover {
    background-color: rgba(255, 46, 84, 0.05);
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: white;
}

.tab-content {
    display: none;
    padding: 1.5rem;
    background-color: white;
    border-radius: 0 0 8px 8px;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

.tab-content ol {
    padding-left: 1.5rem;
    margin: 0;
}

.tab-content li {
    margin-bottom: 8px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 25px;
    border-radius: 4px;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

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

/* Small button variant */
.small-btn {
    padding: 6px 12px;
    font-size: 14px;
}

/* Signature styling */
#signature-preview {
    font-family: Arial, sans-serif;
    color: #333;
    line-height: 1.5;
    font-size: 12px;
}

#signature-preview p {
    margin: 0;
    padding: 0;
    background-color: white !important; /* For Outlook */
}

#signature-preview a {
    color: #0563C1;
    text-decoration: underline;
}

#signature-preview a:hover {
    text-decoration: none;
}

#signature-preview .personal-message {
    color: #888888;
    font-style: italic;
}

#signature-preview img {
    max-width: 278px;
    height: auto;
    margin: 10px 0;
    display: block;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 2.5rem 1rem;
    background-color: white;
    border-top: 1px solid var(--light-gray);
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
}

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

.footer-links {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s, opacity 0.2s;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.footer-links a:hover {
    color: var(--secondary-color);
    background-color: rgba(53, 112, 85, 0.05);
    text-decoration: none;
}

.footer-links .divider {
    color: #ddd;
    font-weight: 300;
    user-select: none;
}

.copyright {
    color: var(--gray);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #e61e4d;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.back-to-top i {
    font-size: 1.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-container {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 10px;
    }
    
    footer {
        padding: 2rem 1rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-links .divider {
        display: none;
    }
}
