/* Global Styles - ALJOHN POLYGLOT LIBRARY - HIGH SEAS EDITION */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;1,300;1,400&family=Pirata+One&family=IM+Fell+English+SC&display=swap');

:root {
    /* Color Palette */
    --parchment-bg: #fdf5e6;       /* Aged parchment / faded map beige */
    --ocean-blue-deep: #00425A;    /* Deep ocean blue for accents, text */
    --ocean-blue-medium: #1F8A70;  /* Medium sea green/blue for highlights */
    --weathered-wood-dark: #6F4E37;/* Dark weathered wood brown */
    --weathered-wood-light: #A0522D;/* Lighter sienna wood */
    --gold-trim: #B8860B;          /* DarkGoldenRod for gold trim */
    --ink-black: #2c2c2c;          /* For primary text, like old ink */
    --highlight-text: #FFF8DC;     /* Cornsilk for text on dark backgrounds */
    --danger-red: #8B0000;         /* Dark red for warnings or pirate accents */

    /* Fonts */
    --font-body: 'Merriweather', serif;
    --font-headings: 'Pirata One', cursive; /* Pirate-y, distinct */
    --font-display: 'IM Fell English SC', serif; /* Old map/document style */

    /* Textures (placeholders, actual images to be used) */
    --texture-parchment: url('../images/assets/parchment_texture_light.png'); /* Create or find this */
    --texture-wood: url('https://www.transparenttextures.com/patterns/wood-pattern.png'); /* User provided, ensure it's hosted */

    /* Tips Section Palettes */
    --readera-primary: #0c71bd;
    --readera-secondary: #f3951c;
    --readera-bg: #fefbec;
    --immersive-primary: #e7576d;
    --immersive-secondary: #fff1c9;
    --immersive-bg: #fffaf0; /* Light bg for immersive */

    --title-font-pirate: 'Pirata One', cursive;
    --body-font-pirate: 'IM Fell English SC', serif;

    --section-bg-deep-wood: #cc8800;

      --pirate-navbar-bg: #2c3e50; /* Deep sea blue / Dark slate */
    --pirate-navbar-bg-scrolled: rgba(44, 62, 80, 0.95); /* Semi-transparent on scroll */
    --pirate-navbar-text: #ecf0f1; /* Off-white / Silver for text */
    --pirate-navbar-text-rgb: 236, 240, 241;
    --pirate-gold-accent: #f1c40f; /* Bright, pirate gold */
    --pirate-gold-accent-rgb: 241, 196, 15;
    --pirate-gold-deep: #c09808; /* Darker, aged gold */
    --pirate-red-accent: #e74c3c; /* Pirate flag red / accent red */
    --pirate-red-deep: #c0392b;

    /* Surfaces & Text */
    --parchment-bg: #fdf5e6; /* Aged paper for dropdowns, modals */
    --ink-on-parchment: #4a3b30; /* Dark brown text on parchment */
    --text-on-dark-bg: #bdc3c7; /* Lighter grey for less emphasis on dark bg */

    /* Footer */
    --pirate-footer-bg: #1e2b37; /* Very dark blue, almost black */
    --pirate-footer-text: #95a5a6; /* Muted silver/grey */
    --pirate-footer-link-hover: var(--pirate-gold-accent);

    /* Typography (Update with your chosen pirate/nautical fonts) */
    --font-pirate-header: 'Pirata One', cursive; /* For main titles, logo */
    --font-pirate-body: 'Merriweather Sans', sans-serif; /* Readable body text */
    --font-pirate-script: 'Seaweed Script', cursive; /* Optional for accents */

    /* Other UI Elements */
    --page-padding: 20px; /* Consistent page padding */
    --border-radius-main: 6px;

    --sunrise-gold-soft: #FFEBAD; /* Pale, soft gold of early sunrise */
    --sunrise-gold-soft-rgb: 255, 235, 173;
    --sunrise-orange-glow: #FFCC5C; /* Warmer orange-gold */
    --dawn-sky-blue: #ADD8E6;    /* Light, clear sky blue (can adjust to #a0d2eb if preferred) */
    --morning-sea-blue: #6CA8D2;  /* Calm, medium azure blue */
    --morning-sea-blue-rgb: 108, 168, 210;
    --launchpad-text-dark: #2c506e;  /* A deep but not black blue for text, for good contrast */
    --launchpad-text-light: #f0f8ff; /* Alice blue / very light for text on darker accents */
    --translucent-scroll-bg: rgba(245, 248, 255, 0.75); /* For the subtitle backing */
}

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
nav li.dropdown .dropdown-content a {
    color: var(--pirate-deep-sea-blue); /* or whatever style you need */
}
nav li.dropdown .dropdown-content a:hover {
    color: #000 !important; /* darker on hover */
}

body {
    font-family: var(--font-body);
    color: var(--ink-black);
    background-color: var(--weathered-wood-dark); /* Fallback color */
    background-image: var(--texture-wood);
    /* This is mostly intended for prototyping; please download the pattern and re-host for production environments. Thank you! */
    line-height: 1.7;
    font-size: 16px; /* Base font size */
}

#page-container {
    width: 99%;
    max-width: 1800px; /* Wider for a rich layout */
    margin:  auto;
    background-color: var(--parchment-bg);
    /* background-image: var(--texture-parchment); */ /* Uncomment if you have a parchment texture */
    box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.6); /* Like an old chest casting a shadow */
    border: 8px solid var(--weathered-wood-light); /* Thick wooden frame */
    border-image: url('../images/assets/rope_border.png') 30 stretch; /* Optional: if you have a rope border image */
    border-radius: 3px; /* Subtle rounding */
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    color: var(--ocean-blue-deep);
    margin-bottom: 0.6em;
    line-height: 1.3;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
}
.library-title { font-size: 3.5rem; color: var(--gold-trim); letter-spacing: 1px; }
.headline { font-size: 2.5rem; color: var(--ocean-blue-medium); font-family: var(--font-display); }
.section-title { font-size: 2.8rem; text-align: center; margin-bottom: 1.5em; color: var(--weathered-wood-dark); }
h3 { font-size: 1.7rem; }

p {
    margin-bottom: 1.2em;
}

a {
    color: var(--ocean-blue-medium);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--gold-trim);
    text-decoration: underline;
}

/* Buttons */
.cta-button, .tip-button, .download-btn, #reset-filters-btn, #send-chat-message-btn, #reveal-riddle-hint-btn, .prank-link-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--ocean-blue-deep);
    color: var(--highlight-text);
    font-family: var(--font-headings);
    font-size: 1.1rem;
    text-decoration: none;
    border: 3px solid var(--gold-trim);
    border-radius: 50px; /* Pill shaped for a slightly softer look */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
    letter-spacing: 0.5px;
}
.cta-button:hover, .tip-button:hover, .download-btn:hover, #reset-filters-btn:hover, #send-chat-message-btn:hover, #reveal-riddle-hint-btn:hover, .prank-link-button:hover {
    background-color: var(--gold-trim);
    color: var(--ink-black);
    border-color: var(--ocean-blue-deep);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 3px 5px 8px rgba(0,0,0,0.4);
}
.main-cta { font-size: 1.4rem; padding: 15px 35px; }

/* Section Styling */
section {
    padding: 50px 30px;
    border-bottom: 3px dashed var(--weathered-wood-light); /* Separator */
}


/* Utility for hiding elements */
.hidden {
    display: none !important;
}

/* For icons next to text */
i.fas {
    margin-right: 8px;
    color: var(--ocean-blue-medium);
}

/* Basic Grid for book cards */
.book-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

/* Placeholder image styling */
img {
    max-width: 100%;
    height: auto;
    display: block;
}