/* Custom Properties */
:root {
    --navy-blue: #1a2e4a;
    --gold: #c8942a;
    --gold-light: #e6b83f;
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #f9f9f9;
    --white: #ffffff;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    margin-top: 80px; /* Space for fixed header */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--navy-blue);
    margin-bottom: 1rem;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: var(--navy-blue);
    transition: var(--transition);
}

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

/* Reusable Components */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 5rem 0;
}

.section-bg {
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--gold);
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--gold);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--navy-blue);
    color: var(--white);
}

.btn-secondary {
    background-color: transparent;
    color: var(--navy-blue);
    border: 2px solid var(--navy-blue);
}

.btn-secondary:hover {
    background-color: var(--navy-blue);
    color: var(--white);
}

/* Header & Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: var(--transition);
    height: 80px;
}

.site-header.scrolled {
    height: 70px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.site-header.scrolled .site-logo {
    height: 40px;
}

.site-title {
    font-size: 1.2rem;
    margin: 0;
    color: var(--navy-blue);
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap; /* Keep links on a single row */
}

.main-nav li {
    margin-left: 1.2rem;
    flex-shrink: 0;
}

.main-nav a {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    text-transform: uppercase;
    position: relative;
    padding: 0.5rem 0;
    white-space: nowrap;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold);
    transition: var(--transition);
}

.main-nav a:hover, .main-nav a.active {
    color: var(--navy-blue);
}

.main-nav a:hover::after, .main-nav a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--navy-blue);
    margin: 5px 0;
    transition: var(--transition);
}

/* FooterStyles */
.site-footer {
    background-color: var(--navy-blue);
    color: var(--white);
    padding: 4rem 0 0 0;
}

.footer-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: var(--gold);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    text-decoration: none;
}

.footer-logo {
    height: 60px;
}

.footer-site-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--white);
}

.footer-mission {
    font-style: italic;
    margin-bottom: 1rem;
    color: #cccccc;
}

.registry-id {
    font-size: 0.9rem;
    color: var(--gold-light);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #cccccc;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--gold);
    padding-left: 5px;
}

.contact-col address {
    font-style: normal;
    color: #cccccc;
}

.contact-col p {
    margin-bottom: 0.8rem;
}

.contact-col strong {
    color: var(--white);
}

.contact-col a {
    color: var(--gold-light);
}

.contact-col a:hover {
    color: var(--white);
}

.footer-bottom {
    background-color: #0f1d30;
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
    color: #999999;
}

/* Page Headers */
.page-header {
    background-color: var(--navy-blue);
    color: var(--white);
    padding: 6rem 0 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 46, 74, 0.85); /* Navy overlay */
    z-index: 1;
}

/* Ensure images embedded within the page-header don't overflow the container */
.page-header > img.header-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.page-header-content {
    position: relative;
    z-index: 2;
}

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

.page-header p {
    font-size: 1.2rem;
    color: var(--gold);
    max-width: 600px;
    margin: 0 auto;
}

/* Hero Section */
.hero {
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--white);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(26,46,74,0.7), rgba(26,46,74,0.9));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero-title {
    font-size: 4rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    line-height:1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

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

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    align-items: center;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.card-img-container {
    height: 200px;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    flex: 1;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border: 2px solid var(--white);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--gold);
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white);
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    padding: 20px;
    transition: color 0.3s;
    user-select: none;
}

.lightbox-prev:hover, .lightbox-next:hover {
    color: var(--gold);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Content Blocks */
.content-text {
    font-size: 1.1rem;
}

.content-block {
    margin-bottom: 2rem;
}

/* Timeline specific styles */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--navy-blue);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -12px;
    background-color: var(--white);
    border: 4px solid var(--gold);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}
.right {
    left: 50%;
}
.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid var(--white);
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--white);
}
.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid var(--white);
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--white) transparent transparent;
}
.right::after {
    left: -13px;
}
.timeline-content {
    padding: 20px 30px;
    background-color: var(--white);
    position: relative;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.timeline-date {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}
.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 5px rgba(200, 148, 42, 0.3);
}
textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* Contact Details Wrapper */
.contact-wrapper {
    background-color: var(--navy-blue);
    color: var(--white);
    padding: 3rem;
    border-radius: 8px;
    height: 100%;
}

.contact-wrapper h3 {
    color: var(--gold);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 15px;
}

.contact-wrapper a {
    color: var(--gold-light);
}

.contact-wrapper a:hover {
    color: var(--white);
}

/* Mobile Responsiveness */
@media (max-width: 1100px) {
    .site-title {
        display: none;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item::before {
        left: 60px;
        border: medium solid white;
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
    }
    
    .left::after, .right::after {
        left: 18px;
    }
    
    .right {
        left: 0%;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        z-index: 1001;
    }
    
    .site-title {
        display: block;
        font-size: 1rem;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--white);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        padding-top: 80px;
        z-index: 1000;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 2rem;
    }
    
    .main-nav li {
        margin: 0 0 1.5rem 0;
    }
    
    .main-nav a {
        font-size: 1.2rem;
    }
    
    /* Hamburger animation */
    .mobile-menu-toggle.active .hamburger:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-menu-toggle.active .hamburger:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.active .hamburger:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}
