/* Basic Reset & Body Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%; /* Make body and html take full viewport height */
    background-color: #ffffff; /* White background */
}

body {
    display: flex;
    flex-direction: column; /* Arrange children (header, main) vertically */
    font-family: 'Inter', sans-serif; /* Default font */
}

/* Main container for the content */
.container {
    width: 100%;
    padding: 1.5rem 2rem;
    padding-left: calc(2rem + 2vw); /* Added 2% viewport width to left padding */
}

/* Header (Top Frame Bar) */
header {
    width: 100%;
    background-color: #a0130e; /* Red background color */
    position: relative; 
    z-index: 20; 
    height: 1.68rem; /* Match the frame thickness */
}

/* Main Content Area */
main {
    flex-grow: 1; /* Allows this element to grow and fill available space */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Aligns content to top and bottom */
}

/* Top Text Styling */
.top-content-block {
    color: #000000;
    padding-top: 2rem; /* Reduced space from the top bar */
}

.top-content-block .main-title {
    font-family: 'Boldonse', system-ui; /* Apply Boldonse font */
    font-size: 3rem; /* 48px */
    font-weight: 400;
    margin-bottom: 1.5rem; /* Space between the two text lines */
}

.top-content-block .meaning {
    font-family: 'Faculty Glyphic', serif; 
    font-size: 2rem; /* 32px */
    line-height: 1.4;
    max-width: 40ch; /* Limit line length for readability */
    margin-bottom: 1.5rem; /* Adds space between paragraphs */
}

/* Bottom Content Wrapper */
.bottom-wrapper {
    padding-bottom: 0; /* Removed bottom padding */
    margin-left: calc(-2rem - 2vw); /* Adjusted to match new container padding */
    margin-right: -2rem; /* Extends wrapper to the right edge of container padding */
}

/* Bottom Navigation Styling */
.bottom-nav {
    display: flex;
    width: 100%;
}

.bottom-nav a {
    flex: 1; /* Each link will grow to fill available space equally */
    text-align: center;
    font-family: 'Faculty Glyphic', serif; /* Changed font */
    font-size: 1.25rem; /* Reduced font size by 50% */
    text-decoration: none;
    color: #000000;
    padding: 1rem 0;
    border: 1px solid #a0130e; /* Added red border */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; /* Smooth transition */
}

/* Overlap borders to prevent doubling up */
.bottom-nav a:not(:first-child) {
    margin-left: -1px;
}

.bottom-nav a:hover {
    background-color: #a0130e; /* Red background on hover */
    color: #ffffff; /* White text on hover */
    border-color: #ffffff; /* White border on hover */
    position: relative; /* Ensures the hovered link appears on top */
    z-index: 5;
}

/* Frame Bar Styling */
.frame-bar {
    background-color: #a0130e;
    position: fixed;
    z-index: 10;
}
.left-bar {
    left: 0;
    top: 0;
    bottom: 0;
    width: 1.68rem; 
}
.right-bar {
    right: 0;
    top: 0;
    bottom: 0;
    width: 1.68rem;
}
.bottom-bar {
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.68rem;
}

/* == Contact Form Styles == */
.contact-form {
    margin-top: 2rem;
    max-width: 600px; /* Prevents the form from becoming too wide */
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: 'Faculty Glyphic', serif;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    border: 1px solid #000;
    background-color: #fff;
    color: #000;
}

.submit-btn {
    display: inline-block;
    font-family: 'Faculty Glyphic', serif;
    font-size: 1.25rem;
    color: #000;
    background-color: transparent;
    border: 1px solid #a0130e;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.submit-btn:hover {
    background-color: #a0130e;
    color: #fff;
}


/* == Responsive Styles for Mobile == */
@media (max-width: 768px) {
    /* Adjust container padding for smaller screens */
    .container {
        padding: 1rem 1rem;
        padding-left: calc(1rem + 2vw);
    }

    /* Reduce frame thickness */
    header, .bottom-bar {
        height: 1rem;
    }
    .left-bar, .right-bar {
        width: 1rem;
    }

    /* Reduce font sizes for readability */
    .top-content-block .main-title {
        font-size: 2.25rem;
    }
    .top-content-block .meaning {
        font-size: 1.5rem;
    }
    .bottom-nav a {
        font-size: 1rem;
    }

    /* Adjust margins for full-width buttons */
    .bottom-wrapper {
        margin-left: calc(-1rem - 2vw);
        margin-right: -1rem;
    }
}
