/* Basic Reset */
body, h1, h2, p, ul {
    margin: 0;
    padding: 0;
}

/* General Styling */
body {
    font-family: 'Trebuchet MS', sans-serif;
    background-color: #1c1f3f; /* Background color for the whole page */
    color: #e0e0e0;
    line-height: 1.6;
    cursor: url('images/star.png'), auto;
}

/* Header and Menu */
header {
    background: url('images/background.webp') no-repeat center center/cover !important; /* Apply background image to header */
    min-height: 300px; /* Ensure the header has enough height */
    padding-bottom: 20px; /* Padding below menu */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 20px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.2);
    border-radius: 15px;
}

/* Site Logo */
header .site-logo {
    margin-right: auto;
    display: inline-block;
    position: absolute;
    left: 20px;
    top: 20px;
}

/* Navigation Menu */
header nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 10; /* Ensure the menu is on top of the background */
}

header nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 15px;
}

header nav ul li {
    display: inline-block;
}

header nav ul li a {
    display: block;
    padding: 10px 20px;
    background-color: rgba(59, 63, 103, 0.8); /* Slightly transparent background */
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

header nav ul li a:hover {
    background-color: rgba(255, 204, 0, 0.8); /* Change color on hover */
    color: #30135d;
}

/* Hamburger Menu Button */
header .hamburger {
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    cursor: pointer;
    margin-right: 20px;
}

header .hamburger div {
    width: 100%;
    height: 4px;
    background-color: #fff;
    border-radius: 5px;
}

/* Hero Section (CTA) */
.hero-section {
    min-height: 300px; /* Ensure the section has enough height */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
    margin-top: -20px; /* Adjust margin if necessary */
    padding-top: 50px; /* Additional padding to avoid overlap with the header */
}

.cta h1 {
    font-size: 3em;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

.cta p {
    font-size: 1.2em;
    margin: 20px 0;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: #ffcc00;
    color: #30135d;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease-in-out;
}

.cta-button:hover {
    background: #fff;
    color: #30135d;
}

/* Ad Placeholders */
.ad-left, .ad-right {
    flex: 1;
    padding: 20px;
    text-align: center;
}

.ad-placeholder {
    background: #3e206d;
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    font-weight: bold;
}

/* Blog Section */
.blog-section {
    flex: 4;
    padding: 0 20px;
}

.blog-section h2 {
    font-size: 2em;
    text-align: center;
    margin-bottom: 30px;
    color: #ffcc00;
}

/* Flexbox Layout for Blog Categories */
.categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.category-section {
    background: #3b3f67;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    width: calc(48% - 10px); /* Adjust width for two columns */
    margin-bottom: 20px;
}

.category-section h3 {
    font-size: 1.5em;
    color: #ffcc00;
    margin-bottom: 20px;
}

/* Flexbox for Posts in Each Category */
.category-posts {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.category-section .post {
    background: #2a2d4b;
    padding: 10px;
    border-radius: 10px;
    transition: transform 0.3s ease-in-out;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    width: calc(48% - 10px); /* Adjust width for two columns */
    margin-bottom: 20px; /* Space between rows */
}

.category-section .post:hover {
    transform: scale(1.05);
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.post-excerpt {
    color: #ccc;
    font-size: 0.9em;
    margin-top: 10px;
}

.category-section .view-all {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #ffcc00;
    color: #30135d;
    text-decoration: none;
    border-radius: 20px;
    transition: background 0.3s ease;
}

.category-section .view-all:hover {
    background: #fff;
    color: #30135d;
}

/* Footer */
footer {
    background: #1c1f3f;
    color: #ccc;
    padding: 20px 0;
    text-align: center;
    margin-top: 50px;
}

/* Custom Cursor */
body {
    cursor: url('images/star.png'), auto;
}

/* Category Page Template */

/* Wrapper to hold content and ads */
.category-template-wrapper {
    display: flex;
    justify-content: space-between; /* Align ads and content in a row */
    padding: 50px 20px;
    max-width: 1800px; /* Increase max-width for better spacing */
    margin: auto;
    position: relative;
}

/* Category Header */
.category-header {
    width: 100%; /* Full width */
    text-align: center;
    margin-bottom: 30px;
}

.category-header h1 {
    font-size: 2.5em;
    color: #ffcc00;
}

.category-header p {
    color: #ccc;
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto;
}

/* Content Wrapper */
.content-wrapper.category-template {
    display: flex;
    flex: 3; /* Give main content more space */
    flex-direction: column;
    background: #2a2d4b;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.2);
    width: 100%;
}

/* Category Posts Section */
.category-posts-section {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Ad Placeholders for Left and Right Ads */
.ad-left-horizontal, .ad-right-horizontal {
    width: 200px; /* Fixed width for ads */
    text-align: center;
    align-self: flex-start; /* Stick ads to top */
    position: sticky;
    top: 20px;
    padding: 20px;
}

.ad-placeholder-horizontal {
    background: #3e206d;
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    font-weight: bold;
}

/* Category Posts Grid */
.category-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Post Styling */
.post {
    background: #3b3f67;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.post:hover {
    transform: scale(1.05);
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.post-title {
    font-size: 1.5em;
    color: #ffcc00;
    margin-top: 10px;
    margin-bottom: 15px;
}

.post-excerpt {
    color: #ccc;
    font-size: 1em;
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    color: #fff;
    background: #3e206d;
    padding: 10px 15px;
    margin: 5px;
    border-radius: 5px;
    text-decoration: none;
}

.pagination a:hover,
.pagination span.current {
    background: #ffcc00;
    color: #30135d;
}

/* Responsive Design */

/* For screens smaller than 1200px */
@media screen and (max-width: 1200px) {
    .category-template-wrapper {
        max-width: 1200px;
    }
}

/* For screens smaller than 768px (tablet size) */
@media screen and (max-width: 768px) {
    .category-template-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .category-template .post {
        padding: 15px;
    }

    .ad-left-horizontal, .ad-right-horizontal {
        display: none; /* Hide ads on smaller screens */
    }
}

/* For screens smaller than 480px (mobile size) */
@media screen and (max-width: 480px) {
    .category-template-wrapper {
        padding: 20px 5px;
    }

    .category-template .post {
        padding: 10px;
    }
}


/* Single Post Template */

/* Wrapper for the entire single post layout */
.single-post-wrapper {
    padding: 50px 20px;
    background-color: #1c1f3f;
}

/* Content Wrapper */
.content-wrapper {
    display: flex;
    justify-content: center;
    max-width: 1400px; /* Increase the max-width for a wider layout */
    margin: auto;
    padding: 0 20px;
}

/* Widget Section on the Left */
.widget-section {
    flex: 1;
    padding: 20px;
    background-color: #3b3f67;
    border-radius: 15px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
    margin-right: 20px; /* Space between the widget and post content */
}

.widget-section h3 {
    color: #ffcc00;
    margin-bottom: 20px;
    text-align: center;
}

.widget-section .widget {
    margin-bottom: 20px;
    background-color: #2a2d4b;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.widget-section .widget input[type="text"] {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.widget-section .widget input[type="submit"] {
    padding: 10px;
    background-color: #ffcc00;
    color: #30135d;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.widget-section .widget input[type="submit"]:hover {
    background-color: #fff;
    color: #30135d;
}

/* Main Post Content (Center) */
.post-content {
    flex: 5; /* Take up more space */
    padding: 20px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
    max-width: 800px; /* Ensure a wider container for the content */
    width: 100%; /* Allow the content to expand within the max width */
}

/* Post Title */
.post-title {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #30135d;
    text-align: center;
    text-transform: capitalize;
}

/* Post Meta */
.post-meta {
    font-size: 0.9em;
    color: #999;
    text-align: center;
    margin-bottom: 20px;
}

/* Post Thumbnail */
.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Post Text */
.post-text {
    font-size: 1.2em;
    line-height: 1.8;
    color: #333;
}

/* Ad Section on the Right */
.ad-right {
    flex: 1;
    padding: 20px;
    text-align: center;
    background-color: #3b3f67;
    border-radius: 15px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
    margin-left: 20px; /* Space between the post content and the ad */
}

.ad-placeholder {
    background: #3e206d;
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    font-weight: bold;
}

/* Pagination for Posts */
.post-pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.previous-post, .next-post {
    font-size: 1.2em;
    color: #30135d;
}

.previous-post a, .next-post a {
    text-decoration: none;
    color: #30135d;
}

.previous-post a:hover, .next-post a:hover {
    color: #ffcc00;
}


/* Responsive Design */

/* For screens smaller than 1200px */
@media screen and (max-width: 1200px) {
    .category-template .post,
    .category-section .post {
        flex: 0 1 calc(45% - 20px); /* Two columns */
    }

    .category-template-wrapper,
    .content-wrapper {
        max-width: 1200px; /* Adjust the overall container width */
    }

    /* CTA Section */
    .hero-section {
        padding: 50px 20px;
        text-align: center;
    }

    .cta h1 {
        font-size: 2.5em;
    }

    .cta p {
        font-size: 1em;
    }

    .cta-button {
        padding: 12px 25px;
        font-size: 1em;
    }
}

/* For screens smaller than 768px (tablet size) */
@media screen and (max-width: 768px) {
    .category-template .post,
    .category-section .post {
        flex: 0 1 calc(100% - 20px); /* Single column */
    }

    .category-template-wrapper,
    .content-wrapper {
        flex-direction: column;
        align-items: center;
        max-width: 768px; /* Adjust container width */
    }

    .ad-left-horizontal, .ad-right-horizontal,
    .ad-left, .ad-right {
        display: none; /* Hide ads on smaller screens */
    }

    /* CTA Section */
    .hero-section {
        padding: 40px 15px;
    }

    .cta h1 {
        font-size: 2em;
    }

    .cta p {
        font-size: 0.9em;
    }

    .cta-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    /* Header */
    header {
        flex-direction: column;
        padding: 10px;
    }

    header nav ul {
        flex-direction: column;
        gap: 10px;
    }

    header .site-logo {
        margin-bottom: 10px;
    }
}

/* For screens smaller than 480px (mobile size) */
@media screen and (max-width: 480px) {
    .category-template-wrapper,
    .content-wrapper {
        padding: 20px 5px;
    }

    .category-template .post,
    .category-section .post {
        padding: 15px;
    }

    .category-template-wrapper,
    .content-wrapper {
        max-width: 480px; /* Adjust container width for mobile */
    }

    /* CTA Section */
    .hero-section {
        padding: 30px 10px;
        text-align: center;
    }

    .cta h1 {
        font-size: 1.8em;
    }

    .cta p {
        font-size: 0.8em;
    }

    .cta-button {
        padding: 8px 15px;
        font-size: 0.8em;
    }

    /* Hamburger Menu */
    header .hamburger {
        display: flex;
    }

    header nav ul {
        display: none; /* Hide the menu by default */
    }

    header nav ul.open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
}

/* The Modal (background) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent the scrollbars */
    background-color: rgba(0, 0, 0, 0.4);
}

/* Modal Content */
.modal-content {
    background-color: #2a2d4b;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    text-align: center;
    color: #fff;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent scrollbars */
}

/* Scrollable section for long text content */
.modal-content .scrollable-content {
    overflow-y: auto;
    max-height: 60vh;
    padding: 10px;
}

.modal-content p {
    word-wrap: break-word;
    font-size: 1.2em;
    line-height: 1.6;
}

.modal-content em {
    font-style: italic;
    color: #ffcc00;
}

/* Close Button */
.close {
    color: #aaa;
    align-self: flex-end;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

input[type="date"] {
    padding: 10px;
    margin: 15px 0;
    width: 100%;
    font-size: 1em;
    border-radius: 5px;
}


/* Style for the Submit Button (Get Horoscope) */
.submit-horoscope-btn {
    display: inline-block;
    padding: 15px 30px;
    background: #ffcc00;
    color: #30135d;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    border: none;
    font-size: 1em;
}

.submit-horoscope-btn:hover {
    background: #fff;
    color: #30135d;
}