/**
 * Naravio Shared Styles
 * Used across all pages for consistent branding
 */

/* Reset & Variables */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-100: #dbeafe;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --bg: #ffffff;
    --bg-subtle: #f8fafc;
    --bg-gray: #f1f5f9;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --error: #ef4444;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== LAYOUT SHIFT PREVENTION ==================== */
/* Prevent layout shift while dynamic header/footer load */
#site-header {
    min-height: 72px;
}

#site-footer {
    min-height: 300px;
    background: var(--text);
}

@media (max-width: 768px) {
    #site-footer {
        min-height: 400px;
    }
}

/* ==================== NAVIGATION ==================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.nav.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    transition: opacity 0.2s;
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--bg-subtle);
}

.nav-links .dropdown {
    position: relative;
}

.nav-links .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.nav-links .dropdown-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.nav-links .dropdown:hover .dropdown-toggle svg {
    transform: rotate(180deg);
}

.nav-links .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.nav-links .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.nav-links .dropdown-menu a {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    border-radius: var(--radius-sm);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    padding: 24px;
    z-index: 999;
    overflow-y: auto;
}

.mobile-menu.open {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 16px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.mobile-menu .mobile-menu-section {
    margin-top: 24px;
}

.mobile-menu .mobile-menu-section h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: var(--bg-subtle);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-gray);
    border-color: var(--text-muted);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-subtle);
    color: var(--text);
}

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

.btn-white:hover {
    background: var(--bg-subtle);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--text);
    color: white;
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 48px;
    margin-bottom: 60px;
}

.footer-brand {}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.footer-logo-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.footer-tagline {
    font-size: 15px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 24px;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s;
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

.footer-column h4 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    font-size: 15px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-bottom-links a:hover {
    color: white;
}

/* ==================== PAGE SECTIONS ==================== */
.page-hero {
    padding: 140px 0 80px;
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg) 100%);
    text-align: center;
}

.page-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.page-hero h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--text);
}

.page-hero h1 span {
    color: var(--primary);
}

.page-hero p {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.page-hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-hero-image {
    margin-top: 60px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.page-hero-image img {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

/* Section styles */
.section {
    padding: 100px 0;
}

.section-gray {
    background: var(--bg-subtle);
}

.section-dark {
    background: var(--text);
    color: white;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    border-radius: 100px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== CTA SECTION ==================== */
.cta-section {
    padding: 80px 40px;
    background: var(--primary);
    border-radius: var(--radius-xl);
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-section > * {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 18px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section .btn-white {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ==================== CARDS ==================== */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-family: inherit;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ==================== COMPARISON TABLE ==================== */
.comparison-table-wrapper {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table thead {
    background: var(--bg-subtle);
}

.comparison-table th {
    padding: 24px;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.comparison-table th.tool-header {
    text-align: center;
    min-width: 150px;
}

.comparison-table th .tool-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.comparison-table th .tool-logo img {
    height: 32px;
    object-fit: contain;
}

.comparison-table th .tool-logo span {
    font-size: 16px;
    font-weight: 700;
}

.comparison-table td {
    padding: 20px 24px;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table .feature-name {
    font-weight: 500;
}

.comparison-table .check {
    color: var(--success);
    font-weight: 600;
    text-align: center;
}

.comparison-table .cross {
    color: var(--text-muted);
    text-align: center;
}

.comparison-table .partial {
    color: var(--warning);
    text-align: center;
}

.check-icon, .cross-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.check-icon {
    background: var(--success-bg);
    color: var(--success);
}

.cross-icon {
    background: #fef2f2;
    color: #ef4444;
}

/* ==================== UTILITIES ==================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mt-16 { margin-top: 64px; }

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.mb-12 { margin-bottom: 48px; }

.hidden { display: none; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .page-hero {
        padding: 120px 0 60px;
    }
    
    .page-hero h1 {
        font-size: 32px;
    }
    
    .page-hero p {
        font-size: 17px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .cta-section {
        padding: 48px 24px;
        border-radius: var(--radius-lg);
    }
    
    .cta-section h2 {
        font-size: 24px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 16px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .page-hero h1 {
        font-size: 28px;
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 15px;
    }

    .page-hero-cta {
        flex-direction: column;
    }

    .page-hero-cta .btn {
        width: 100%;
    }
}

/* ==================== LEGAL PAGES ==================== */
.page-header {
    padding: 140px 0 60px;
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg) 100%);
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.page-header p {
    font-size: 17px;
    color: var(--text-secondary);
}

.page-header .last-updated {
    color: var(--text-muted);
    font-size: 14px;
}

.legal-content {
    padding: 60px 0 100px;
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 48px 0 16px;
    color: var(--text);
}

.legal-content h2:first-of-type {
    margin-top: 0;
}

.legal-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text);
}

.legal-content p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.legal-content ul,
.legal-content ol {
    margin: 16px 0;
    padding-left: 24px;
    color: var(--text-secondary);
}

.legal-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.legal-content a {
    color: var(--primary);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

.legal-content strong {
    color: var(--text);
    font-weight: 600;
}

.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.legal-content th,
.legal-content td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.legal-content th {
    font-weight: 600;
    color: var(--text);
    background: var(--bg-subtle);
}

.highlight-box {
    background: var(--bg-gray);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 24px 0;
}

.highlight-box p {
    margin-bottom: 0;
}

/* ==================== FORM PAGES ==================== */
.form-card {
    background: var(--bg-subtle);
    border-radius: var(--radius-xl);
    padding: 40px;
}

.success-message {
    display: none;
    text-align: center;
    padding: 48px;
}

.success-message.show {
    display: block;
}

.success-message .icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.success-message h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.success-message p {
    color: var(--text-secondary);
}

/* ==================== CONTACT PAGE ==================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    padding: 40px 0 80px;
}

.contact-info h2 {
    font-size: 22px;
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
}

.contact-item-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.contact-item h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-item p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.contact-item a {
    color: var(--primary);
    text-decoration: none;
}

/* ==================== AFFILIATE PAGE ==================== */
.benefits {
    padding: 60px 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.benefit {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-subtle);
    border-radius: var(--radius-lg);
}

.benefit-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.benefit h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.benefit p {
    font-size: 14px;
    color: var(--text-secondary);
}

.form-section {
    padding: 60px 0;
}

.form-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

.form-section > p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* ==================== ADDITIONAL RESPONSIVE ==================== */
@media (max-width: 768px) {
    .page-header {
        padding: 120px 0 40px;
    }

    .legal-content {
        padding: 40px 0 60px;
    }

    .legal-content table {
        font-size: 14px;
    }

    .legal-content th,
    .legal-content td {
        padding: 10px 12px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 28px 24px;
    }

    .benefits {
        grid-template-columns: 1fr;
    }
}
