/* ============================================
   ChurchLinks.io - Shared Styles
   ============================================ */

/* CSS Variables for theming */
:root {
    /* Common colors */
    --color-text-primary: #030712;
    --color-text-secondary: #374151;
    --color-text-muted: #6b7280;
    --color-white: white;
    
    /* Page-specific colors (defaults to maintenance theme) */
    --color-accent: #0891b2;
    --color-accent-light: #06b6d4;
    --color-accent-dark: #0e7490;
    --color-accent-darker: #0e7490;
    --color-status-bg-start: #f0fdfa;
    --color-status-bg-end: #ecfeff;
    --color-status-border: #a5f3fc;
    --color-footer-text: rgba(255, 255, 255, 0.8);
}

/* Error page theme */
.theme-error {
    --color-accent: #dc2626;
    --color-accent-light: #ef4444;
    --color-accent-dark: #b91c1c;
    --color-accent-darker: #7f1d1d;
    --color-status-bg-start: #fef2f2;
    --color-status-bg-end: #fee2e2;
    --color-status-border: #fecaca;
    --color-footer-text: rgba(255, 255, 255, 0.9);
}

/* ============================================
   Base Styles
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Montserrat', system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--color-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Page-specific backgrounds */
body.bg-maintenance {
    background: linear-gradient(145deg, #e0f2fe 15%, #7dd3fc 45%, #0891b2 100%);
}

body.bg-error {
    background: linear-gradient(145deg, #7f1d1d 0%, #5c1515 40%, #3b0d0d 100%);
}

/* ============================================
   Layout Components
   ============================================ */

.container {
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.card {
    background: var(--color-white);
    border-radius: 2rem;
    padding: 3rem 2rem;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.05) inset;
    animation: fadeInUp 0.7s ease-out;
}

/* ============================================
   Logo Styles
   ============================================ */

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.logo-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.logo-image.animated {
    animation: logoPulse 2s ease-in-out infinite;
}

.logo-text {
    font-size: 2rem;
    text-transform: lowercase;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.7), 0 0 4px rgba(255, 255, 255, 0.5);
}

.logo-text .bold {
    font-weight: 700;
}

.logo-text .light {
    font-weight: 300;
}

/* ============================================
   Icon Styles
   ============================================ */

.icon-container {
    margin-bottom: 1.5rem;
}

.page-icon {
    width: 80px;
    height: 80px;
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.page-icon svg {
    width: 40px;
    height: 40px;
    color: var(--color-white);
}

/* Maintenance icon */
.page-icon.maintenance-icon {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    animation: float 3s ease-in-out infinite;
}

/* Error icon */
.page-icon.error-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation: errorPulse 2s ease-in-out infinite;
}

/* ============================================
   Typography
   ============================================ */

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ============================================
   Status Container
   ============================================ */

.status-container {
    background: linear-gradient(135deg, var(--color-status-bg-start) 0%, var(--color-status-bg-end) 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--color-status-border);
}

.status-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.status-text {
    font-size: 1rem;
    color: var(--color-accent-dark);
    font-weight: 500;
}

/* Progress bar (maintenance page) */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #e0f2fe;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #06b6d4, #0891b2);
    border-radius: 3px;
    animation: progress 2s ease-in-out infinite;
    width: 30%;
}

/* Suggestions (error page) */
.suggestions {
    text-align: left;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-status-border);
}

.suggestions-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestions li {
    font-size: 0.875rem;
    color: var(--color-accent-darker);
    padding: 0.375rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.suggestions li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--color-accent);
}

.suggestions li a {
    color: var(--color-accent);
    font-weight: 500;
    text-decoration: none;
}

.suggestions li a:hover {
    text-decoration: underline;
}

/* ============================================
   Buttons
   ============================================ */

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-accent) 100%);
    color: var(--color-white);
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-text-secondary);
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-2px);
}

/* ============================================
   Contact & Footer
   ============================================ */

.contact-info {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.contact-info a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-info a:hover {
    color: var(--color-accent-dark);
    text-decoration: underline;
}

.footer {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: var(--color-footer-text);
    animation: fadeInUp 0.7s ease-out 0.3s both;
}

.footer a {
    color: var(--color-white);
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    text-decoration: underline;
}

/* ============================================
   Background Decorations - Shared
   ============================================ */

.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

/* Maintenance page circles */
.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.bg-circle-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
}

.bg-circle-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: -50px;
}

.bg-circle-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 10%;
    opacity: 0.5;
}

/* Error page stripes */
.bg-stripes {
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 40px,
        rgba(0, 0, 0, 0.15) 40px,
        rgba(0, 0, 0, 0.15) 80px
    );
    animation: stripeMove 20s linear infinite;
}

.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(185, 28, 28, 0.4) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: glowPulse 3s ease-in-out infinite;
}

.bg-vignette {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(30, 10, 10, 0.5) 100%);
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes errorPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(220, 38, 38, 0);
    }
}

@keyframes progress {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(400%);
    }
}

@keyframes stripeMove {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(113px);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* ============================================
   Responsive Styles
   ============================================ */

@media (max-width: 640px) {
    body {
        padding: 1rem;
    }

    .card {
        padding: 2rem 1.5rem;
        border-radius: 1.5rem;
    }

    .logo-image {
        width: 50px;
        height: 50px;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .page-icon {
        width: 64px;
        height: 64px;
        border-radius: 1rem;
    }

    .page-icon svg {
        width: 32px;
        height: 32px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

