/* Layout specific to Nursery Nameplate app */
.layout-grid {
    display: grid;
    /* Design | Form | Preview | Right-Ad(Large) */
    grid-template-columns: 280px 380px 1fr 300px;
    gap: 1.5rem;
    margin-top: 1rem;
    align-items: start;
}

/* Ad Styles */
.ad-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.ad-container.right-ad {
    height: 700px;
}

.ad-container.horizontal-ad {
    height: 500px;
    width: 100%;
}

.ad-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.3);
    border: 1px dashed var(--border-color);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 1100px) {
    .layout-grid {
        grid-template-columns: 250px 1fr;
    }
    .viewer-section {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .layout-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .viewer-section {
        grid-column: span 1;
        order: 1; /* Show preview first or second? Usually form then preview is better, but maybe preview is top? */
    }
    .form-section {
        order: 2;
    }
    .template-sidebar {
        order: 3;
        height: auto;
        padding: 1rem;
    }
    .template-grid {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    .template-card {
        flex: 0 0 160px;
    }
    .viewer-container {
        height: 400px;
    }
}

/* Sidebar Styles */
.template-sidebar {
    height: 80vh;
    overflow-y: auto;
    padding: 1.5rem;
}

.template-sidebar h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--text-main);
}

.template-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.template-card {
    background: #ffffff;
    border: 2px solid rgba(15, 23, 42, 0.05);
    border-radius: 0.75rem;
    cursor: pointer;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.template-card:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.template-card.active {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.template-preview {
    height: 150px;
    width: 100%;
}

/* Gradients for template thumbnails */
.bg-gradient-1 { background: linear-gradient(135deg, #f472b6, #3b82f6); }
.bg-gradient-2 { background: linear-gradient(135deg, #10b981, #3b82f6); }
.bg-gradient-3 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.bg-gradient-4 { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.bg-gradient-5 { background: linear-gradient(135deg, #06b6d4, #3b82f6); }

.template-card p {
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

h1.page-title, h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #1e3a8a, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(37, 99, 235, 0.05);
}

.btn-secondary:disabled {
    border-color: var(--text-muted);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Light Blue for Primary app button */
.btn-primary {
    background: #2563eb;
}

.btn-primary:hover {
    background: #1d4ed8;
}

/* SEO Footer Styles */
.footer-seo {
    margin-top: 3rem;
    padding: 2.5rem;
}

.footer-seo h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #1e3a8a, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-seo p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 800px;
}

.footer-seo ol, .footer-seo ul {
    padding-left: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.footer-seo li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.footer-seo h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.seo-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.seo-columns h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.seo-columns ul {
    padding-left: 1.5rem;
}

.seo-columns li {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.seo-columns li::marker {
    color: #2563eb;
}

@media (max-width: 768px) {
    .seo-columns {
        grid-template-columns: 1fr;
    }
}

/* FAQ Section */
.faq-section {
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.faq-section h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.faq-item {
    margin-bottom: 1.5rem;
}

.faq-item h4 {
    font-size: 1.1rem;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.faq-item p {
    margin-bottom: 0;
}


/* Format Selection Radio Buttons */
.format-selection {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.format-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-main);
    gap: 0.5rem;
    user-select: none;
    transition: all 0.2s;
}

.format-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radio-custom {
    height: 20px;
    width: 20px;
    background-color: rgba(15, 23, 42, 0.4);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    transition: all 0.2s;
}

.format-radio:hover .radio-custom {
    border-color: #2563eb;
}

.format-radio input:checked ~ .radio-custom {
    background-color: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.radio-custom:after {
    content: "";
    position: absolute;
    display: none;
}

.format-radio input:checked ~ .radio-custom:after {
    display: block;
}

.format-radio .radio-custom:after {
    left: 6px;
    top: 6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: white;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(1);
}
