/* --- GLOBAL STYLES --- */

html {
    background-color: #f0f0f0;
    height: 100%;
}

body {
    background-color: #f0f0f0;
    background-image: url("https://www.transparenttextures.com/patterns/ag-square.png");
    font-family: sans-serif;
    margin: 0;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

#navbar-placeholder {
    height: 194px; /* This creates the actual space for your navbar */
}

/* Page container "box" */
#page-container {
    width: 600px;
    margin: 0 auto 20px auto;
    background-color: #ffffff;
    padding: 0px;
    border: 1px solid #ddd;
    position: relative;
    z-index: 1; /* Sits below the navbar */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
    animation: pop-in 0.5s ease-out 0.4s backwards;
}

/* This creates the top shadow *above* the container */
#page-container::before {
    content: '';
    position: absolute;
    /* This moves it 50px *above* the container's top edge */
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px; /* The 50px length you wanted */
    /* "Flipped": Fades from transparent (top) to solid (bottom) */
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgb(255, 255, 255) 100%
    );
    /* Sits on top of the container (1) but below the navbar (10) */
    z-index: 2;
    /* Let mouse clicks "pass through" the shadow */
    pointer-events: none;
}

/* This creates the bottom shadow *below* the container */
#page-container::after {
    content: '';
    position: absolute;
    /* This moves it 50px *below* the container's bottom edge */
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    /* Fades from solid (top) to transparent (bottom) */
    background: linear-gradient(
        to bottom,
        rgb(255, 255, 255) 0%,
        transparent 100%
    );
    /* Sits on top of the container (z-index: 1) */
    z-index: 2;
    /* Let mouse clicks "pass through" the shadow */
    pointer-events: none;
}

.main-content {
    /* * This adds:
     * 0px of padding to the top (to space it from the hero)
     * 25px of padding on the left and right
     * 25px of padding on the bottom
    */
    opacity: 0.7;
    margin-left: 25px;
    margin-right: 25px;
    border: 1px solid #ddd;
    padding: 0 25px 25px;
}

.fixed-bg-image {
    position: absolute;
    bottom: 0; /* Sticks it to the very bottom of the window */

    /* This calculates the 'auto' margin on the left of #page-container */
    right: calc((50vw - 200px) / 2);

    /* #page-container has z-index: 1, so this (0) sits behind it */
    z-index: 0;

    background-image: url('images/132666330_p2.jpg');
    background-repeat: no-repeat;
    background-size: contain;

    /* !! ADJUST width and height here !! */
    width: 300px;
    height: 300px;

    display: block;
    mix-blend-mode: color-burn;
}


/* --- HERO & SWIPER --- */

/* Container for the swiper */
#hero {
    margin: 20px -110px;
    padding: 4px 0;
    background-color: #ffffff;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    overflow: visible;
    position: relative;
    z-index: 2;

    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 60px, /* Fade stops 60px from the edge */
        black calc(100% - 60px),
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 60px,
        black calc(100% - 60px),
        transparent 100%
    );
}

/* The main Swiper container */
.swiper {
    width: 100%;
    margin: 0 auto;
    overflow: visible; /* Allows banners to "pop out" on hover */
}

/* --- SLIDES & BANNERS --- */

/* A single slide, set to the banner's width */
.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 234px;
}

/* The banner link itself */
.swiper-slide a {
    display: block;
    width: 100%;
    height: 50px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden; /* Clips image to rounded corners (when not hovered) */
    transition: transform 0.1s ease, box-shadow 0.3s ease;
    z-index: 1;
}

/* The image inside the link */
.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* The image inside the link */
.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Zoom/pop-out effect on hover */
.swiper-slide a:hover {
    transform: scale(1.15);
    position: relative;
    z-index: 10; /* Brings banner in front of others */
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    overflow: visible; /* Allows image to pop out of its box */
    
    /* --- MODIFICATION --- */
    /* This adds the 3D "camera" viewpoint */
    perspective: 800px;
}

/* This creates the CRT scan-line overlay */
/* This creates the CRT scan-line overlay */
/* --- MODIFICATION: Selector changed from 'a::after' to '.slide-content::after' --- */
.slide-content::after {
    content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;

	background-image:
		/* 1. Scan lines */
		repeating-linear-gradient(
			to bottom,
			transparent,
			transparent 2px,
			rgba(0, 0, 0, 0.1) 2px,
			rgba(0, 0, 0, 0.1) 3px
		),
		/* 2. Vignette */
		radial-gradient(
			ellipse at center,
			transparent 50%,
			rgba(0, 0, 0, 0.3) 100%
		);

	/* Define the size for each background image */
	background-size:
		100% 3px,  /* Size for scan lines */
		100% 100%; /* Size for vignette */

	z-index: 2; /* Sits on top of the image */
	animation: crt-flicker 0.04s steps(2, end) infinite;

    /* --- ADDITION --- */
    /* This ensures the overlay tilts correctly in 3D space */
    transform: translateZ(1px);
}

/* Animation for 25hz flicker (1 cycle = 0.04s) */
@keyframes crt-flicker {
    /*
     * Using steps(2), the animation will hold opacity: 1 for 0.02s,
     * then jump to opacity: 0.75 for the next 0.02s.
     */
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0.75;
    }
}

@keyframes pop-in {
    0% {
        opacity: 0;
        /* Start slightly smaller and 10px down */
        transform: scale(0.98) translateY(10px);
    }
    100% {
        opacity: 1;
        /* End at normal size and position */
        transform: scale(1) translateY(0);
    }
}

/* Disables the pop-in animation on subsequent page loads */
body.no-animation #page-container {
    animation: none;
}

/* --- RSS FEED STYLES --- */
.rss-feed-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.rss-feed-container h2 {
    margin-top: 0;
    color: #333;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.rss-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.rss-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.rss-item h3 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
}

.rss-item h3 a {
    color: #0066cc;
    text-decoration: none;
}

.rss-item h3 a:hover {
    text-decoration: underline;
}

.rss-date {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

.rss-description {
    margin: 0;
    color: #555;
    line-height: 1.5;
}