/*
 * thy.finance Branding Styles
 * Professional header, footer, and brand elements
 */

/* ==========================================================================
   Site Header
   ========================================================================== */

.site-header {
    background: var(--bg-secondary);
    padding: 1rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: -0.02em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a:focus {
    color: var(--accent-primary);
}

/* Mobile Header */
@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
    }

    .main-nav {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .main-nav a {
        font-size: 0.85rem;
    }

    .main-nav {
        gap: 0.75rem;
    }
}

/* ==========================================================================
   Site Footer
   ========================================================================== */

.site-footer {
    margin-top: 4rem;
    padding: 3rem 0 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.footer-logo svg {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.footer-column a:hover,
.footer-column a:focus {
    color: var(--accent-primary);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.disclaimer-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
    text-align: center;
    opacity: 0.8;
}

/* Tablet Footer */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile Footer */
@media (max-width: 768px) {
    .site-footer {
        padding: 2rem 0 1rem;
    }

    .footer-container {
        padding: 0 1rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-column h3 {
        font-size: 0.95rem;
    }

    .footer-column a {
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   Back Link (Calculator Pages)
   ========================================================================== */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: gap 0.2s;
}

.back-link:hover,
.back-link:focus {
    gap: 0.75rem;
}

.back-link svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Page Header (Calculator Pages)
   ========================================================================== */

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.page-header .description {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 800px;
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-header .description {
        font-size: 1rem;
    }
}

/* ==========================================================================
   Results Branding
   ========================================================================== */

.results-attribution {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.05);
    border-left: 3px solid var(--accent-primary);
    border-radius: 4px;
}

.calculated-by {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.calculated-by strong {
    color: var(--accent-primary);
    font-weight: 600;
}

/* ==========================================================================
   Company Pages Styles
   ========================================================================== */

.company-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.company-page h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
}

.company-page h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.company-page h3 {
    font-size: 1.35rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.company-page p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.company-page ul,
.company-page ol {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

.company-page li {
    margin-bottom: 0.5rem;
}

.company-page a {
    color: var(--accent-primary);
    text-decoration: underline;
}

.company-page a:hover {
    color: var(--accent-secondary);
}

.company-page strong {
    color: var(--text-primary);
    font-weight: 600;
}

.company-page code {
    background: var(--bg-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.company-page pre {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.25rem;
}

/* Feature Grid for About/Methodology pages */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-card h3 {
    color: var(--accent-primary);
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.feature-card p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Contact Info Styles */
.contact-info {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.contact-info h2 {
    margin-top: 0;
}

.contact-info p {
    margin-bottom: 1rem;
}

.contact-info a {
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* FAQ Styles */
.faq-item {
    margin-bottom: 2rem;
}

.faq-item h3 {
    color: var(--accent-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.faq-item p {
    margin-bottom: 0;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .main-nav,
    .back-link {
        display: none;
    }

    .results-attribution {
        display: block !important;
        page-break-inside: avoid;
    }
}
