/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Alegreya:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=TeX+Gyre+Pagella:wght@400;700&display=swap');

/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Apply the font to the entire document */
body {
    font-family: 'Alegreya', serif;
    line-height: 1.6;
    color: #333;
    background-color: #f2ebdf; /* Set the background color to black */
}

header {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.57)), 
                url('../images/HeaderBg.png') no-repeat center center; /* Add a dark overlay */
    background-size: cover; /* Ensure the image covers the entire header */
    text-align: center;
    padding: 20px 0; /* Add vertical padding */
    color: #fff; /* Ensure text is readable on the darkened background */
}

footer {
    background: #ebe4d8;
    color: #fff;
    text-align: center;
    padding: 10px 20px;
}

footer p {
    color: #423f3c; /* Set the text color to a dark shade */
}

p {
    font-size: 16px; /* Set a default font size */
}

/* Apply 20px font-size to <p> only on the home page */
body.index p:not(footer p) {
    font-size: 22px;
}

.container {
    max-width: 1100px;
    margin: 20px auto;
    background: #f4f2ed;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}


/* Dropdown Menu Styles */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    position: relative;
    margin-left: clamp(0px, 5vw - 40px, 50px); /* Dynamically adjust left margin based on screen width */
    margin-right: clamp(0px, 5vw - 40px, 50px); /* Dynamically adjust right margin based on screen width */
}

nav ul li a {
    color: #423f3c
    text-decoration: none;
    font-size: larger;
    font-family: "TeX Gyre Pagella";
    padding: 10px 15px;
    display: block;
}

nav ul li:hover .dropdown-menu {
    display: block;
}


.dropdown-menu li {
    margin: 0;
}

.dropdown-menu li a {
    padding: 10px 15px;
    color: #fff;
    text-decoration: none;
    display: block;
    font-size: 14px; /* Adjust font size to make text smaller */
    white-space: nowrap; /* Prevent text from wrapping to the next line */
}

.dropdown-menu li a:hover {
    background-color: #ebe4d8;
}

/* Dropdown Menu Styles */
.nav-links li {
    position: relative; /* Ensure the dropdown menu is positioned relative to its parent */
}

.dropdown-menu {
    display: none; /* Hide the dropdown menu by default */
    position: absolute;
    background-color: #ebe4d8;
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 5px;
    z-index: 1000; /* Ensure it appears above other elements */
}

.dropdown-menu li a {
    padding: 10px 15px;
    color: #fff;
    text-decoration: none;
    display: block;
    font-size: 14px; /* Adjust font size */
    white-space: nowrap; /* Prevent text from wrapping */
}
/*
.dropdown-menu li a:hover {
    background-color: #000000;
}
*/
/* Show dropdown menu on hover */
.nav-links li:hover .dropdown-menu {
    display: block;
}

.bio-section {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px auto;
    max-width: 1200px;
    background: #f4f2ed;
    padding: 5px 20px; /* Adds 40px padding to the top, 20px to the sides and bottom */
    border-radius: 5px;
    /*box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);*/
    gap: 50px; /* Adds space between the image and the text */
}

.bio-section img {
    max-width: 400px; /* Set a maximum width */
    width: 370px; /* Set a fixed width */
    height: auto; /* Maintain aspect ratio */
    transform: scale(1); /* Magnify the image by 50% */
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    align-self: flex-start; /* Align the image to the top */
    margin-right: 0px; /* Adds space between the image and the text */
    margin-top: 40px;
}

.bio-section div {
    flex: 1; /* Ensures the text container takes up the remaining space */
    text-align: justify;
}

/* Switch positions on smaller screens */
@media (max-width: 968px) {
    .bio-section {
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center-align all items */
    }

    .bio-section img {
        order: 1; /* Image appears first */
        align-self: center; /* Center the image horizontally */
        margin: 0 0 20px 0; /* Add spacing below the image */
    }

    .bio-section div {
        order: 2; /* Biography appears below the image */
    }
}




/* Center all h1 and h2 elements */
h1 {
    font-family: "Cinzel Decorative";
    text-align: center;
    color: #efebe1;
}

h2 {
    opacity: 0; /* Start hidden */
    animation: fadeIn 1.5s ease-in-out forwards; /* Fade in over 1.5 seconds */
    text-align: center;
    text-decoration: underline; /* Add underline to <h2> tags */
    text-underline-offset: 2px; /* Move the underline 2px lower */
}

/* Add padding around all <h3> elements */
h3 {
    padding: 10px 0; /* Adds 10px padding to the top and bottom */
    padding-top: 23px;
}

/* FAQ Section */
.faq details {
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    background-color: #f9f9f9;
    overflow: hidden;
    transition: height 0.5s ease; /* Smooth transition for both opening and closing */
    height: auto; /* Default state: auto height */
}

.faq summary {
    font-weight: bold;
    cursor: pointer;
    outline: none;
}

.faq summary:hover {
    color: #555;
}

.faq p {
    margin-top: 10px;
    padding-left: 10px;
}

        /* FAQ Grid */
        .faq-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr); /* 3 columns */
            grid-template-rows: repeat(2, auto); /* 2 rows */
            gap: 20px; /* Space between cards */
            padding: 20px;
        }

        /* Adjust to 2 columns for medium screens */
        @media (max-width: 768px) {
            .faq-grid {
                grid-template-columns: repeat(2, 1fr); /* 2 columns */
                grid-template-rows: auto; /* Adjust rows automatically */
            }
        }

        /* Adjust to 1 column for small screens */
        @media (max-width: 480px) {
            .faq-grid {
                grid-template-columns: 1fr; /* 1 column */
                grid-template-rows: auto; /* Adjust rows automatically */
            }
        }

/* FAQ Card */
.faq-card {
    perspective: 1000px; /* Enable 3D perspective */
}

.faq-card-inner {
    position: relative;
    width: 100%;
    height: 190px;
    transform-style: preserve-3d;
    transition: transform 0.6s; /* Smooth flip animation */
    cursor: pointer;
}

.faq-card:hover .faq-card-inner {
    transform: rotateY(180deg); /* Flip the card */
}

.faq-card-front,
.faq-card-back {
    position: absolute;
    width: 100%;
    height: 190px;
    backface-visibility: hidden; /* Hide the back side when not flipped */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: clamp(12px, 2vw, 16px); /* Dynamically adjust font size */
    text-align: center;
}

.faq-card-back {
    transform: rotateY(180deg); /* Start flipped */
    background-color: #89AEB5;
    color: #fff;
}

.faq-card-front p{
    font-weight: bold;
    margin: 0;
    padding: 0;
    line-height: 1.4;
    white-space: normal; /* Allow text to wrap naturally */
}
.faq-card-back p {
    margin: 0;
    padding: 0;
    line-height: 1.2;
    white-space: normal; /* Allow text to wrap naturally */
}

/* Contact Form Styles */
.contact-form {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    gap: 5px; /* Add 5px spacing between form elements */
    max-width: 600px; /* Limit the form width */
    margin: 20px auto; /* Center the form horizontally */
}

.contact-form label {
    font-weight: bold;
    margin-bottom: 7px; /* Add gap between label and input */
}

.contact-form input,
.contact-form textarea {
    width: 100%; /* Make input fields take up full width */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 7px; /* Add spacing between input fields */
}

.contact-form button {
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

.contact-form button:hover {
    background-color: #555;
}

/* Toggle Button Styles */
.toggle-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.toggle-button {
    padding: 10px 20px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    margin: 0 5px;
    transition: background-color 0.3s;
}

.toggle-button.active {
    background-color: #78a6c4;
    font-weight: bold;
}

.toggle-button:hover {
    background-color: #c3e1f5;
}

/* Navigation Bar */
.nav-container {
    display: flex;
    height: 73px;
    justify-content: center;
    align-items: center;
    background-color: #ebe4d8;
    padding: 10px 0px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.nav-links li a {
    color: #423f3c;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: #568cb1;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #000000;
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

    .hamburger {
        display: flex; /* Show hamburger menu on smaller screens */
        position: relative; /* Ensure the hamburger button is positioned relative to the dropdown */
    }

    .nav-links {
        display: none; /* Hide nav links by default */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: #ebe4d8;
        opacity: 0.97; /* Slightly transparent background */
        position: absolute;
        top: 144px; /* Position the dropdown below the hamburger button */
        width: 30%;
        padding: 10px 0;
        z-index: 1000; /* Ensure the dropdown appears above other elements */
    }

    .nav-links.active {
        display: flex; /* Show nav links when active */
    }

    .dropdown-menu {
        top: 0; /* Align with the top of the parent link */
        left: 100%; /* Position the dropdown to the right of the parent link */
        background-color: #ebe4d8;
        z-index: 1000; /* Ensure this appears above other elements */
    }
}

/* Anchor Styles */
a {
    color: #a82525; /* Set the text color to green */
    text-decoration: none; /* Remove the underline */
    transition: color 0.3s ease; /* Add a smooth transition for hover effects */
}

a:hover {
    color: #d81c1c; /* Change to a darker green on hover */
    text-decoration: underline; /* Add underline on hover for better visibility */
}


/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0; /* Start fully transparent */
        transform: translateY(5px); /* Slightly move down */
    }
    to {
        opacity: 1; /* Fully visible */
        transform: translateY(0); /* Move to original position */
    }
}


/* Fade-in animation */
@keyframes fadeIn2 {
    from {
        opacity: 0; /* Start fully transparent */
    }
    to {
        opacity: 1; /* Fully visible */
    }
}

.fadetrue {
    opacity: 0; /* Start hidden */
    animation: fadeIn 1.5s ease-in-out forwards; /* Fade in over 1.5 seconds */
}
.fade2true {
    opacity: 0; /* Start hidden */
    animation: fadeIn2 0.5s ease-in-out forwards; /* Fade in over 1.5 seconds */
}