/**
 * Public Pages CSS - Landing & Updates
 * Ammattimainen MekryPro-tyyli etusivulle ja päivitykset-sivulle
 * @author    Kaido Mägi
 * @copyright 2025
 */

/* ============================================================
   PUBLIC PAGE LAYOUT (ei sidebaria)
   ============================================================ */

body.public-page {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 48px; /* Topbarin korkeus */
    padding: 0;
    box-sizing: border-box;
}

/* Sticky footer layout for updates page */
body.updates-page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.updates-page-wrapper main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

body.updates-page-wrapper footer {
    margin-top: auto;
}

.public-page-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ============================================================
   HERO SECTION (Etusivu)
   ============================================================ */

.landing-hero {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    padding: 100px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.landing-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.landing-hero h1 {
    font-size: 3.5rem;
    margin: 0 0 24px 0;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.landing-hero .hero-subtitle {
    font-size: 1.5rem;
    margin: 0 0 40px 0;
    opacity: 0.95;
    line-height: 1.5;
    font-weight: 400;
}

.landing-hero .hero-description {
    font-size: 1.1rem;
    margin: 20px 0;
    opacity: 0.9;
    line-height: 1.6;
}

.landing-hero .hero-cta-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

/* CTA Buttons */
.landing-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    background: #ffffff;
    color: #2563eb;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    min-width: 160px;
}

.landing-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: #1d4ed8;
}

.landing-cta-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.landing-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.landing-hero .hero-link {
    color: white;
    text-decoration: underline;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.landing-hero .hero-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.hero-login-link {
    margin-top: 24px;
    font-size: 1rem;
}

/* ============================================================
   CONTENT SECTIONS
   ============================================================ */

.landing-section {
    padding: 80px 20px;
}

.landing-section-alt {
    background: #f9fafb;
}

.landing-section-content {
    max-width: 1200px;
    margin: 0 auto;
}

.landing-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin: 0 0 24px 0;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.landing-section .section-description {
    max-width: 800px;
    margin: 0 auto 60px;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4b5563;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */

.landing-about {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.landing-about p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
    margin: 0 0 24px 0;
}

.landing-about p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   FEATURES GRID
   ============================================================ */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.feature-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    min-height: 240px;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #2563eb;
}

.feature-card-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    line-height: 1;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin: 0 0 12px 0;
    color: #111827;
    font-weight: 600;
}

.feature-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
    flex: 1;
}

.feature-card .feature-cta {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 0.95rem;
}

/* ============================================================
   PRICING SECTION
   ============================================================ */

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

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.pricing-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #2563eb;
}

.pricing-card.recommended {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.pricing-card.recommended::before {
    content: 'Suositeltu';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #2563eb;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin: 0 0 12px 0;
    color: #111827;
    font-weight: 600;
}

.pricing-card .pricing-description {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: 700;
    color: #2563eb;
    margin: 24px 0 8px 0;
    line-height: 1;
}

.pricing-card .price span {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 400;
}

.pricing-card .price-yearly {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 12px 0 24px 0;
}

.pricing-card ul {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.pricing-card ul li {
    margin: 12px 0;
    padding-left: 24px;
    position: relative;
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.5;
}

.pricing-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 700;
}

.pricing-card .pricing-cta {
    width: 100%;
    margin-top: 24px;
    padding: 14px 24px;
    font-size: 1rem;
}

.pricing-card .pricing-note {
    margin-top: 20px;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}

.pricing-link {
    color: #2563eb;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.pricing-link:hover {
    color: #1d4ed8;
}

/* ============================================================
   ACCOUNT CLOSED / COMPANY ARCHIVED PAGES
   ============================================================ */
.status-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    padding: 20px;
    box-sizing: border-box;
}

.status-page-container {
    background: #fff;
    border-radius: 12px;
    padding: 48px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.status-page-container h1 {
    color: #dc2626;
    margin: 0 0 16px 0;
    font-size: 28px;
}

.status-page-container p {
    color: #6b7280;
    line-height: 1.6;
    margin: 16px 0;
}

.status-page-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.status-page-container ul {
    text-align: left;
    color: #6b7280;
    line-height: 1.8;
    margin: 16px 0;
}

.status-page-link {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.status-page-link:hover {
    text-decoration: underline;
    color: #1d4ed8;
}

.status-page-button {
    display: inline-block;
    padding: 12px 24px;
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 24px;
    transition: background 0.2s ease;
}

.status-page-button:hover {
    background: #1d4ed8;
}

.pricing-trial-info {
    text-align: center;
    color: #6b7280;
    font-size: 0.95rem;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e5e7eb;
}

/* ============================================================
   UPDATES PAGE
   ============================================================ */

/* Updates page - ensure footer stays at bottom */
.updates-page {
    padding: 60px 20px;
    min-height: 0; /* Allow flex to control height */
}

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

.updates-badge {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.updates-header h1 {
    font-size: 2.25rem;
    margin: 0 0 12px 0;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.updates-header .updates-description {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.6;
    color: #6b7280;
}

.updates-list {
    max-width: 1000px;
    margin: 0 auto;
}

.update-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.update-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

.update-item.is-open {
    border-color: #2563eb;
}

.update-header-btn {
    width: 100%;
    background: none;
    border: none;
    padding: 28px 32px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: block;
}

.update-header-btn:hover {
    background-color: #f9fafb;
}

.update-header-btn:focus {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
}

.update-content {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 24px;
    align-items: flex-start;
}

.update-date-col {
    display: flex;
    align-items: flex-start;
}

.update-date {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
}

.update-main-col {
    flex: 1;
    min-width: 0;
}

.update-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.4;
    pointer-events: none;
}

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

.update-version {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    min-width: 60px;
    text-align: center;
}

.update-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 0.75rem;
    transition: transform 0.3s ease, color 0.2s ease;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.update-item.is-open .update-chevron {
    transform: rotate(180deg);
    color: #2563eb;
}

.update-content-wrapper {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 0 32px;
}

.update-content-body {
    padding-bottom: 28px;
}

.update-changes {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.update-changes li {
    position: relative;
    margin: 6px 0;
    color: #4b5563;
    line-height: 1.6;
    font-size: 0.9375rem;
    padding-left: 8px;
}

.update-changes li::before {
    content: '•';
    position: absolute;
    left: -16px;
    color: #2563eb;
    font-weight: bold;
    font-size: 1.1rem;
}

/* ============================================================
   MAINTENANCE PAGE
   ============================================================ */

.maintenance-page {
    padding: 60px 20px;
    min-height: calc(100vh - 48px - 200px); /* Topbar + footer */
    display: flex;
    align-items: center;
    justify-content: center;
}

.maintenance-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.maintenance-icon {
    font-size: 5rem;
    margin-bottom: 24px;
    line-height: 1;
}

.maintenance-card h1 {
    font-size: 2.5rem;
    margin: 0 0 20px 0;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.maintenance-description {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #6b7280;
    margin: 0 0 24px 0;
}

.maintenance-eta {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #4b5563;
    margin: 0 0 32px 0;
    font-weight: 500;
}

.maintenance-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

.maintenance-actions .landing-cta {
    min-width: 180px;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    body.public-page {
        padding: 0;
    }
    
    .public-page-container {
        padding: 0 16px;
    }
    
    .landing-hero {
        padding: 60px 16px;
    }
    
    .landing-hero h1 {
        font-size: 2.5rem;
    }
    
    .landing-hero .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .landing-hero .hero-cta-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .landing-cta {
        width: 100%;
    }
    
    .landing-section {
        padding: 60px 16px;
    }
    
    .landing-section h2 {
        font-size: 2rem;
    }
    
    .landing-section .section-description {
        font-size: 1rem;
        margin-bottom: 40px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .feature-card {
        min-height: auto;
        padding: 24px;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .pricing-card {
        padding: 32px 24px;
    }
    
    .update-item {
        border-radius: 10px;
    }
    
    .update-header-btn {
        padding: 20px;
    }
    
    .update-content {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .update-date-col {
        order: 2;
    }
    
    .update-main-col {
        order: 1;
    }
    
    .update-actions-col {
        order: 3;
        justify-content: space-between;
        width: 100%;
    }
    
    .update-title {
        font-size: 1.125rem;
    }
    
    .update-content-wrapper {
        padding: 0 20px;
    }
    
    .update-content-body {
        padding-bottom: 20px;
    }
    
    .updates-header h1 {
        font-size: 1.875rem;
    }
    
    .updates-header {
        margin-bottom: 36px;
    }
    
    .maintenance-page {
        padding: 40px 16px;
    }
    
    .maintenance-card {
        padding: 40px 24px;
    }
    
    .maintenance-card h1 {
        font-size: 2rem;
    }
    
    .maintenance-description {
        font-size: 1.1rem;
    }
    
    .maintenance-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .maintenance-actions .landing-cta {
        width: 100%;
    }
}

