/* ===== VINTAGE STAMP COLLECTOR THEME ===== */
/* Riihimäen Postimerkkikerho - Est. 1948 */

:root {
    /* Aged paper and sepia tones */
    --parchment: #F4E4C1;
    --aged-paper: #E8D4A8;
    --old-paper-dark: #D4C4A0;
    --sepia: #704214;
    --sepia-light: #8B6914;
    
    /* Classic postal colors */
    --postal-red: #8B2332;
    --postal-red-dark: #6B1A26;
    --postal-blue: #1E3A5F;
    --postal-blue-light: #2C5282;
    
    /* Ink and accent colors */
    --ink-black: #2D2416;
    --ink-brown: #4A3728;
    --antique-gold: #B8860B;
    --bronze: #CD7F32;
    --wax-red: #8B0000;
    
    /* Faded tones */
    --faded-text: #5C4A3D;
    --muted-text: #7A6855;
}

/* Base styles */
body {
    font-family: 'Libre Baskerville', 'Georgia', serif;
    background-color: var(--parchment);
    color: var(--ink-brown);
    position: relative;
}

/* Aged paper texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1000;
}

/* Typography */
.font-display {
    font-family: 'Playfair Display', 'Georgia', serif;
}

.font-typewriter {
    font-family: 'Special Elite', 'Courier New', monospace;
}

.font-accent {
    font-family: 'Crimson Text', 'Georgia', serif;
}

/* Vintage text styles */
.text-vintage-heading {
    color: var(--sepia);
    text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
    letter-spacing: 0.05em;
}

/* Primary colors */
.bg-primary {
    background-color: var(--postal-red);
}

.text-primary {
    color: var(--postal-red);
}

.bg-secondary {
    background-color: var(--antique-gold);
}

.text-secondary {
    color: var(--antique-gold);
}

/* ===== STAMP BORDER EFFECT ===== */
.stamp-border {
    position: relative;
    background: var(--aged-paper);
    padding: 1.5rem;
}

.stamp-border::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: 
        radial-gradient(circle, transparent 4px, var(--aged-paper) 4px, var(--aged-paper) 6px, transparent 6px) 0 0 / 16px 16px,
        var(--parchment);
    z-index: -1;
}

/* Perforated edge cards */
.stamp-card {
    background: linear-gradient(135deg, #FFFEF5 0%, #F5EED6 100%);
    border: 1px solid var(--old-paper-dark);
    position: relative;
    box-shadow: 
        2px 2px 4px rgba(0,0,0,0.1),
        inset 0 0 20px rgba(139, 35, 50, 0.03);
}

.stamp-card::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 10px;
    right: 10px;
    height: 12px;
    background: radial-gradient(circle at center, transparent 4px, var(--parchment) 4px);
    background-size: 12px 12px;
    background-position: 0 6px;
}

.stamp-card::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 10px;
    right: 10px;
    height: 12px;
    background: radial-gradient(circle at center, transparent 4px, var(--parchment) 4px);
    background-size: 12px 12px;
    background-position: 0 0;
}

/* ===== NAVIGATION - Vintage postal style ===== */
nav.vintage-nav {
    background: linear-gradient(180deg, var(--postal-red) 0%, var(--postal-red-dark) 100%);
    border-bottom: 3px solid var(--antique-gold);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav-link {
    font-family: 'Special Elite', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--antique-gold) !important;
    text-shadow: 0 0 10px rgba(184, 134, 11, 0.5);
}

.nav-link.active {
    color: var(--antique-gold);
    font-weight: 600;
}

/* ===== PAGE HEADER ===== */
.page-header {
    background: 
        linear-gradient(135deg, var(--postal-red) 0%, var(--postal-red-dark) 50%, var(--postal-blue) 100%);
    border-bottom: 3px solid var(--antique-gold);
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 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' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%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");
    opacity: 0.5;
}

/* ===== HERO SECTION - Vintage envelope style ===== */
.hero-section {
    background: 
        linear-gradient(135deg, rgba(139,35,50,0.9) 0%, rgba(107,26,38,0.95) 50%, rgba(30,58,95,0.9) 100%),
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.02) 10px, rgba(255,255,255,0.02) 20px);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 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' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%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");
    opacity: 0.5;
}

.hero-section::after {
    content: '✦';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 3rem;
    color: var(--antique-gold);
    opacity: 0.3;
}

.hero-overlay {
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.4) 100%);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* ===== VINTAGE BUTTONS ===== */
.btn-primary {
    background: linear-gradient(180deg, var(--postal-red) 0%, var(--postal-red-dark) 100%);
    color: #F5EED6;
    padding: 14px 28px;
    border: 2px solid var(--antique-gold);
    font-family: 'Special Elite', monospace;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 
        3px 3px 0 var(--ink-brown),
        inset 0 1px 0 rgba(255,255,255,0.2);
    position: relative;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 
        5px 5px 0 var(--ink-brown),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-secondary {
    background: linear-gradient(180deg, var(--antique-gold) 0%, var(--bronze) 100%);
    color: var(--ink-black);
    padding: 14px 28px;
    border: 2px solid var(--sepia);
    font-family: 'Special Elite', monospace;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 
        3px 3px 0 var(--ink-brown),
        inset 0 1px 0 rgba(255,255,255,0.3);
    display: inline-block;
    text-decoration: none;
}

.btn-secondary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 
        5px 5px 0 var(--ink-brown),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

/* ===== VINTAGE CARDS ===== */
.card-vintage {
    background: linear-gradient(145deg, #FFFEF8 0%, #F5ECD0 100%);
    border: 1px solid var(--old-paper-dark);
    box-shadow: 
        4px 4px 0 rgba(74, 55, 40, 0.2),
        inset 0 0 30px rgba(139, 35, 50, 0.02);
    transition: all 0.3s ease;
    position: relative;
}

.card-vintage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at top left, rgba(255,255,255,0.5) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(139, 35, 50, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.card-vintage:hover {
    transform: translateY(-4px) rotate(-0.5deg);
    box-shadow: 
        6px 6px 0 rgba(74, 55, 40, 0.25),
        inset 0 0 30px rgba(139, 35, 50, 0.03);
}

/* ===== WAX SEAL DECORATION ===== */
.wax-seal {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, #C41E3A 0%, var(--wax-red) 50%, #5C0000 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--antique-gold);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 
        2px 2px 4px rgba(0,0,0,0.3),
        inset -2px -2px 4px rgba(0,0,0,0.2),
        inset 2px 2px 4px rgba(255,255,255,0.1);
    position: relative;
    flex-shrink: 0;
}

.wax-seal::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: radial-gradient(circle, transparent 60%, rgba(92,0,0,0.3) 100%);
    border-radius: 50%;
    z-index: -1;
}

/* ===== DECORATIVE DIVIDER ===== */
.vintage-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
}

.vintage-divider::before,
.vintage-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sepia), transparent);
}

.vintage-divider span {
    padding: 0 1rem;
    color: var(--antique-gold);
    font-size: 1.5rem;
}

/* ===== CALENDAR STYLES ===== */
.calendar-grid {
    max-width: 400px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s ease;
    font-family: 'Special Elite', monospace;
}

.calendar-day:hover {
    background-color: rgba(139, 35, 50, 0.1);
}

.calendar-day.has-event {
    background-color: rgba(184, 134, 11, 0.2);
    font-weight: 600;
    border: 1px dashed var(--antique-gold);
}

.calendar-day.has-event:hover {
    background-color: rgba(184, 134, 11, 0.3);
}

.event-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background-color: var(--postal-red);
    border-radius: 50%;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    color: var(--sepia);
    padding: 8px 4px;
    font-size: 0.75rem;
    font-family: 'Special Elite', monospace;
    text-transform: uppercase;
}

/* ===== VINTAGE STATISTICS BOX ===== */
.stats-vintage {
    background: 
        linear-gradient(135deg, var(--postal-red) 0%, var(--postal-red-dark) 50%, var(--postal-blue) 100%);
    border: 3px solid var(--antique-gold);
    position: relative;
}

.stats-vintage::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    pointer-events: none;
}

/* ===== EVENT CARDS ===== */
.event-card {
    background: linear-gradient(145deg, #FFFEF8 0%, #F5ECD0 100%);
    border-left: 4px solid var(--antique-gold);
    position: relative;
}

/* ===== FOOTER ===== */
footer.vintage-footer {
    background: 
        linear-gradient(180deg, var(--postal-red-dark) 0%, var(--ink-brown) 100%);
    border-top: 3px solid var(--antique-gold);
    position: relative;
}

footer.vintage-footer::before {
    content: '— Perustettu 1948 —';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--antique-gold);
    color: var(--ink-brown);
    padding: 4px 20px;
    font-family: 'Special Elite', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
}

/* ===== SPLIDE CAROUSEL ===== */
.splide__arrow {
    background: var(--postal-red);
    opacity: 0.9;
    border: 2px solid var(--antique-gold);
}

.splide__arrow:hover {
    opacity: 1;
    background: var(--postal-red-dark);
}

.splide__pagination__page.is-active {
    background: var(--antique-gold);
}

/* ===== IMAGE VINTAGE EFFECT ===== */
.img-vintage {
    filter: sepia(20%) contrast(95%) brightness(95%);
    border: 4px solid #FFF;
    box-shadow: 
        0 0 0 1px var(--old-paper-dark),
        4px 4px 8px rgba(0,0,0,0.2);
}

.img-vintage:hover {
    filter: sepia(5%) contrast(100%) brightness(100%);
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--antique-gold), var(--sepia), var(--antique-gold));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 50%;
    padding-right: 2rem;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 50%;
    padding-left: 2rem;
    text-align: left;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    top: 1rem;
    width: 20px;
    height: 20px;
    background: var(--postal-red);
    border: 4px solid var(--parchment);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: 0 0 0 2px var(--antique-gold);
}

.timeline-year {
    position: absolute;
    left: 50%;
    top: -0.5rem;
    background: var(--antique-gold);
    color: var(--ink-brown);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    transform: translateX(-50%);
    z-index: 10;
    font-family: 'Special Elite', monospace;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 1rem;
    }
    
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 3rem;
        margin-right: 0;
        padding-left: 1rem;
        padding-right: 0;
        text-align: left;
    }
    
    .timeline-marker {
        left: 1rem;
    }
    
    .timeline-year {
        left: 1rem;
    }
}

/* ===== FORM STYLES ===== */
.form-input {
    background: linear-gradient(145deg, #FFFEF8 0%, #F5ECD0 100%);
    border: 1px solid var(--old-paper-dark);
    padding: 0.75rem 1rem;
    font-family: 'Libre Baskerville', serif;
    color: var(--ink-brown);
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--antique-gold);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.2);
}

.form-input::placeholder {
    color: var(--muted-text);
    font-style: italic;
}

/* ===== FAQ STYLES ===== */
.faq-item {
    border-bottom: 1px solid var(--old-paper-dark);
}

.faq-question {
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: var(--postal-red);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.open {
    max-height: 200px;
}

/* ===== ANIMATIONS ===== */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ===== NOTIFICATION ===== */
.notification {
    min-width: 300px;
    font-family: 'Special Elite', monospace;
}

.notification.success {
    background-color: #2D5016;
    color: white;
}

.notification.error {
    background-color: var(--postal-red);
    color: white;
}

.notification.info {
    background-color: var(--postal-blue);
    color: white;
}

#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
}

/* ===== ORNAMENTAL HEADING ===== */
.ornament-heading {
    position: relative;
    display: inline-block;
}

.ornament-heading::before,
.ornament-heading::after {
    content: '❧';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--antique-gold);
    font-size: 1.2rem;
}

.ornament-heading::before {
    left: -2rem;
}

.ornament-heading::after {
    right: -2rem;
    transform: translateY(-50%) scaleX(-1);
}

/* ===== MEMBER CARD ===== */
.member-card {
    position: relative;
    overflow: hidden;
}

.member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.member-card:hover::before {
    left: 100%;
}

/* ===== IMAGE GALLERY ===== */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-image {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.05);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .calendar-grid {
        max-width: 100%;
    }
    
    .btn-primary, .btn-secondary {
        padding: 12px 20px;
        font-size: 0.75rem;
    }
    
    .ornament-heading::before,
    .ornament-heading::after {
        display: none;
    }
}
