@property --spot-x {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 10%;
}

@property --spot-y {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 10%;
}

/* --- 1. Global Reset & Layout --- */
html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    scroll-behavior: smooth;
    .inline-heading {
        display: inline;
    }
}

body {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    /* Smooth fade when the background image or color changes */
    transition: background 1.5s ease-in-out, color 1.5s ease-in-out;
}

/* --- 2. Page-Specific Backgrounds --- */
/* Default fallback */
body.bg-about { background-color: #f0f2f5; } 

/* Example with images */
body.bg-home { 
    background-image: url('/bg-pairnetics.png');
    background-repeat: repeat-y; 
}
body.bg-newsletter { background-color: #f0f2f5; } 
  
body.bg-contact { background-color: #f0f2f5; } 


/* --- 2. Centered & Responsive Navigation --- */
nav {
    display: flex;
    justify-content: center; /* Centers items horizontally */
    flex-wrap: wrap;         /* Allows items to stack on small screens */
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-bottom: 2px solid rgba(221, 221, 221, 0.5);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav a {
    text-decoration: none;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
    color: #007bff;
    transition: color 0.2s;
    letter-spacing: 0.2px; /* Slight spacing for a professional feel */
}

nav a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* --- 3. Content Area Wrapper --- */
/* This forces the Newsletter (and all pages) to be centered and 
   prevents them from floating up next to the nav */
.content-area {
    display: flex;
    flex-direction: column;
    align-items: center; 
    padding: 2rem;
    width: 100%;
    box-sizing: border-box;
    clear: both; 
}
/* Specific override for Home page text */
.home-content p {
    font-size: 1.25rem; /* Increases size by about 25% */
    line-height: 1.6;    /* Adds some breathing room between lines */
    max-width: 800px;   /* Keeps long lines of text from stretching too far */
    margin: 0 auto;     /* Centers the text block */
}

/* If you want the headings bigger too */
.home-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}
/* --- 4. Page Containers (Newsletter, About, etc.) --- */
.newsletter-container, .page-box {
    background: rgba(255, 255, 255, 0.85);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    width: 100%;
    /*max-width: 420px;  Limits width on desktop */
    box-sizing: border-box;
    transition: background-color 1.5s ease, color 1.5s ease;
    backdrop-filter: blur(5px);
}

h1, h2, h3 {
    margin-top: 0;
    color: inherit !important;
    text-align: center;
    font-family: "Baskerville", "Libre Baskerville", serif;
}

/* --- 5. Form Elements --- */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input, select, textarea, button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-sizing: border-box;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    margin-top: 5px;
}

button:hover { background-color: #0056b3; }

#countrySearch { background-color: #fff9e6; border-style: dashed; }

.success {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid #c3e6cb;
}
.book-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(225, 235, 220, 0.8); /* 0.8 transparency */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    align-items: flex-start;
}

/* Skinnier left column */
.book-cover {
    flex: 0 0 150px; /* Fixed width of 150px, won't grow or shrink */
    padding-top: 40px;
    display: flex;
    justify-content: center;
}

.book-cover img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
}

/* Wider right column */
.book-info {
    flex: 1; /* Takes up all remaining space */
    display: block;
    text-align: left;
    min-width: 0;
}

.book-info h3 {
    margin-top: 0;
    text-align: left; /* Overrides your global center align for h1/h2 */
}

.book-info i {
    display: inline; 
}

/* Responsive: stack them on mobile */
@media (max-width: 600px) {
    .book-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .book-info h3 {
        text-align: center;
    }
    .book-cover {
        flex: 0 0 auto;
        width: 120px;
    }
}

::selection {
    background: rgba(0, 123, 255, 0.25); /* Light blue tint */
    color: inherit;
}

.spot-box {
    position: relative;
    padding: 40px;
    background-color: #cdddcf; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    color: #000000;
    border-radius: 8px;
    overflow: hidden;
}

.spot-box::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* The "Spotlight" Gradient */
    /* We use CSS variables for the center point so we can animate them */
    background: radial-gradient(
        circle at var(--spot-x, 20%) var(--spot-y, 20%), 
        transparent 60% , 
        rgba(52, 72, 52, 0.85) 40%
    );
    
    pointer-events: none; /* Let the user still highlight text */
    animation: searchlight 14s infinite alternate ease-in-out;
}
/* The Animation Path */
@keyframes searchlight {
    0% {
        --spot-x: 10%;
        --spot-y: 10%;
    }
    25% {
        --spot-x: 80%;
        --spot-y: 20%;
    }
    50% {
        --spot-x: 20%;
        --spot-y: 80%;
    }
    75% {
        --spot-x: 90%;
        --spot-y: 70%;
    }
    100% {
        --spot-x: 50%;
        --spot-y: 50%;
    }
}
.dropdown-wrapper {
    position: relative; /* Keeps the list anchored to this spot */
    width: 100%;
    margin-bottom: 15px; /* Matches your other input spacing */
}

.search-box {
    width: 100%;
    box-sizing: border-box; /* Prevents width blowout */
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%; /* Sits exactly below the search-box */
    left: 0;
    width: 100%;
    /* max-height: 200px; */
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #ccc;
    z-index: 1000; /* High z-index so it floats OVER the textarea */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.dropdown-content.show {
    display: block !important;
}

.dropdown-content a {
    display: block;
    padding: 10px;
    color: #333;
    text-decoration: none;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #f0f0f0;
}

/* Shows the list when typing or clicking */
.show { display: block; }
.success-banner {
    background-color: rgba(225, 235, 220, 0.8); /* Light green background */
    color: #000000;            /* Dark green text */
    border: 1px solid #c3e6cb; /* Subtle green border */
    padding: 15px 20px;
    margin: 20px auto;         /* Centers the box horizontally */
    max-width: 600px;          /* Prevents it from stretching too wide */
    text-align: center;        /* Centers the text inside the box */
    border-radius: 5px;        /* Rounded corners */
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: block;            /* Ensures it takes up its own line */
}
