@import url('https://fonts.googleapis.com/css2?family=Scheherazade+New:wght@700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

:root {
    --bg-color: #f6ecd9;
    --text-color: #4b3b2a;
    --card-bg: #f9f5ef;
    --card-shadow: rgba(120, 90, 40, 0.08);
    --title-color: #7c5a2a;
    --content-color: #7c6a4a;
    --icon-color: #b48a4a;
    --theme-toggle-bg: #b48a4a;
    --hero-bg: #f3e3c3;
    --hero-text: #4b3b2a;
    --featured-card-bg: #f9f5ef;
    --featured-card-hover: #f3e3c3;
    --featured-card-text: #4b3b2a;
    --featured-card-title: #7c5a2a;
    --section-bg: #f9f5ef;
    --section-text: #4b3b2a;
    --section-title: #7c5a2a;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --card-bg: #2d2d2d;
    --card-shadow: rgba(0, 0, 0, 0.3);
    --title-color: #e0e0e0;
    --content-color: #b0b0b0;
    --icon-color: #5ddeb3;
    --hero-bg: #2d2d2d;
    --hero-text: #e0e0e0;
    --featured-card-bg: #2d2d2d;
    --featured-card-hover: #3d3d3d;
    --featured-card-text: #e0e0e0;
    --featured-card-title: #e0e0e0;
    --section-bg: #2d2d2d;
    --section-text: #e0e0e0;
    --section-title: #e0e0e0;
}

[data-theme="light"] {
    --bg-color: #f6ecd9;
    --text-color: #4b3b2a;
    --card-bg: #f9f5ef;
    --card-shadow: rgba(120, 90, 40, 0.08);
    --title-color: #7c5a2a;
    --content-color: #7c6a4a;
    --icon-color: #b48a4a;
    --hero-bg: #f3e3c3;
    --hero-text: #4b3b2a;
    --featured-card-bg: #f9f5ef;
    --featured-card-hover: #f3e3c3;
    --featured-card-text: #4b3b2a;
    --featured-card-title: #7c5a2a;
    --section-bg: #f9f5ef;
    --section-text: #4b3b2a;
    --section-title: #7c5a2a;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
}


/* Container Styles */
.container {
    max-width: 1200px;
    margin: 75px auto 0;
    padding: 20px;
}

/* Section Styles */
.section {
    background-color: var(--section-bg);
    color: var(--section-text);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px var(--card-shadow);
}

.section h2 {
    color: var(--section-title);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--card-shadow);
    padding-bottom: 10px;
}

/* Knowledge Grid */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.knowledge-card {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 15px;
    border-radius: 8px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 2px 5px var(--card-shadow);
}

.knowledge-card:hover {
    transform: translateY(-5px);
}

.knowledge-card h3 {
    color: var(--title-color);
}

.knowledge-card p {
    color: var(--content-color);
}

/* Hero Section Styles */
.hero-section {
    background: linear-gradient(120deg, #232a36 0%, #181f2a 100%);
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 4px 24px 0 rgba(52, 152, 219, 0.10);
    margin-bottom: 2.5rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg width="100%25" height="100%25" xmlns="http://www.w3.org/2000/svg"><rect width="100%25" height="100%25" fill="none"/><g opacity="0.07"><path d="M0 40 Q50 0 100 40 T200 40 T300 40 T400 40 T500 40 T600 40 T700 40 T800 40 T900 40 T1000 40" stroke="%234a9eff" stroke-width="2" fill="none"/></g></svg>');
    background-repeat: repeat-x;
    background-size: cover;
    z-index: 1;
    pointer-events: none;
}

.modern-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 3rem 1.5rem;
    gap: 2.2rem;
}

.islamify-logo {
    font-family: 'Merriweather', 'Georgia', serif;
    font-size: 3.2rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 12px rgba(44, 62, 80, 0.18);
    margin-bottom: 0.7rem;
    display: block;
}

.hero-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 540px;
    background: #232a36;
    border-radius: 2.5rem;
    box-shadow: 0 2px 16px 0 rgba(52, 152, 219, 0.10);
    padding: 0.25rem 0.5rem 0.25rem 1.2rem;
    margin-bottom: 0.7rem;
    position: relative;
}

.hero-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 1.25rem;
    padding: 0.9rem 0.7rem 0.9rem 0;
    font-family: inherit;
}

.hero-search-input::placeholder {
    color: #b0b8c9;
    opacity: 1;
    font-size: 1.1rem;
}

.hero-search-btn {
    background: #4a9eff;
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 2.7rem;
    height: 2.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-left: 0.5rem;
    box-shadow: 0 2px 8px 0 rgba(74, 158, 255, 0.13);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.hero-search-btn:hover {
    background: #217dbb;
}

.hero-action-buttons {
    display: flex;
    gap: 1.2rem;
    margin-top: 0.7rem;
    flex-wrap: wrap;
    justify-content: center;
}

.modern-hero-btn {
    background: #232a36;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 1.7rem;
    padding: 0.85rem 2.2rem;
    box-shadow: 0 2px 12px 0 rgba(52, 152, 219, 0.10);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s, color 0.2s;
    margin-bottom: 0.2rem;
}

.modern-hero-btn i {
    font-size: 1.2rem;
}

.modern-hero-btn:hover {
    background: #4a9eff;
    color: #fff;
    box-shadow: 0 4px 18px 0 rgba(74, 158, 255, 0.13);
}

@media (max-width: 700px) {
    .modern-hero-content {
        padding: 2.2rem 0.5rem 2rem 0.5rem;
        gap: 1.2rem;
    }

    .islamify-logo {
        font-size: 2.1rem;
    }

    .hero-search-form {
        max-width: 100%;
        padding: 0.15rem 0.2rem 0.15rem 0.7rem;
    }

    .hero-search-input {
        font-size: 1rem;
        padding: 0.7rem 0.5rem 0.7rem 0;
    }

    .hero-search-btn {
        width: 2.1rem;
        height: 2.1rem;
        font-size: 1rem;
    }

    .modern-hero-btn {
        font-size: 0.98rem;
        padding: 0.7rem 1.2rem;
    }

    .hero-section {
        min-height: 320px;
    }
}

[data-theme="light"] .hero-section {
    background: linear-gradient(120deg, #e0ecff 0%, #f8f9fa 100%);
}

[data-theme="light"] .modern-hero-content .islamify-logo {
    color: #1a2332;
    text-shadow: 0 2px 12px rgba(44, 62, 80, 0.08);
}

[data-theme="light"] .hero-search-form {
    background: #fff;
    box-shadow: 0 2px 16px 0 rgba(52, 152, 219, 0.10);
}

[data-theme="light"] .hero-search-input {
    color: #232a36;
}

[data-theme="light"] .hero-search-input::placeholder {
    color: #7a8ca3;
}

[data-theme="light"] .modern-hero-btn {
    background: #fff;
    color: #232a36;
}

[data-theme="light"] .modern-hero-btn:hover {
    background: #4a9eff;
    color: #fff;
}

/* Specific styles for home page (index.html) hero section only */
.home-page .hero-section {
    min-height: calc(90vh - 75px);
    height: calc(90vh - 75px);
    margin-bottom: 0;
    padding: 1.5rem 2rem;
}

.home-page .container {
    padding: 0 20px 20px;
}

.hero-content {
    flex: 1;
    max-width: 550px;
    z-index: 2;
    position: relative;
}

.home-page .hero-content {
    padding-right: 1rem;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--title-color);
    line-height: 1.2;
    background: linear-gradient(135deg, var(--title-color) 0%, #000000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--content-color);
    margin-bottom: 2rem;
    line-height: 1.5;
    max-width: 95%;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.home-page .hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    position: relative;
    max-width: 45%;
    padding-left: 1rem;
    animation: float 6s ease-in-out infinite;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.home-page .hero-image .image-wrapper {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
    transition: all 0.3s ease;
}

.home-page .hero-image .image-wrapper:hover {
    transform: scale(1.03);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.home-page .hero-image img {
    max-width: 100%;
    max-height: 45vh;
    height: auto;
    object-fit: cover;
    border-radius: 15px;
    transition: all 0.3s ease;
}

/* Floating animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Add a shine effect on hover */
@keyframes shine {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.home-page .hero-image .image-wrapper:hover::before {
    animation: rotate 30s linear infinite, shine 3s linear infinite;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    background-size: 200% 100%;
}

/* Button Styles */
.cta-button {
    display: inline-block;
    padding: 1.1rem 2.2rem;
    background: var(--icon-color);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: var(--icon-color);
}

.secondary-button {
    display: inline-block;
    padding: 1.1rem 2.2rem;
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--icon-color);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.secondary-button:hover {
    background: var(--icon-color);
    color: white;
    transform: translateY(-3px);
}

/* Features Section */
.features-section {
    padding-top: 3rem;
    padding-bottom: 2.5rem;
    margin-top: 2rem;
    scroll-margin-top: 70px;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--title-color);
    padding-top: 1rem;
    scroll-margin-top: 80px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--icon-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--title-color);
}

.feature-card p {
    color: var(--content-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.feature-link {
    color: var(--icon-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.feature-link:hover {
    gap: 1rem;
}

/* Quote Section */
.quote-section {
    background: var(--card-bg);
    padding: 4rem 2rem;
    border-radius: 20px;
    margin: 4rem 0;
    text-align: center;
    position: relative;
}

.quote-content {
    max-width: 800px;
    margin: 0 auto;
}

.quote-content i {
    font-size: 3rem;
    color: var(--icon-color);
    opacity: 0.2;
    position: absolute;
    top: 1rem;
    left: 2rem;
}

.quote-text {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.quote-author {
    color: var(--content-color);
    font-style: italic;
}

/* Stats Section */
.stats-section {
    padding: 4rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    font-size: 3rem;
    color: var(--icon-color);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--content-color);
    font-size: 1.1rem;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--hero-bg) 0%, var(--card-bg) 100%);
    border-radius: 20px;
    margin: 4rem 0;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--title-color);
}

.cta-section p {
    font-size: 1.2rem;
    color: var(--content-color);
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
        min-height: auto;
        margin-bottom: 2rem;
    }

    .hero-content {
        margin-bottom: 2rem;
        max-width: 100%;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        margin: 0 auto 1.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        margin-top: 1.5rem;
        max-width: 100%;
    }

    .hero-image img {
        transform: none;
    }

    /* Home page specific mobile styles */
    .home-page .container {
        padding: 0 15px 15px;
    }

    .home-page .hero-section {
        height: calc(100vh - 75px);
        max-height: none;
        padding: 1.5rem 1rem;
        margin-bottom: 0;
        justify-content: center;
    }

    .home-page .hero-content {
        padding-right: 0;
    }

    .home-page .hero-image {
        margin-top: 1rem;
        max-width: 95%;
        padding-left: 0;
    }

    .home-page .hero-image img {
        max-height: 35vh;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hero Section Styles for Feelings Page */
.feelings-page .hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20vh;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--hero-bg) 0%, var(--card-bg) 100%);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.feelings-page .hero-content {
    text-align: center;
    max-width: 600px;
    z-index: 2;
    position: relative;
}

.feelings-page .hero-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--title-color);
    line-height: 1.2;
}

.feelings-page .hero-subtitle {
    font-size: 1rem;
    color: var(--content-color);
    margin-bottom: 0;
    line-height: 1.4;
}

.feelings-page .hero-image {
    display: none;
}

/* Responsive Design for Feelings Page Hero */
@media (max-width: 768px) {
    .feelings-page .hero-section {
        min-height: 15vh;
        padding: 1rem;
    }

    .feelings-page .hero-title {
        font-size: 1.5rem;
    }

    .feelings-page .hero-subtitle {
        font-size: 0.9rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeInLeft 0.6s ease forwards;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(20px);
    animation: fadeInRight 0.6s ease forwards;
}

.fade-in-scale {
    opacity: 0;
    transform: scale(0.95);
    animation: fadeInScale 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Staggered Animation Delays */
.fade-in:nth-child(1) {
    animation-delay: 0.1s;
}

.fade-in:nth-child(2) {
    animation-delay: 0.2s;
}

.fade-in:nth-child(3) {
    animation-delay: 0.3s;
}

.fade-in:nth-child(4) {
    animation-delay: 0.4s;
}

.fade-in:nth-child(5) {
    animation-delay: 0.5s;
}

.fade-in:nth-child(6) {
    animation-delay: 0.6s;
}

/* Content Section Animation */
.content-section {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive Animation Adjustments */
@media (max-width: 768px) {

    .fade-in,
    .fade-in-left,
    .fade-in-right,
    .fade-in-scale {
        animation-duration: 0.4s;
    }
}

@keyframes fadeInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Add spacing between hero and features section */
.hero-section+.features-section {
    margin-top: 3rem;
}

/* Add smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Adjust features section ID positioning to account for the fixed navbar */
#features {
    scroll-margin-top: 75px;
    /* Same as navbar height plus container margin */
}

/* Add smooth scrolling and features section margin for home page */
html {
    scroll-behavior: smooth;
}

#features {
    scroll-margin-top: 75px;
}

.home-page .hero-section+.features-section {
    margin-top: 3rem;
}

/* 3D Floating Orbs */
.home-page .hero-image .floating-orbs,
.home-page .hero-image .orbs-canvas,
.home-page .hero-image .star,
.home-page .hero-image .particle-container,
.home-page .hero-image .particle,
.home-page .hero-image .shimmer,
.home-page .hero-image .magic-dust,
.home-page .hero-image .dust-particle,
.home-page .hero-image .light-beam {
    display: none !important;
}

/* Simplify the image wrapper */
.home-page .hero-image .image-wrapper {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
    transition: all 0.3s ease;
}

.home-page .hero-image .image-wrapper:hover {
    transform: scale(1.03);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.home-page .hero-image img {
    max-width: 100%;
    max-height: 50vh;
    height: auto;
    object-fit: cover;
    border-radius: 15px;
    transition: all 0.3s ease;
}



/* Ensure hero section takes up full viewport height on home page */
.home-page .hero-section {
    min-height: calc(90vh - 75px);
    height: calc(90vh - 75px);
    margin-bottom: 0;
    padding: 1.5rem 2rem;
}

/* Make the hero image smaller */
.home-page .hero-image img {
    max-height: 45vh;
}

/* Adjust hero content spacing */
.home-page .hero-content {
    padding-right: 1rem;
}

.hero-title {
    font-size: 3.2rem;
}

.hero-subtitle {
    font-size: 1.3rem;
}

@media (max-width: 768px) {
    .calendar-hero-section {
        padding: 1rem;
        min-height: 10vh;
    }

    .calendar-page .hero-title {
        font-size: 1.5rem;
    }

    .calendar-page .hero-subtitle {
        font-size: 1rem;
    }

    .calendar-section,
    .important-dates-section {
        padding: 1rem;
    }

    .calendar-title,
    .important-dates-title {
        font-size: 1.2rem;
    }

    .calendar-table th,
    .calendar-table td {
        padding: 0.4rem;
        font-size: 0.9rem;
    }

    .important-dates-list li {
        padding: 0.8rem 0.7rem;
        font-size: 0.95rem;
    }

    .important-date-name {
        font-size: 1rem;
    }

    .important-date-desc {
        font-size: 0.92rem;
    }
}

@media (max-width: 480px) {

    .calendar-table th,
    .calendar-table td {
        padding: 0.2rem;
        font-size: 0.8rem;
    }

    .calendar-section,
    .important-dates-section {
        padding: 0.5rem;
    }

    .important-dates-list li {
        padding: 0.5rem 0.3rem;
    }
}

/* === Islamic History Hero Section === */
.history-hero-section {
    position: relative;
    width: 100%;
    min-height: 340px;
    background: linear-gradient(120deg, #f9f5ef 0%, #fff8e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 2.5rem;
    z-index: 1;
}

.hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg width="100%25" height="100%25" xmlns="http://www.w3.org/2000/svg"><rect width="100%25" height="100%25" fill="none"/><g opacity="0.08"><path d="M0 40 Q50 0 100 40 T200 40 T300 40 T400 40 T500 40 T600 40 T700 40 T800 40 T900 40 T1000 40" stroke=' %233498db' stroke-width=' 2' fill=' none'/></g></svg>');
    background-repeat: repeat-x;
    background-size: cover;
    z-index: 1;
}

.history-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2.5rem 1.5rem 2rem 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.history-hero-title {
    font-size: 2.7rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 0.7rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(52, 152, 219, 0.08);
}

[data-theme="dark"] .history-hero-title {
    color: #e0e0e0;
}

.history-hero-subtitle {
    font-size: 1.25rem;
    color: #4b3b2a;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

.history-hero-quote {
    font-size: 1.1rem;
    color: #666;
    background: rgba(255, 255, 255, 0.7);
    border-left: 4px solid #4b3b2a;
    padding: 0.7rem 1.2rem;
    border-radius: 0 12px 12px 0;
    display: inline-block;
    margin: 0 auto;
    font-style: italic;
    box-shadow: 0 2px 12px rgba(52, 152, 219, 0.07);
}

[data-theme="dark"] .history-hero-quote {
    background: rgba(44, 62, 80, 0.7);
    color: #b0b0b0;
}

/* === History Cards Enhancements === */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 2.2rem;
    margin-top: 2.5rem;
}

.history-card {
    background: linear-gradient(135deg, #f0f7ff 60%, #eaf6fb 100%);
    box-shadow: 0 4px 24px 0 rgba(52, 152, 219, 0.08);
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.3s, transform 0.3s, background 0.3s;
    border: 1.5px solid #e0ecff;
    padding-bottom: 0.5rem;
}

[data-theme="dark"] .history-card {
    background: linear-gradient(135deg, #232a36 60%, #2d2d2d 100%);
    border: 1.5px solid #232a36;
}

.history-card:hover {
    box-shadow: 0 8px 32px 0 var(--card-shadow) !important;
    transform: translateY(-8px) scale(1.035);
    background: linear-gradient(135deg, var(--section-bg) 80%, var(--card-bg) 100%) !important;
    border-color: var(--icon-color) !important;
    transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
}

[data-theme="dark"] .history-card:hover {
    background: linear-gradient(135deg, var(--section-bg) 80%, var(--card-bg) 100%) !important;
}

.history-icon {
    position: absolute;
    top: 18px;
    left: 18px;
    background: #3498db;
    color: #fff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.13);
    z-index: 2;
    border: 3px solid #fff;
    transition: background 0.3s, color 0.3s;
}

[data-theme="dark"] .history-icon {
    background: #232a36;
    color: #4a9eff;
    border: 3px solid #2d2d2d;
}

.history-card:hover .history-icon {
    background: var(--icon-color) !important;
    color: var(--card-bg) !important;
    box-shadow: 0 4px 18px var(--card-shadow) !important;
    border: 3px solid var(--card-bg) !important;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.history-img {
    width: 100%;
    border-radius: 18px 18px 0 0;
    max-height: 180px;
    object-fit: cover;
    margin-bottom: 0.7rem;
    filter: brightness(0.97) saturate(1.08);
    transition: filter 0.3s;
}

.history-card:hover .history-img {
    filter: brightness(1.03) saturate(1.15);
}

.history-card h3 {
    color: #2c3e50;
    font-size: 1.22rem;
    font-weight: 700;
    margin: 1.1rem 0 0.5rem 0;
    padding: 0 1.2rem;
    letter-spacing: 0.2px;
}

[data-theme="dark"] .history-card h3 {
    color: #e0e0e0;
}

.history-card p {
    color: #666;
    font-size: 1.01rem;
    margin-bottom: 1.1rem;
    padding: 0 1.2rem;
    min-height: 60px;
}

[data-theme="dark"] .history-card p {
    color: #b0b0b0;
}

/* === Animations === */
.fade-in-scale {
    opacity: 0;
    transform: scale(0.97);
    animation: fadeInScale 1.1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

@keyframes fadeInScale {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* === Responsive Hero Section === */
@media (max-width: 700px) {
    .history-hero-title {
        font-size: 2rem;
    }

    .history-hero-section {
        min-height: 220px;
        padding: 1.2rem 0;
    }

    .history-hero-content {
        padding: 1.2rem 0.5rem 1.2rem 0.5rem;
    }

    .history-grid {
        gap: 1.2rem;
    }

    .history-card {
        border-radius: 14px;
    }

    .history-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        top: 12px;
        left: 12px;
    }

    .history-img {
        border-radius: 14px 14px 0 0;
    }
}

/* Card fade-in-up animation */
.history-card {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    animation: fadeInUpCard 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.2s;
}

.history-card:nth-child(2) {
    animation-delay: 0.32s;
}

.history-card:nth-child(3) {
    animation-delay: 0.44s;
}

.history-card:nth-child(4) {
    animation-delay: 0.56s;
}

.history-card:nth-child(5) {
    animation-delay: 0.68s;
}

.history-card:nth-child(6) {
    animation-delay: 0.8s;
}

.history-card:nth-child(7) {
    animation-delay: 0.92s;
}

.history-card:nth-child(8) {
    animation-delay: 1.04s;
}

.history-card:nth-child(9) {
    animation-delay: 1.16s;
}

.history-card:nth-child(10) {
    animation-delay: 1.28s;
}

@keyframes fadeInUpCard {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Fix for dark mode hero section --- */
[data-theme="dark"] .history-hero-section {
    background: linear-gradient(120deg, #181f2a 0%, #232a36 100%) !important;
}

[data-theme="dark"] .hero-bg-pattern {
    filter: brightness(0.7) contrast(1.3);
    opacity: 0.22;
}

[data-theme="dark"] .history-hero-content {
    color: #e0e0e0;
}

[data-theme="dark"] .history-hero-title {
    color: #e0e0e0;
    text-shadow: 0 2px 12px rgba(74, 158, 255, 0.12);
}

[data-theme="dark"] .history-hero-subtitle {
    color: #4a9eff;
}

[data-theme="dark"] .history-hero-quote {
    background: rgba(24, 31, 42, 0.92);
    color: #b0b0b0;
    border-left: 4px solid #4a9eff;
    box-shadow: 0 2px 12px rgba(74, 158, 255, 0.10);
}

/* === History Timeline Layout === */
.history-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 0 2.5rem 0;
}

.history-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: linear-gradient(180deg, #3498db 0%, #e0ecff 100%);
    transform: translateX(-50%);
    z-index: 0;
    border-radius: 2px;
}

[data-theme="dark"] .history-timeline::before {
    background: linear-gradient(180deg, #4a9eff 0%, #232a36 100%);
}

.timeline-event {
    position: relative;
    width: 50%;
    padding: 2.5rem 2rem;
    box-sizing: border-box;
    z-index: 1;
}

.timeline-event.left {
    left: 0;
    text-align: right;
    justify-content: flex-end;
    display: flex;
}

.timeline-event.right {
    left: 50%;
    text-align: left;
    justify-content: flex-start;
    display: flex;
}

.timeline-event .history-card {
    position: relative;
    min-width: 270px;
    max-width: 370px;
    margin: 0 0 0 0;
    box-shadow: 0 4px 24px 0 rgba(52, 152, 219, 0.08), 0 0 0 6px rgba(52, 152, 219, 0.04);
}

.timeline-event.left .history-card {
    margin-right: 0;
    margin-left: auto;
}

.timeline-event.right .history-card {
    margin-left: 0;
    margin-right: auto;
}

.timeline-event::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 22px;
    height: 22px;
    background: #fff;
    border: 4px solid #3498db;
    border-radius: 50%;
    z-index: 2;
    left: 100%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.13);
}

[data-theme="dark"] .timeline-event::after {
    background: #232a36;
    border-color: #4a9eff;
}

.timeline-event.right::after {
    left: 0%;
    right: auto;
    transform: translate(-50%, -50%);
}

.timeline-event.left::after {
    left: 100%;
    right: auto;
    transform: translate(-50%, -50%);
}

@media (max-width: 900px) {
    .history-timeline {
        padding: 1.5rem 0 1.5rem 0;
    }

    .timeline-event {
        padding: 2rem 1rem;
    }
}

@media (max-width: 700px) {
    .history-timeline::before {
        left: 12px;
    }

    .timeline-event {
        width: 100%;
        padding: 1.5rem 0 1.5rem 2.5rem;
        text-align: left !important;
        display: block;
    }

    .timeline-event .history-card {
        margin: 0 0 0 0;
        max-width: 100%;
    }

    .timeline-event::after {
        left: 0;
        top: 32px;
        transform: none;
    }
}

/* Modern Rounded Transparent Footer */
.site-footer {
    background: rgba(245, 235, 215, 0.75); /* slightly more see-through */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3); /* subtle frosted border */
    color: #4b3b2a;
    padding: 3rem 2rem 1.5rem;
    margin: 2rem auto;
    border-radius: 50px;
    max-width: 1200px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}


/* Footer content container */
.footer-container {
    position: relative;
    z-index: 2;
}

/* Responsive grid layout */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Section Titles */
.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: #2e2216;
}

/* Paragraph text */
.footer-section p {
    line-height: 1.6;
    font-size: 1rem;
    color: #4b3b2a;
    font-weight: 600;
}

/* Links */
.footer-section ul {
    list-style: none;
    padding: 0;
    font-size: medium;
    font-weight: 700;
}

.footer-section ul li {
    margin-bottom: 0.85rem;
}

.footer-section ul li a {
    color: #4b3b2a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #000;
    text-decoration: none;
}

/* Contact info icons */
.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-info li i {
    color: #4b3b2a;
}

/* Bottom section */
.footer-bottom {
    border-top: 1px solid rgba(75, 59, 42, 0.2);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    text-decoration: none;
    font-size: medium;
    font-weight: 600;
}

.footer-links a {
    color: #4b3b2a;
    text-decoration: none;
    font-size: 0.95rem;
    position: relative;
}

.footer-links a:hover {
    color: #000;
    text-decoration: none;
}

/* Mobile styles */
@media (max-width: 768px) {
    .site-footer {
        border-radius: 20px;
        padding: 2rem 1rem;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-links {
        justify-content: center;
    }
}

/* Footer Logo Section */
.footer-logo-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Logo Styling */
.footer-logo img {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.footer-logo:hover img {
   
}

/* Description text spacing */
.footer-description {
    margin-top: 0.8rem; /* moves text down */
    line-height: 1.6;
    font-size: 1rem;
    color: #4b3b2a;
    max-width: 300px;
}

@media (max-width: 768px) {
    .site-footer {
        max-width: 95%;
        border-radius: 20px;
        padding: 2rem 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Logo section */
    .footer-logo-section {
        align-items: center;
        text-align: center;
    }

    .footer-description {
        max-width: 100%;
        margin-top: 0.8rem;
    }

    .footer-section h3 {
        text-align: center;
    }

    .footer-section ul {
        padding: 0;
        text-align: center;
    }

    .footer-section ul li {
        margin-bottom: 0.6rem;
    }

    /* Contact section centered with offset */
    .footer-section.contact-section {
        display: flex;
        flex-direction: column;
        align-items: center; /* centers the whole block */
    }

    .footer-section.contact-section .contact-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* keeps icon-text alignment */
        padding-left: 20px; /* creates that slight center offset */
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .footer-links {
        justify-content: center;
        gap: 1rem;
    }
}


/* === Animation-only from your previous styles === */

/* Slide list items a bit on hover */
.footer-section ul li { transition: transform 0.3s ease; }
.footer-section ul li:hover { transform: translateX(5px); }

/* Arrow reveal + link color change */
.footer-section ul li a { transition: color 0.3s ease; }
.footer-section ul li a::before {
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.footer-section ul li a:hover { color: #000; }
.footer-section ul li a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Contact icons scale on hover */
.contact-info li i { transition: transform 0.3s ease; }
.contact-info li:hover i { transform: scale(1.2); }

/* Footer nav underline grows on hover (Privacy Policy, Terms, Sitemap) */
.footer-links a { 
    position: relative; 
    transition: color 0.3s ease; 
    text-decoration: none; 
}
.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #000000, #4b3b2a);
    transition: width 0.3s ease;
}
.footer-links a:hover::after { 
    width: 100%; 
}

/* Paragraph + bottom text colors */
.footer-section p { 
    color: rgba(75, 59, 42, 0.85); 
}
.footer-bottom p { 
    color: rgba(75, 59, 42, 0.85); 
}

/* Quick Links arrow hover effect ONLY */
.footer-grid .footer-section ul li a::before {
    content: '→';
    margin-right: 8px;
    font-size: 1.1rem;
    color: #4b3b2a;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s ease;
}
.footer-grid .footer-section ul li a:hover::before {
    opacity: 1;
    transform: translateX(0);
}


/* === Quran Page UI Enhancements === */
.quran-hero {
    position: relative;
    min-height: 220px;
    margin-bottom: 2.5rem;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 24px 0 rgba(52, 152, 219, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quran-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, #f9f5ef 0%, #fff8e1 100%);
    z-index: 1;
    opacity: 0.9;
}

[data-theme="dark"] .quran-hero-bg {
    background: linear-gradient(120deg, #232a36 0%, #181f2a 100%);
    opacity: 0.95;
}

.quran-hero-motif {
    position: absolute;
    top: 24px;
    right: 32px;
    z-index: 2;
    opacity: 0.18;
    pointer-events: none;
}

.quran-hero .hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    width: 100%;
}

.quran-hero .hero-title {
    font-size: 2.7rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 0.7rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(52, 152, 219, 0.08);
}

[data-theme="dark"] .quran-hero .hero-title {
    color: #e0e0e0;
}

.quran-hero .hero-subtitle {
    font-size: 1.25rem;
    color: #3498db;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

[data-theme="dark"] .quran-hero .hero-subtitle {
    color: #4a9eff;
}

.quran-grid {
    margin-top: 2.5rem;
}

.quran-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 18px;
    box-shadow: 0 4px 24px 0 rgba(52, 152, 219, 0.08);
    border: 1.5px solid #e0ecff;
    transition: box-shadow 0.3s, transform 0.3s, background 0.3s;
    position: relative;
    overflow: hidden;
    animation: fadeInUpCard 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.quran-card.fade-in-up {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    animation: fadeInUpCard 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.quran-card:hover {
    box-shadow: 0 8px 32px 0 rgba(52, 152, 219, 0.18);
    transform: translateY(-8px) scale(1.035);
    background: rgba(74, 158, 255, 0.08);
}

[data-theme="dark"] .quran-card {
    background: rgba(35, 42, 54, 0.85);
    border: 1.5px solid #232a36;
}

[data-theme="dark"] .quran-card:hover {
    background: rgba(74, 158, 255, 0.10);
}

@keyframes fadeInUpCard {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.quran-featured-bg {
    background: linear-gradient(120deg, #f8f9fa 60%, #e0ecff 100%);
    border-radius: 18px;
    padding: 2.5rem 1.5rem;
    margin-top: 2.5rem;
    box-shadow: 0 4px 24px 0 rgba(52, 152, 219, 0.07);
}

[data-theme="dark"] .quran-featured-bg {
    background: linear-gradient(120deg, #232a36 60%, #181f2a 100%);
}

.surah-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 15px;
    box-shadow: 0 4px 24px 0 rgba(52, 152, 219, 0.08);
    border: 1.5px solid #e0ecff;
    transition: box-shadow 0.3s, transform 0.3s, background 0.3s;
    position: relative;
    overflow: hidden;
    animation: fadeInUpCard 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.surah-card.fade-in-up {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    animation: fadeInUpCard 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.surah-card:hover {
    box-shadow: 0 8px 32px 0 rgba(52, 152, 219, 0.18);
    transform: translateY(-8px) scale(1.035);
    background: rgba(74, 158, 255, 0.08);
}

[data-theme="dark"] .surah-card {
    background: rgba(35, 42, 54, 0.85);
    border: 1.5px solid #232a36;
}

[data-theme="dark"] .surah-card:hover {
    background: rgba(74, 158, 255, 0.10);
}

.quran-featured-bg .section-title {
    margin-top: 0;
    margin-bottom: 2rem;
}

@media (max-width: 700px) {
    .quran-hero {
        min-height: 140px;
        border-radius: 12px;
    }

    .quran-featured-bg {
        border-radius: 12px;
        padding: 1.2rem 0.5rem;
    }
}

/* === Feelings Page UI Enhancements === */
.feelings-hero {
    position: relative;
    min-height: 180px;
    margin-bottom: 2.5rem;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 24px 0 rgba(52, 152, 219, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feelings-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, #f9f5ef 0%, #fff8e1 100%);
    z-index: 1;
    opacity: 0.9;
}

[data-theme="dark"] .feelings-hero-bg {
    background: linear-gradient(120deg, #232a36 0%, #181f2a 100%);
    opacity: 0.95;
}

.feelings-hero-motif {
    position: absolute;
    top: 24px;
    right: 32px;
    z-index: 2;
    opacity: 0.18;
    pointer-events: none;
}

.feelings-hero .hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    width: 100%;
}

.feelings-hero .hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 0.7rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(52, 152, 219, 0.08);
}

[data-theme="dark"] .feelings-hero .hero-title {
    color: #e0e0e0;
}

.feelings-hero .hero-subtitle {
    font-size: 1.15rem;
    color: #3498db;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

[data-theme="dark"] .feelings-hero .hero-subtitle {
    color: #4a9eff;
}

.feeling-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 18px;
    box-shadow: 0 4px 24px 0 rgba(52, 152, 219, 0.08);
    border: 1.5px solid #e0ecff;
    transition: box-shadow 0.3s, transform 0.3s, background 0.3s;
    position: relative;
    overflow: hidden;
    animation: fadeInUpCard 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.feeling-card.fade-in-up {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    animation: fadeInUpCard 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.feeling-card:hover {
    box-shadow: 0 8px 32px 0 rgba(52, 152, 219, 0.18);
    transform: translateY(-8px) scale(1.035);
    background: rgba(74, 158, 255, 0.08);
}

[data-theme="dark"] .feeling-card {
    background: rgba(35, 42, 54, 0.85);
    border: 1.5px solid #232a36;
}

[data-theme="dark"] .feeling-card:hover {
    background: rgba(74, 158, 255, 0.10);
}

.glass-bg {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(8px);
    border-radius: 18px;
    box-shadow: 0 4px 24px 0 rgba(52, 152, 219, 0.08);
    border: 1.5px solid #e0ecff;
}

[data-theme="dark"] .glass-bg {
    background: rgba(35, 42, 54, 0.85) !important;
    border: 1.5px solid #232a36;
}

@keyframes fadeInUpCard {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 700px) {
    .feelings-hero {
        min-height: 110px;
        border-radius: 12px;
    }
}

/* === Calendar Page UI Enhancements === */
.calendar-glass-bg {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    box-shadow: 0 4px 24px 0 rgba(52, 152, 219, 0.10);
    padding: 2.2rem 1.5rem 1.5rem 1.5rem;
    margin: 1.5rem 0 0 0;
    transition: box-shadow 0.3s, background 0.3s;
    animation: fadeInUpCard 1s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .calendar-glass-bg {
    background: rgba(35, 42, 54, 0.85);
    box-shadow: 0 4px 24px 0 rgba(74, 158, 255, 0.10);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    animation: fadeInUpCard 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInUpCard {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 700px) {
    .calendar-glass-bg {
        border-radius: 12px;
        padding: 1.2rem 0.5rem 1rem 0.5rem;
    }
}

/* === Calendar Page Hero & Section Enhancements === */
.calendar-hero-section {
    position: relative;
    min-height: 180px;
    margin-bottom: 2.5rem;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 24px 0 rgba(52, 152, 219, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}

.calendar-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, #f9f5ef 0%, #fff8e1 100%);
    z-index: 1;
    opacity: 0.95;
    pointer-events: none;
}

.calendar-hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg width="100%25" height="100%25" xmlns="http://www.w3.org/2000/svg"><rect width="100%25" height="100%25" fill="none"/><g opacity="0.08"><path d="M0 40 Q50 0 100 40 T200 40 T300 40 T400 40 T500 40 T600 40 T700 40 T800 40 T900 40 T1000 40" stroke="%234a9eff" stroke-width="2" fill="none"/></g></svg>');
    background-repeat: repeat-x;
    background-size: cover;
    z-index: 2;
    opacity: 0.18;
}

[data-theme="dark"] .calendar-hero-bg {
    background: linear-gradient(120deg, #232a36 0%, #181f2a 100%);
    opacity: 0.98;
}

[data-theme="dark"] .calendar-hero-bg::after {
    opacity: 0.22;
}

.calendar-hero-section .hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    width: 100%;
}

.calendar-hero-section .hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 0.7rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(52, 152, 219, 0.08);
}

[data-theme="dark"] .calendar-hero-section .hero-title {
    color: #e0e0e0;
}

.calendar-hero-section .hero-subtitle {
    font-size: 1.15rem;
    color: #3498db;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

[data-theme="dark"] .calendar-hero-section .hero-subtitle {
    color: #4a9eff;
}

.calendar-glass-bg {
    background: linear-gradient(120deg, #f8f9fa 60%, #e0ecff 100%);
    border-radius: 18px;
    box-shadow: 0 8px 32px 0 rgba(52, 152, 219, 0.13);
    padding: 2.2rem 1.5rem 1.5rem 1.5rem;
    margin: 1.5rem 0 0 0;
    border: 1.5px solid #e0ecff;
    transition: box-shadow 0.3s, background 0.3s;
    animation: fadeInUpCard 1s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .calendar-glass-bg {
    background: linear-gradient(120deg, #232a36 60%, #181f2a 100%);
    box-shadow: 0 8px 32px 0 rgba(74, 158, 255, 0.13);
    border: 1.5px solid #232a36;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    animation: fadeInUpCard 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInUpCard {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 700px) {
    .calendar-hero-section {
        min-height: 110px;
        border-radius: 12px;
        padding: 1.2rem 0.5rem;
    }

    .calendar-glass-bg {
        border-radius: 12px;
        padding: 1.2rem 0.5rem 1rem 0.5rem;
    }
}

/* === Calendar Page Hero Redesign === */
.calendar-hero-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 3;
}

.calendar-hero-title {
    font-size: 3rem;
    font-weight: 900;
    color: #1a2332;
    margin-bottom: 1.1rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(44, 62, 80, 0.08);
    line-height: 1.1;
}

[data-theme="dark"] .calendar-hero-title {
    color: #fff;
}

.calendar-hero-desc {
    font-size: 1.25rem;
    color: #3a4663;
    margin-bottom: 0;
    font-weight: 400;
    max-width: 500px;
}

.calendar-highlight-card {
    background: linear-gradient(135deg, #fff7ea 60%, #ffffff 100%);
    color: #fff;
    border-radius: 28px;
    box-shadow: 0 8px 32px 0 #72603f;
    min-width: 180px;
    max-width: 220px;
    padding: 2.2rem 1.2rem 1.5rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    position: relative;
    z-index: 4;
}

.calendar-highlight-header {
    background: #72603f;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 18px 18px 0 0;
    padding: 0.7rem 1.2rem;
    width: 100%;
    text-align: center;
    margin-bottom: 0.7rem;
    letter-spacing: 0.5px;
}

.calendar-highlight-label {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 0.2rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.calendar-highlight-week {
    font-size: 3.2rem;
    font-weight: 900;
    color: #000000;
    line-height: 1;
    margin-bottom: 0.2rem;
    text-shadow: 0 2px 12px rgba(44, 62, 80, 0.18);
}

@media (max-width: 900px) {
    .calendar-hero-flex {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .calendar-highlight-card {
        min-width: 140px;
        max-width: 100%;
        padding: 1.2rem 0.7rem 1rem 0.7rem;
    }

    .calendar-hero-title {
        font-size: 2.1rem;
    }
}

@media (max-width: 600px) {
    .calendar-hero-title {
        font-size: 1.3rem;
    }

    .calendar-highlight-card {
        border-radius: 18px;
        padding: 0.8rem 0.5rem 0.7rem 0.5rem;
    }
}

.calendar-hero-flex .hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

@media (max-width: 900px) {
    .calendar-hero-flex .hero-content {
        align-items: flex-start;
        text-align: left;
    }
}

.calendar-hero-flex .hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    text-align: left !important;
    gap: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.calendar-hero-flex .calendar-hero-title,
.calendar-hero-flex .calendar-hero-desc {
    text-align: left !important;
    align-self: flex-start !important;
}

.calendar-hero-flex .calendar-hero-title {
    margin-bottom: 0.3rem;
}

.modern-section-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 2.2rem;
    letter-spacing: 1px;
    text-align: left;
}

[data-theme="light"] .modern-section-title {
    color: #1a2332;
}

.modern-features-grid {
    display: flex;
    gap: 2.2rem;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

.modern-feature-card {
    background: linear-gradient(120deg, #232a36 60%, #181f2a 100%);
    border-radius: 22px;
    box-shadow: 0 4px 24px 0 rgba(52, 152, 219, 0.10);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2.2rem 2rem 2rem 2rem;
    min-width: 0;
    flex: 1 1 320px;
    max-width: 370px;
    transition: transform 0.18s, box-shadow 0.18s;
    border: 1.5px solid #232a36;
    position: relative;
}

.modern-feature-card:hover {
    transform: translateY(-7px) scale(1.03);
    box-shadow: 0 8px 32px 0 var(--card-shadow) !important;
    border-color: var(--icon-color) !important;
    background: var(--section-bg) !important;
    transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.modern-feature-icon {
    color: var(--icon-color) !important;
    background: var(--card-bg) !important;
    box-shadow: 0 2px 8px 0 var(--card-shadow) !important;
    transition: color 0.3s, background 0.3s, box-shadow 0.3s;
}

.modern-feature-card:hover .modern-feature-icon {
    color: var(--title-color) !important;
    background: var(--section-bg) !important;
    box-shadow: 0 4px 18px var(--card-shadow) !important;
}

.modern-feature-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

[data-theme="light"] .modern-feature-content h3 {
    color: #1a2332;
}

.modern-feature-content p {
    color: #b0b8c9;
    font-size: 1.05rem;
    margin-bottom: 1.1rem;
}

[data-theme="light"] .modern-feature-content p {
    color: #3a4663;
}

.modern-feature-link {
    background: var(--icon-color) !important;
    color: var(--card-bg) !important;
    border-radius: 1.2rem;
    padding: 0.5rem 1.3rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px 0 var(--card-shadow) !important;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.modern-feature-link:hover,
.modern-feature-link:focus {
    background: var(--title-color) !important;
    color: var(--card-bg) !important;
    box-shadow: 0 4px 18px var(--card-shadow) !important;
    text-decoration: underline !important;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, text-decoration 0.2s;
}

@media (max-width: 900px) {
    .modern-features-grid {
        flex-direction: column;
        gap: 1.2rem;
        align-items: stretch;
    }

    .modern-feature-card {
        max-width: 100%;
        padding: 1.2rem 1rem 1rem 1rem;
    }
}

.modern-quote-card {
    background: linear-gradient(120deg, #232a36 60%, #181f2a 100%);
    border-radius: 22px;
    box-shadow: 0 4px 24px 0 rgba(52, 152, 219, 0.10);
    padding: 2.5rem 2rem 2.2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    margin: 0 auto 2.5rem auto;
    max-width: 700px;
    position: relative;
}

.modern-quote-icon {
    font-size: 2.5rem;
    color: #4a9eff;
    margin-bottom: 0.5rem;
}

.modern-quote-text {
    font-size: 1.3rem;
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

[data-theme="light"] .modern-quote-text {
    color: #1a2332;
}

.modern-quote-author {
    color: #b0b8c9;
    font-size: 1.05rem;
    font-style: italic;
}

[data-theme="light"] .modern-quote-author {
    color: #3a4663;
}

.modern-stats-grid {
    display: flex;
    gap: 2.2rem;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

.modern-stat-card {
    background: linear-gradient(120deg, #232a36 60%, #181f2a 100%);
    border-radius: 18px;
    box-shadow: 0 4px 24px 0 rgba(52, 152, 219, 0.10);
    padding: 2.2rem 2rem 2rem 2rem;
    min-width: 0;
    flex: 1 1 180px;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    transition: transform 0.18s, box-shadow 0.18s;
    border: 1.5px solid #232a36;
    position: relative;
}

.modern-stat-card:hover {
    transform: translateY(-7px) scale(1.03);
    box-shadow: 0 8px 32px 0 var(--card-shadow) !important;
    border-color: var(--icon-color) !important;
    background: var(--section-bg) !important;
    transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.modern-stat-number {
    color: var(--icon-color) !important;
    transition: color 0.3s;
}

.modern-stat-card:hover .modern-stat-number {
    color: var(--title-color) !important;
}

.modern-stat-label {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

[data-theme="light"] .modern-stat-label {
    color: #1a2332;
}

@media (max-width: 900px) {
    .modern-stats-grid {
        flex-direction: column;
        gap: 1.2rem;
        align-items: stretch;
    }

    .modern-stat-card {
        max-width: 100%;
        padding: 1.2rem 1rem 1rem 1rem;
    }
}

.modern-cta-card {
    background: linear-gradient(120deg, #232a36 60%, #181f2a 100%);
    border-radius: 22px;
    box-shadow: 0 4px 24px 0 rgba(52, 152, 219, 0.10);
    padding: 2.5rem 2rem 2.2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    margin: 0 auto 2.5rem auto;
    max-width: 700px;
    position: relative;
    text-align: left;
}

.modern-cta-title {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 0.7rem;
}

[data-theme="light"] .modern-cta-title {
    color: #1a2332;
}

.modern-cta-desc {
    color: #b0b8c9;
    font-size: 1.1rem;
    margin-bottom: 1.1rem;
}

[data-theme="light"] .modern-cta-desc {
    color: #3a4663;
}

.modern-cta-btn {
    background: var(--icon-color) !important;
    color: var(--card-bg) !important;
    border-radius: 1.2rem;
    padding: 0.7rem 2.2rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 2px 8px 0 var(--card-shadow) !important;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    margin-top: 0.5rem;
}

.modern-cta-btn:hover,
.modern-cta-btn:focus {
    background: var(--title-color) !important;
    color: var(--card-bg) !important;
    box-shadow: 0 4px 18px var(--card-shadow) !important;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

@media (max-width: 700px) {
    .modern-cta-card {
        padding: 1.2rem 0.7rem 1rem 0.7rem;
        max-width: 100%;
    }

    .modern-section-title {
        font-size: 1.3rem;
    }
}

/* Full-width, short hero for home page */
.home-page .hero-section.arabic-hero-bg {
    width: 100vw;
    min-width: 100vw;
    max-width: 100vw;
    left: 0;
    right: 0;
    border-radius: 0;
    margin: 0;
    min-height: 520px;
    height: 620px;
    padding: 90px 1rem 0 1rem;
    box-sizing: border-box;
    background: linear-gradient(120deg, var(--hero-bg) 0%, var(--card-bg) 100%) !important;
}

.home-page .arabic-hero-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    opacity: 0.7;
}

.home-page .modern-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1.5rem;
    gap: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.home-page .islamify-logo {
    font-size: 2.2rem;
    margin-bottom: 0.2rem;
}

@media (max-width: 700px) {
    .home-page .hero-section.arabic-hero-bg {
        min-height: 320px;
        height: 380px;
    }

    .home-page .modern-hero-content {
        padding: 0 0.5rem;
        gap: 0.7rem;
    }

    .home-page .islamify-logo {
        font-size: 1.3rem;
    }

    .home-page .arabic-hero-svg text {
        font-size: 40px !important;
    }
}

.home-page .arabic-hero-svg text {
    font-family: 'Amiri', serif;
    font-size: 90px;
    fill: #ffffff;
    fill-opacity: 0.08;
    letter-spacing: 2px;
}

/* Arabic Islamify heading above hero content */
.home-page .arabic-hero-heading {
    font-family: 'Amiri', serif;
    font-size: 2.7rem;
    font-weight: bold;
    color: #fff;
    letter-spacing: 2px;
    text-align: center;
    margin-top: 80px;
    margin-bottom: 0.2rem;
    z-index: 3;
    position: relative;
    text-shadow: 0 2px 12px rgba(44, 62, 80, 0.18);
    line-height: 1.1;
}

@media (max-width: 700px) {
    .home-page .arabic-hero-heading {
        font-size: 1.5rem;
        margin-top: 65px;
    }
}

/* Add top margin to .islamify-logo for spacing from navbar */
.home-page .islamify-logo {
    font-size: 2.2rem;
    margin-bottom: 0.2rem;
    margin-top: 80px;
}

@media (max-width: 700px) {
    .home-page .islamify-logo {
        font-size: 1.3rem;
        margin-top: 65px;
    }
}

/* Increase height of home-page hero section */
.home-page .hero-section.arabic-hero-bg {
    min-height: 320px;
    height: 380px;
}

@media (max-width: 700px) {
    .home-page .hero-section.arabic-hero-bg {
        min-height: 180px;
        height: 220px;
    }
}

.home-page .islamify-logo {
    font-family: 'Scheherazade New', 'Amiri', serif;
    font-size: 2.7rem;
    margin-bottom: 0.2rem;
    margin-top: 80px;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 2px 12px rgba(44, 62, 80, 0.18);
}

.home-page .hero-arabic-bg-img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 900px;
    max-width: 120vw;
    height: auto;
    transform: translate(-50%, -50%);
    opacity: 0.08;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

@media (max-width: 700px) {
    .home-page .islamify-logo {
        font-size: 1.7rem;
        margin-top: 65px;
    }

    .home-page .hero-arabic-bg-img {
        width: 400px;
    }
}

/* Modern, smooth transitions for UI elements */
button,
.modern-hero-btn,
.quran-action-btn,
.modern-feature-link,
.modern-feature-card,
.modern-stat-card,
.quran-action-card,
.modern-cta-btn {
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, border-color 0.3s, transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity, box-shadow, background, color;
}

button:focus-visible,
.modern-hero-btn:focus-visible,
.quran-action-btn:focus-visible,
.modern-feature-link:focus-visible,
.modern-feature-card:focus-visible,
.modern-stat-card:focus-visible,
.quran-action-card:focus-visible,
.modern-cta-btn:focus-visible {
    outline: 2.5px solid var(--icon-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px var(--card-shadow);
}

.nav-links.open {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: max-height;
}

/* Tap/click feedback for buttons and links */
a:active,
button:active,
.modern-hero-btn:active,
.quran-action-btn:active,
.modern-feature-link:active,
.modern-cta-btn:active {
    transform: scale(0.96);
}



/* === Dark Mode Footer Styles === */
[data-theme="dark"] .site-footer {
    background: #1a1a1a;
    color: #e0d9ce;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .site-footer::before {
    opacity: 0.1;
}

[data-theme="dark"] .footer-section h3 {
    color: #e0d9ce;
    text-shadow: none;
}

[data-theme="dark"] .footer-section h3::after {
    background: linear-gradient(90deg, #e0d9ce, #e0d9ce);
}

[data-theme="dark"] .footer-section p,
[data-theme="dark"] .footer-bottom p {
    color: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .footer-section ul li a {
    color: #e0d9ce;
}

[data-theme="dark"] .footer-section ul li a::before {
    color: #e0d9ce;
}

[data-theme="dark"] .footer-section ul li a:hover {
    color: #ffffff;
}

[data-theme="dark"] .footer-links a {
    color: #e0d9ce;
}

[data-theme="dark"] .footer-links a::after {
    background: linear-gradient(90deg, #ffffff, #e0d9ce);
}

[data-theme="dark"] .contact-info li i {
    color: #e0d9ce;
}





/* START OF NAV BAR */

.sticky-wrapper {
    position: sticky;
    top: 8px;
    z-index: 1020;
}

@media (max-width: 991.98px) {
    .sticky-wrapper {
        top: 8px;
    }
}


.navbar {
    background-color: rgba(227, 207, 164, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.custom-navbar {
    max-width: 1140px;
    margin-top: 0.5rem;

}

.logo-text {
    font-size: 1.2rem;
    font-weight: 600;
}


.nav-link {
    color: #4b3b2a;
    font-size: large;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid transparent;
    border-radius: 8px 8px 0 0;
    position: relative;
    background-color: transparent;
    transition: color 0.3s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    width: 100%;
    height: 2px;
    background-color: #4b3b2a;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover,
.nav-link.active {
    background-color: #ffffff3d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);

}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
    background-color: #ffffff3d;
    border-bottom: 2px solid #4b3b2a;
}

.navbar, .nav-link {
  transition: all 0.3s ease-in-out;
}



.custom-navbar {
    max-width: 1200px;
    border-radius: 2rem;
    padding-left: 1rem;
    padding-right: 1rem;
    transition: border-radius 0.3s ease;
}

/* Fix for mobile screens */
@media (max-width: 991.98px) {
    .custom-navbar {
        max-width: 440px;
        border-radius: 1.7rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .navbar-collapse {
        margin-top: 0.5rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        padding-top: 0.5rem;
    }

    .navbar-nav .nav-item {
        margin-bottom: 0.3rem;
    }

    .navbar-nav .nav-item.d-flex {
        justify-content: center;
        margin-top: 3%;
    }
}

.container-fluid {
    --bs-gutter-x: 0rem;
}

@media (min-width: 992px) {
    .navbar-expand-lg .navbar-nav .nav-link {
        padding-right: 1rem;
        padding-left: 1rem;
    }
}





/* Toggle container */
.dark-toggle-label {
    position: relative;
    display: flex;
    align-items: center;
    height: 2.5rem;
    width: 5rem;
    margin-left: 0.5rem;
    cursor: pointer;
}

.navbar-toggler {
    background-color: #000000;
    color: #e3cfa4;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23e3cfa4' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}



.toggle-checkbox {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0;
}

.toggle-slot {
    position: relative;
    width: 5rem;
    height: 2.5rem;
    background-color: #4b3b2a;
    border-radius: 100px;
    transition: background-color 0.3s ease;
}

.toggle-checkbox:checked~.toggle-slot {
    background-color: #374151;
}

/* Circle knob */
.toggle-button {
    position: absolute;
    top: 0.25rem;
    left: 2.6rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: #4b3b2a;
    box-shadow: inset 0 0 0 0.35rem #e3cfa4;
    transition: transform 0.4s cubic-bezier(.26, 2, .46, .71), background 0.3s;
}

.toggle-checkbox:checked~.toggle-slot .toggle-button {
    transform: translateX(-2.2rem);
    background-color: #485367;
    box-shadow: inset 0 0 0 0.35rem white;
}

/* Icons */

.sun-icon,
.moon-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #e3cfa4;
}

.sun-icon-wrapper,
.moon-icon-wrapper {
    position: absolute;
    top: 0.3rem;
    width: 1.9rem;
    height: 1.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.sun-icon-wrapper i,
.moon-icon-wrapper i {
    line-height: 1;
}


.sun-icon-wrapper {
    left: 0.5rem;
    opacity: 1;
}

.moon-icon-wrapper {
    right: 0.5rem;
    opacity: 0;
    transform: scale(0.5) rotate(-20deg);
}


.toggle-checkbox:checked~.toggle-slot .sun-icon-wrapper {
    opacity: 0;
    transform: scale(0.5) rotate(-30deg);
}

.toggle-checkbox:checked~.toggle-slot .moon-icon-wrapper {
    opacity: 1;
    transform: scale(1.2) rotate(20deg);
}







/* DARK MODE NAV */

.logo-dark {
    display: none;
}

body.dark-mode .logo-light {
    display: none;
}

body.dark-mode .logo-dark {
    display: inline;
}

body.dark-mode .navbar-toggler {
    background-color: #000000;
    color: #000000;
}

body.dark-mode .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23000000' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}


body.dark-mode .navbar {
    background-color: rgba(26, 26, 26, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);

}

body.dark-mode .nav-link {
    color: #e0e0e0;
    background-color: transparent;
}

body.dark-mode .nav-link:hover,
body.dark-mode .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;

}

body.dark-mode .nav-link::after,
body.dark-mode .nav-link:hover::after,
body.dark-mode .nav-link.active::after {
    background-color: #ffffff3d;
    border-bottom: 2px solid #e3cfa4;
}

body.dark-mode .toggle-slot {
    background-color: #e3cfa4;
}

body.dark-mode .toggle-checkbox:checked~.toggle-slot {
    background-color: #e0e0e0;
}

body.dark-mode .toggle-button {
    background-color: #e3cfa4;
    box-shadow: inset 0 0 0 0.35rem #4b3b2a;
}

body.dark-mode .navbar-toggler {
    background-color: #e0e0e0;
}



body.dark-mode .toggle-checkbox:checked~.toggle-slot .toggle-button {
    background-color: #ffffff;
    box-shadow: inset 0 0 0 0.35rem #1a1a1a;
}

body.dark-mode .sun-icon,
body.dark-mode .moon-icon {
    color: #1a1a1a;
}

/* NAV ANIMATION */

@keyframes navbarFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.97);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.navbar.navbar-animated {
    animation: navbarFadeIn 0.7s ease-out forwards;
}


/* END OF NAV BAR*/