/* --- Global Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}

body {
    font-family: 'Poppins', sans-serif; /* Use Google Font */
    line-height: 1.7;
    color: #444;
    background-color: #f9f9f9; /* Light background for sections below hero */
    padding-top: 70px; /* *** NEW: Add padding to body to prevent content hiding behind fixed header *** */
}

h1, h2, h3 {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5em;
}

p {
    margin-bottom: 1em;
    color: #555;
}

a {
    text-decoration: none;
    color: #007bff; /* Default link color */
}

img {
    max-width: 100%;
    display: block;
}

section {
    padding: 80px 20px; /* Vertical padding for sections */
}

.container { /* Optional utility class if needed */
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- NEW: Header and Navigation Bar --- */
#main-header {
    background-color: #fff; /* White background */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    position: fixed; /* Stick to the top */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Ensure it's above other content */
    height: 70px; /* Fixed height */
    padding: 0 20px; /* Horizontal padding */
    display: flex;
    align-items: center; /* Vertically center content */
}

#main-header nav {
    width: 100%; /* Take full width within header */
    display: flex;
    justify-content: space-between; /* Space between brand and links */
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333; /* Dark color for brand */
    text-decoration: none;
}

#main-header nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

#main-header nav ul li {
    margin-left: 25px; /* Space between nav items */
}

#main-header nav ul li a {
    text-decoration: none;
    color: #555; /* Standard nav link color */
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    padding: 5px 0; /* Add some padding for easier clicking */
    position: relative; /* For potential underline effects */
}

#main-header nav ul li a:hover {
    color: #1abc9c; /* Highlight color on hover */
}

/* Optional: Add subtle underline effect on hover/active */
/* #main-header nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #1abc9c;
    transition: width 0.3s ease;
}
#main-header nav ul li a:hover::after {
    width: 100%;
} */


/* --- Hero Section --- */
#hero {
    /* *** CHANGED: Adjust height *** */
    min-height: calc(70vh - 70px); /* Example: 70% of viewport height MINUS header height */
    /* Or use a fixed height: min-height: 550px; */
    /* Remove 'height: 100vh;' */

    /* --- Background Setup --- */
    background-color: #2c3e50;
    background-image:
        linear-gradient(rgba(40, 40, 70, 0.6), rgba(40, 40, 70, 0.8)),
        url('background-image.webp'),
        url('background-image.jpg');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;

    /* --- Flexbox Layout --- */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
    padding-top: 0; /* Reset padding if inherited, content is centered */
    padding-bottom: 60px; /* Ensure space for scroll down link */
}

#hero .hero-content {
    max-width: 800px;
    padding: 20px;
}

#hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.3em;
    color: #fff;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

#hero .tagline {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 1.5em;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

#hero .hero-buttons a {
    margin: 10px;
}

/* Scroll Down Link (Optional) */
#hero .scroll-down-link {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}


/* --- Button Styles --- */
.button {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px; /* Rounded buttons */
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-top: 10px; /* Space above buttons in cards */
    line-height: normal; /* Ensure text is centered vertically */
}

/* *** NEW: Style for highlighted Nav button *** */
.button-nav-highlight {
    background: linear-gradient(45deg, #1abc9c, #16a085); /* Use primary button gradient */
    color: #fff;
    padding: 8px 20px; /* Slightly smaller padding for nav */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Less shadow */
    margin-left: 10px; /* Space from regular links */
    margin-top: 0; /* Reset margin-top */
}
.button-nav-highlight:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    background: linear-gradient(45deg, #1ed1b1, #1abc9c);
}
/* Ensure hover color stays white */
#main-header nav ul li a.button-nav-highlight:hover {
    color: #fff;
}


.button-primary {
    background: linear-gradient(45deg, #1abc9c, #16a085); /* Teal Gradient */
    color: #fff;
}
.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    background: linear-gradient(45deg, #1ed1b1, #1abc9c);
}

.button-secondary {
    background-color: rgba(255, 255, 255, 0.2); /* Semi-transparent white */
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.button-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.button-link {
    background: linear-gradient(45deg, #8e44ad, #9b59b6); /* Purple Gradient */
    color: #fff;
}
.button-link:hover {
     background: linear-gradient(45deg, #a053c0, #8e44ad);
     transform: translateY(-2px);
     box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.button-link-alt {
    background-color: #eee;
    color: #555;
    margin-left: 10px; /* Space if two buttons */
}
.button-link-alt:hover {
     background-color: #ddd;
     transform: translateY(-2px);
     box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* --- Links Section --- */
#links-section {
    background-color: #fff; /* White background for this section */
    text-align: center;
}

#links-section h2 {
    font-size: 2.5rem;
    margin-bottom: 60px; /* More space after heading */
    color: #333;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive Grid */
    gap: 35px;
    max-width: 1200px;
    margin: 0 auto; /* Center grid */
}

.link-item {
    background-color: #fdfdfd; /* Slightly off-white card */
    padding: 35px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.link-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.link-item .icon {
    font-size: 3rem; /* Large Icons */
    margin-bottom: 20px;
    color: #1abc9c; /* Use primary accent color */
}
/* Specific icon colors adjusted based on new section IDs */
/* Novels */
#novels .icon { color: #8e44ad; } /* Purple */
/* Featured/Goodreads */
#featured .icon { color: #f39c12; } /* Orange for Star */
/* Community Forum */
#community .icon { color: #3498db; } /* Blue */
/* YouTube */
#youtube .icon { color: #e74c3c; } /* Red */


.link-item h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #333;
}

.link-item p {
    font-size: 0.95rem;
    margin-bottom: 25px; /* Space before button */
    color: #666;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 30px 20px;
    background-color: #e9ecef; /* Light footer background */
    color: #6c757d; /* Muted text color */
    font-size: 0.9rem;
    margin-top: 0;
}

.social-links {
  margin-top: 15px; /* Space above icons */
  text-align: center; /* Center the icons */
}

.social-icon {
  display: inline-block; /* Allow padding and sizing */
  font-size: 1.5rem; /* Size of the icon font itself */
  color: #555;      /* Icon color */
  text-decoration: none;
  margin: 0 8px;     /* Space BETWEEN icons */
  padding: 10px;     /* INCREASE PADDING to make clickable area larger */
  min-width: 48px;   /* Ensure minimum width */
  min-height: 48px;  /* Ensure minimum height */
  line-height: 28px; /* Vertically align icon if needed after padding */
  text-align: center;
  border-radius: 50%; /* Make it circular if desired */
  transition: color 0.2s ease, background-color 0.2s ease;
}

.social-icon:hover {
  color: #1abc9c; /* Change color on hover */
  /* background-color: #eee; /* Optional background on hover */
}

.visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap; /* prevent line breaks */
}

/* --- Responsive Design --- */

/* Adjustments for tablets and smaller desktops */
@media (max-width: 992px) {
     /* Optional: Reduce nav spacing slightly */
    #main-header nav ul li {
        margin-left: 15px;
    }
    .button-nav-highlight {
        padding: 6px 15px; /* Slightly smaller nav button */
    }
}


@media (max-width: 768px) {
    body {
        padding-top: 60px; /* Adjust body padding if header height changes */
    }
    #main-header {
        height: 60px; /* Smaller header */
        padding: 0 15px;
    }
    .nav-brand {
        font-size: 1.3rem;
    }
     /* --- NEW: Hide regular nav, prepare for burger menu --- */
     /* In a real implementation, you'd add a burger icon in HTML and JS to toggle the menu */
    #main-header nav ul {
         display: none; /* Hide the desktop nav links */
         /* Styles for mobile menu would go here (e.g., absolute position, full width, etc.) */
         /* This requires JS to toggle visibility */
    }
    /* You would need to add HTML for a burger icon and style it here */
    /* .burger-menu { display: block; ... } */

    #hero {
         /* Adjust hero height calculation if header height changes */
         min-height: calc(70vh - 60px);
    }
    #hero h1 {
        font-size: 2.8rem;
    }
    #hero .tagline {
        font-size: 1.1rem;
    }
    section {
        padding: 60px 15px;
    }
    #links-section h2 {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    .link-grid {
        gap: 25px;
    }
}

@media (max-width: 576px) {
     #hero h1 {
        font-size: 2.2rem;
    }
    #hero .tagline {
        font-size: 1rem;
    }
     .button {
        padding: 10px 22px;
        font-size: 0.9rem;
    }
     .link-item {
        padding: 25px 20px;
    }
     .link-item h3 {
        font-size: 1.2rem;
    }
    /* Ensure social icons don't get too small */
    .social-icon {
        font-size: 1.3rem;
        margin: 0 5px;
    }
}