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

:root {
    --primary-color: #2c5f7d;
    --secondary-color: #4a90a4;
    --accent-color: #f4a261;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Chladni Pattern Canvas */
#chladniCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto;
}

/* Layout */
.container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Side Navigation */
.sidebar {
    width: 250px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed h2 {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 1rem 0.5rem;
    font-size: 1.2rem;
}

.sidebar.collapsed nav {
    display: none;
}

.sidebar h2 {
    padding: 0 1.5rem 1rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--secondary-color);
    margin-bottom: 1rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.sidebar h2:hover {
    background-color: var(--secondary-color);
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    margin: 0;
}

.sidebar nav ul li a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--white);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.sidebar nav ul li a:hover {
    background-color: var(--secondary-color);
}

.sidebar nav ul li a.active {
    background-color: var(--accent-color);
    font-weight: bold;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 3rem;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 60px;
}

.page-header {
    margin-bottom: 3rem;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.2rem;
    color: #666;
}

/* Home Page Grid */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.favorite-card {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
    display: block;
}

.favorite-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.favorite-card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.favorite-card p {
    color: #666;
    font-size: 1rem;
}

/* Marriage Advice Page - Background Image */
body.marriage-page {
    background: url('../marriage-advice.jpg') no-repeat center center fixed;
    background-size: cover;
    position: relative;
}

body.marriage-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.85);
    z-index: 0;
    pointer-events: none;
}

body.marriage-page .container {
    position: relative;
    z-index: 1;
}

/* Books Page - Background Image */
body.books-page {
    background: url('../highest-library.png') no-repeat center center fixed;
    background-size: cover;
    position: relative;
}

body.books-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.85);
    z-index: 0;
    pointer-events: none;
}

body.books-page .container {
    position: relative;
    z-index: 1;
}

/* Patterns Page - Background Image */
body.patterns-page {
    background: url('../patterns.JPG') no-repeat center center fixed;
    background-size: cover;
    position: relative;
}

body.patterns-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.85);
    z-index: 0;
    pointer-events: none;
}

body.patterns-page .container {
    position: relative;
    z-index: 1;
}

/* Scriptures Page - Background Image */
body.scriptures-page {
    background: url('../scriptures.png') no-repeat center center fixed;
    background-size: cover;
    position: relative;
}

body.scriptures-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.85);
    z-index: 0;
    pointer-events: none;
}

body.scriptures-page .container {
    position: relative;
    z-index: 1;
}

/* Restaurants Page - Background Image */
body.restaurants-page {
    background: url('../resturants.png') no-repeat center center fixed;
    background-size: cover;
    position: relative;
}

body.restaurants-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.85);
    z-index: 0;
    pointer-events: none;
}

body.restaurants-page .container {
    position: relative;
    z-index: 1;
}

/* Marriage Advice - 8 Ates Grid */
.ates-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.ate-card {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.ate-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.ate-card h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.ate-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Books Page Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.book-card {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.book-card h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.book-author {
    color: var(--secondary-color);
    font-size: 1rem;
    font-style: italic;
    margin-bottom: 1rem;
}

.book-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.book-link {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
}

.book-link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Quotes Page */
.quotes-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.quote-card {
    background: var(--white);
    border-radius: 10px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--accent-color);
    transition: all 0.3s ease;
}

.quote-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.quote-text {
    margin-bottom: 1.5rem;
}

.quote-main {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-color);
    font-style: italic;
    position: relative;
    padding: 0 1rem;
}

.quote-main::before {
    content: '"';
    font-size: 4rem;
    color: var(--accent-color);
    position: absolute;
    left: -1rem;
    top: -1.5rem;
    font-family: Georgia, serif;
    opacity: 0.5;
}

.quote-attribution {
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--bg-color);
}

.quote-author {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.quote-source {
    font-size: 0.95rem;
    color: var(--secondary-color);
    font-style: italic;
}

.quote-context {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.quote-context p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
}

.quote-context strong {
    color: var(--primary-color);
}

/* Scriptures Page */
.scriptures-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.scripture-card {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--primary-color);
    transition: all 0.3s ease;
}

.scripture-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.scripture-reference {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.scripture-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.scripture-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.scripture-link:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

/* Patterns Page */
.patterns-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.pattern-card {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--secondary-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.pattern-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.pattern-title {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    font-weight: bold;
}

.pattern-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Pattern List Styles (for modal content) */
.pattern-list {
    margin-left: 1.5rem;
    line-height: 2;
}

.pattern-list li {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.pattern-list-detailed li {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.pattern-list-detailed strong {
    color: var(--secondary-color);
    font-weight: bold;
}

/* Restaurants Page */
.restaurants-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
}

.location-section {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 2rem;
}

.location-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.restaurant-card {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--accent-color);
    transition: all 0.3s ease;
}

.restaurant-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.restaurant-name {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.restaurant-dish {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    font-style: italic;
}

/* Modal/Popup */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.modal-content h3 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.modal-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.modal-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.modal-content ul li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--primary-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: var(--shadow);
}

.mobile-menu-toggle:hover {
    background-color: var(--secondary-color);
}

/* Mobile Top Banner */
.mobile-top-banner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.mobile-banner-title {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.mobile-nav-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    gap: 1rem;
}

.mobile-nav-select {
    flex: 1;
    max-width: 400px;
    padding: 0.75rem;
    border-radius: 5px;
    border: none;
    background-color: var(--white);
    color: var(--text-color);
    font-size: 1rem;
    font-family: 'Georgia', 'Times New Roman', serif;
    cursor: pointer;
    text-align: center;
}

/* Hide navigation on home page for mobile */
body.home-page .mobile-bottom-nav {
    display: none !important;
}

body.home-page .mobile-top-banner {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .ates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }

    .sidebar {
        display: none;
    }

    .mobile-bottom-nav {
        display: block;
    }

    .mobile-top-banner {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 5rem 1rem 6rem;
    }

    body.home-page .main-content {
        padding: 2rem 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .favorites-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .ates-grid {
        grid-template-columns: 1fr;
    }

    .books-grid {
        grid-template-columns: 1fr;
    }

    .quote-card {
        padding: 1.5rem;
    }

    .quote-main {
        font-size: 1.1rem;
        padding: 0 0.5rem;
    }

    .quote-main::before {
        font-size: 3rem;
        left: -0.5rem;
    }

    .quote-context {
        padding: 1rem;
    }

    .scripture-card {
        padding: 1.5rem;
    }

    .scripture-reference {
        font-size: 1.2rem;
    }

    .scripture-text {
        font-size: 1rem;
    }

    .patterns-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .pattern-card {
        padding: 1.25rem;
    }

    .pattern-title {
        font-size: 1.3rem;
    }

    .pattern-card p {
        font-size: 0.9rem;
    }

    .pattern-list li {
        font-size: 1rem;
    }

    .location-section {
        padding: 1.5rem;
    }

    .location-title {
        font-size: 1.5rem;
    }

    .restaurant-card {
        padding: 1.25rem;
    }

    .restaurant-name {
        font-size: 1.15rem;
    }

    .restaurant-dish {
        font-size: 0.95rem;
    }

    .modal-content {
        padding: 2rem;
        width: 95%;
    }
}
