* {
    box-sizing: border-box; /* Ensure padding stays inside the width */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 800px;
    margin: 0 auto;
    font-family: "Georgia", "Times New Roman", serif;
    position: relative;
}

/* Fixed layer behind page content */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(100, 121, 93, 0.8), rgba(0,0,0,0.8)),
        url('/images/bg.jpg') center/cover no-repeat;
    z-index: -1; /* Always keep behind content */
}

.nav-links {
    font-family: "Lato", "Arial", sans-serif;
    letter-spacing: 1px;
}

.full-width-nav, .navbar {
    background-color: #6d6161;
    padding: 10px 40px;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.nav-links a {
    color: rgb(196, 196, 196);
    text-decoration: none;
}

header, main, footer {
    backdrop-filter: blur(10px);
}

header {
    font-family: "Playfair Display", "Garamond", serif;
    margin-top: 40px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 20px 20px 0 0;
    padding: 15px 40px;
}

header h1 {
    color: rgb(226, 232, 205);
}

header .main-title {
    font-size: 45pt;
    color: rgb(226, 232, 205);
    margin: 0;
}

header .qualification {
    font-size: 18pt;
    color: rgb(226, 232, 205);
    margin-left: 5px;
}

header .sub-title {
    font-size: 30pt;
    color: rgb(205, 187, 187);
    margin: 0;
}

main {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgb(205, 187, 187);
    padding: 10px 40px;
    line-height: 1.6;
}

main img.photo {
    border: 1px solid rgb(156, 173, 151);
    padding: 5px;
    background-color: rgba(255, 255, 255, 0.05);
}

img.bacp-logo {
    border: 5px solid white;
    padding: 10px;
    background-color: white;
}

main ul {
    list-style-type: circle;
    list-style-position: outside;
    padding-left: 40px;
}

footer {
    margin-bottom: 40px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 0 0 20px 20px;
    color: rgb(205, 187, 187);
    padding: 15px 40px;
}

.parent-container-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 5px 5px;
    row-gap: 10px;
}

.parent-container-main, .parent-container-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    column-gap: 40px;
    align-items: center;
}

.full-width {
    flex: 1 0 100%;
    margin: 0;
    padding: 0;
}

.full-width h1 {
    margin: 0;
    line-height: 1.2;
    padding-top: 25px;
    padding-bottom: 15px;
}

.parent-container-main div p {
    margin-top: 0; 
}

.photo {
    display: block;    
    max-width: 100%;
    height: auto;
}

.parent-container-main > div:not(.full-width) {
    flex: 1 1 300px;
}

h1, h2 {
    font-family: "Playfair Display", "Garamond", serif;
    font-weight: normal;
    color: rgb(205, 187, 187);
}

p.emphasise {
    color: rgb(195, 142, 189);
    font-size: large;
}

a {
    color: rgb(230, 227, 166);
    text-decoration: none;
    transition: color 0.3s ease;
}

table {
    border: none !important;
    color: rgb(205, 187, 187);
}

td {
    padding:3px;
}

table.legal {
    border-collapse: collapse;
}

table.legal th,
table.legal td {
    border: 1px solid rgb(150, 150, 150);
    padding: 12px 15px;
}

td.heading {
    vertical-align: top;
}

td.small {
    font-size: small;
}

a:hover, .nav-links a.active:hover {
    color: rgba(255, 215, 0, 1);
}

.no-wrap {
    white-space: nowrap;
}

.nav-links a.active {
    color: white;
    font-weight: bold;
}

/* Mobile-specific fixes for iPhone */
@media (max-width: 600px) {
    header .main-title {
        font-size: 28pt; /* Reduced from 45pt */
    }
    
    header .sub-title {
        font-size: 18pt; /* Reduced from 30pt */
    }

    header, main, footer {
        padding: 15px 20px; /* Reduced from 40px */
    }
}
