/**
 * Cathedral Pro Page Styles
 * Modern, clean design inspired by Snapshot Pro
 */

/* ========================================
   CSS Variables (fallbacks for this page)
   ======================================== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f8f8;
    --bg-tertiary: #f0f0f0;
    --text-primary: #1a1a1a;
    --text-secondary: #6b6b6b;
    --text-tertiary: #9a9a9a;
    --primary-color: #1a1a1a;
    --border-color: #e8e8e8;
}

/* ========================================
   Base & Reset
   ======================================== */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* ========================================
   Navigation
   ======================================== */

.pro-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 16px 40px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.pro-nav-left {
    display: flex;
    align-items: center;
}

.pro-nav-center {
    display: flex;
    justify-content: center;
}

.pro-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 20px;
}

.pro-nav-logo svg {
    color: var(--primary-color);
}

.pro-nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* Back Link */
.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--text-primary);
}

.back-link svg {
    flex-shrink: 0;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu-trigger:hover {
    background: var(--bg-secondary);
    border-color: var(--text-tertiary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar span {
    color: #ffffff;
    line-height: 1;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s;
    z-index: 200;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-item:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 12px 12px;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* ========================================
   Hero Section
   ======================================== */

.pro-hero {
    position: relative;
    padding: 80px 40px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(180deg, #f0f0f0 0%, var(--bg-primary) 100%);
}

.pro-hero-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Geometric shapes for hero */
.geo-shape {
    position: absolute;
    color: #888;
}

.geo-shape-1 {
    width: 280px;
    height: 280px;
    top: -80px;
    right: 10%;
    animation: float 20s ease-in-out infinite;
}

.geo-shape-2 {
    width: 400px;
    height: 400px;
    bottom: -150px;
    left: 5%;
    animation: float 25s ease-in-out infinite reverse;
}

.geo-shape-3 {
    width: 200px;
    height: 200px;
    top: 40%;
    right: 5%;
    animation: float 18s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(3deg);
    }
}

.pro-hero-content {
    position: relative;
    z-index: 1;
}

.pro-badge {
    display: inline-block;
    background: var(--text-primary);
    color: white;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 8px 20px;
    border-radius: 24px;
    margin-bottom: 24px;
}

.pro-hero h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    color: var(--text-primary);
}

/* ========================================
   Pricing Section
   ======================================== */

.pro-pricing {
    padding: 60px 40px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.pricing-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.pricing-option {
    display: block;
    cursor: pointer;
}

.pricing-option input {
    display: none;
}

.pricing-option-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.pricing-option:hover .pricing-option-content {
    border-color: var(--text-secondary);
}

.pricing-option.selected .pricing-option-content,
.pricing-option input:checked + .pricing-option-content {
    border-color: var(--text-primary);
    background: var(--bg-secondary);
}

.pricing-label-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pricing-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.pricing-savings {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.pricing-amount {
    font-size: 16px;
    color: var(--text-secondary);
}

.pricing-amount strong {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.pricing-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pricing-actions .btn-lg {
    padding: 16px 48px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 24px;
}

.pricing-contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.pricing-contact:hover {
    text-decoration: underline;
}

/* Login Notice */
.login-notice,
.already-pro-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.login-notice a {
    color: var(--primary-color);
    font-weight: 600;
}

.already-pro-notice {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #15803d;
}

.already-pro-notice svg {
    color: #22c55e;
}

/* ========================================
   Features Section
   ======================================== */

.pro-features {
    padding: 80px 40px;
    max-width: 1000px;
    margin: 0 auto;
}

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

.section-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: var(--text-tertiary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    color: var(--text-secondary);
}

/* Hero Feature Card (Innovation Challenges) */
.feature-hero {
    grid-column: span 2;
    position: relative;
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
    border: 2px solid var(--text-primary);
    overflow: hidden;
}

.feature-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--text-primary) 0%, #6366f1 50%, var(--text-primary) 100%);
    background-size: 200% 100%;
    animation: shimmerLine 3s ease-in-out infinite;
}

@keyframes shimmerLine {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: 0% 0; }
}

.feature-hero:hover {
    border-color: var(--text-primary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* NEW Badge */
.feature-new-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--text-primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(26, 26, 26, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(26, 26, 26, 0); }
}

.feature-new-badge svg {
    stroke: white;
}

/* Gradient Icon */
.feature-icon-gradient {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--text-primary) 0%, #6366f1 100%);
    border-radius: 14px;
    color: white;
}

.feature-icon-gradient svg {
    stroke: white;
}

/* Feature Highlights */
.feature-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.feature-highlight-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.feature-highlight-item svg {
    flex-shrink: 0;
    color: var(--text-secondary);
}

/* Hero Subtitle */
.pro-hero-subtitle {
    margin-top: 16px;
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 500;
}

.hero-highlight {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--text-primary) 0%, #6366f1 100%);
    color: white;
    font-weight: 600;
    border-radius: 20px;
    margin-right: 8px;
    font-size: 14px;
}

/* ========================================
   Limits Section
   ======================================== */

.pro-limits {
    padding: 80px 40px;
    background: var(--bg-secondary);
}

.pro-limits .section-header {
    max-width: 800px;
    margin: 0 auto 48px;
}

.limits-table-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

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

.limits-table th,
.limits-table td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.limits-table th {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
}

.limits-table th:first-child {
    width: 50%;
}

.limits-table th:not(:first-child) {
    text-align: center;
}

.limits-table td {
    font-size: 15px;
    color: var(--text-secondary);
}

.limits-table td:first-child {
    font-weight: 500;
    color: var(--text-primary);
}

.limits-table td:not(:first-child) {
    text-align: center;
}

.limits-table td.highlight {
    font-weight: 600;
    color: var(--text-primary);
}

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

/* Feature Row Highlight (Innovation Challenges) */
.feature-row-highlight {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.05) 0%, rgba(99, 102, 241, 0.1) 50%, rgba(99, 102, 241, 0.05) 100%);
}

.feature-row-highlight td {
    border-bottom: none !important;
}

.feature-name-with-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.table-new-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--text-primary);
    color: white;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 10px;
}

.feature-unavailable {
    color: var(--text-tertiary);
    opacity: 0.5;
}

.feature-available {
    color: #22c55e;
}

/* ========================================
   Why Pro Section
   ======================================== */

.pro-why {
    padding: 80px 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.why-pro-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}

.why-pro-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s ease;
}

.why-pro-card:hover {
    border-color: var(--text-tertiary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-4px);
}

.why-pro-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--text-primary) 0%, #6366f1 100%);
    border-radius: 14px;
    color: white;
    margin-bottom: 20px;
}

.why-pro-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.why-pro-card p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    color: var(--text-secondary);
}

/* Testimonial */
.pro-testimonial {
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    position: relative;
}

.testimonial-quote {
    position: relative;
}

.quote-icon {
    position: absolute;
    top: -10px;
    left: -10px;
    color: var(--text-tertiary);
    opacity: 0.3;
}

.testimonial-quote p {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-primary);
    margin: 0;
    font-style: italic;
    padding-left: 32px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.author-avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--text-primary) 0%, #6366f1 100%);
    border-radius: 50%;
    color: white;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.author-role {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ========================================
   CTA Section
   ======================================== */

.pro-cta {
    position: relative;
    padding: 80px 40px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(180deg, var(--bg-primary) 0%, #f0f0f0 100%);
}

.pro-cta-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Geometric shapes for CTA */
.geo-cta-1 {
    width: 500px;
    height: 500px;
    top: -200px;
    left: 10%;
    animation: float 22s ease-in-out infinite;
}

.geo-cta-2 {
    width: 350px;
    height: 350px;
    bottom: -100px;
    right: 8%;
    animation: float 24s ease-in-out infinite reverse;
}

.pro-cta-content {
    position: relative;
    z-index: 1;
}

.pro-cta h2 {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: var(--text-primary);
}

.btn-dark {
    background: var(--text-primary);
    color: white;
    border: none;
}

.btn-dark:hover {
    background: #333;
}

/* CTA Actions */
.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.cta-scroll-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 24px;
    transition: all 0.3s ease;
}

.cta-scroll-link:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

.cta-scroll-link svg {
    transition: transform 0.3s ease;
    animation: bounce-up 2s ease-in-out infinite;
}

.cta-scroll-link:hover svg {
    animation: none;
    transform: translateY(-4px);
}

@keyframes bounce-up {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* ========================================
   Footer
   ======================================== */

.pro-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 40px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
}

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* ========================================
   Modal
   ======================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: var(--bg-primary);
    border-radius: 20px;
    max-width: 440px;
    width: 100%;
    position: relative;
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-content {
    padding: 48px 40px;
    text-align: center;
}

.modal-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary-color), #6366f1);
    border-radius: 50%;
    color: white;
}

.modal-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px 0;
}

.modal-plan-summary {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
}

.modal-org-info {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 32px 0;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-actions .btn-lg {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    border-radius: 12px;
}

.modal-note {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 0;
}

/* ========================================
   Utility Classes
   ======================================== */

.hidden {
    display: none !important;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .pro-nav {
        grid-template-columns: auto 1fr auto;
        padding: 16px 20px;
        gap: 12px;
    }

    .pro-nav-center {
        display: none;
    }

    .back-link span {
        display: none;
    }

    .user-name {
        display: none;
    }

    .user-menu-trigger {
        padding: 4px;
    }

    /* Hide geometric shapes on mobile for performance */
    .geo-shape {
        display: none;
    }

    .pro-hero {
        padding: 60px 20px;
    }

    .pro-hero h1 {
        font-size: 32px;
    }

    .pro-pricing {
        padding: 40px 20px;
    }

    .pricing-option-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .pro-features {
        padding: 60px 20px;
    }

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

    .feature-hero {
        grid-column: span 1;
    }

    .feature-new-badge {
        top: 12px;
        right: 12px;
        padding: 4px 10px;
        font-size: 10px;
    }

    .feature-highlights {
        flex-direction: column;
    }

    .pro-hero-subtitle {
        font-size: 15px;
        line-height: 1.5;
    }

    .hero-highlight {
        display: block;
        width: fit-content;
        margin: 0 auto 8px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .pro-limits {
        padding: 60px 20px;
    }

    .limits-table th,
    .limits-table td {
        padding: 12px 16px;
        font-size: 14px;
    }

    .feature-name-with-badge {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .pro-why {
        padding: 60px 20px;
    }

    .why-pro-grid {
        grid-template-columns: 1fr;
    }

    .why-pro-card {
        padding: 24px;
    }

    .pro-testimonial {
        padding: 28px;
    }

    .testimonial-quote p {
        font-size: 16px;
        padding-left: 24px;
    }

    .testimonial-author {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .pro-cta {
        padding: 60px 20px;
    }

    .pro-cta h2 {
        font-size: 28px;
    }

    .pro-footer {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 24px 20px;
    }

    .modal-content {
        padding: 40px 24px;
    }
}
