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

:root {
    --navy-primary: #3d5a80;
    --navy-dark: #293241;
    --navy-light: #5b7a9f;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --accent-gold: #d4af37;
    --accent-light-blue: #98c1d9;
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
}

body {
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Calibri", "Helvetica Neue", sans-serif;
    line-height: 1.6;
    background: linear-gradient(180deg, var(--navy-dark) 0vh, var(--navy-primary) 100vh, var(--navy-light) 130vh, var(--off-white) 160vh, var(--white) 200vh);
    color: var(--text-dark);
    margin: 0;
}

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-primary) 100%);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
    border-bottom: 3px solid var(--accent-gold);
}

nav {
    background: transparent;
    width: 100%;
    height: auto;
    max-height: 12vh;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

nav a {
    font-size: clamp(14px, 2vh, 18px);
    color: var(--white);
    text-align: center;
    padding: 1.2em 1.5em;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
    position: relative;
}

nav a.navlogo {
    padding: 0.5em 1em;
}

nav a.navlogo img {
    width: 100%;
    height: auto;
    max-width: 80px;
    max-height: 60px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

nav a:not(.navlogo):hover,
nav a:not(.navlogo):focus {
    color: var(--accent-gold);
    transform: translateY(-2px);
}

nav a:not(.navlogo)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav a:not(.navlogo):hover::after {
    width: 80%;
}

/* Typography */
h1 {
    text-align: center;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    color: var(--navy-dark);
    font-weight: 700;
    letter-spacing: 0.5px;
}

h2 {
    text-align: center;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    margin-bottom: 1.5rem;
    color: var(--navy-dark);
    font-weight: 700;
    letter-spacing: 0.5px;
}

h3 {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    text-align: center;
    color: var(--navy-primary);
    font-weight: 600;
}

.section-heading {
    position: relative;
    padding: 0 1rem 1rem;
    width: 100%;
    text-align: center;
    color: var(--navy-dark);
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-gold) 50%, transparent 100%);
    border-radius: 2px;
}

p {
    max-width: 60vw;
    text-align: center;
    line-height: 1.8;
    margin: 1rem auto;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    color: var(--text-dark);
}

.content-section article p {
    text-align: justify;
    text-align-last: center;
}

.content-section article p:first-of-type::first-letter {
    font-size: 2em;
    font-weight: bold;
    color: var(--navy-primary);
    float: left;
    line-height: 1;
    margin: 0.1em 0.1em 0 0;
}

address {
    font-style: normal;
    text-align: center;
    color: var(--navy-dark);
    line-height: 1.8;
}

/* Layout Utilities */
.right {
    float: right;
}

.center {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    clear: both;
}

.space {
    margin-bottom: 8rem;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background-color: var(--accent-gold);
    color: var(--navy-dark);
}

::-moz-selection {
    background-color: var(--accent-gold);
    color: var(--navy-dark);
}

/* Partners Section Specific Styling */
#partners .centergallery {
    background: linear-gradient(to bottom, rgba(248, 249, 250, 0.8) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-radius: 12px;
    padding: 3rem 1rem;
    margin-top: 2rem;
}

/* Anchor Decoration for Maritime Theme */
.content-section::before {
    content: '⚓';
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    opacity: 0.15;
    color: var(--navy-primary);
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section article {
    animation: fadeIn 0.6s ease-out;
}

/* Smooth Transitions for All Interactive Elements */
a, button, .tile, .ptile {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus Visible for Accessibility */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent-gold);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Content Sections */
.content-section {
    padding: 4rem 1rem;
    scroll-margin-top: 12vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.content-section article {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--navy-light);
    max-width: 900px;
    margin: 0 auto;
}

.content-section#tt,
.content-section#about {
    background: linear-gradient(135deg, rgba(152, 193, 217, 0.1) 0%, rgba(255, 255, 255, 0.8) 100%);
}

main {
    min-height: 100vh;
}

/* Banner */
.banner {
    width: 100%;
    margin-bottom: 15vh;
    position: relative;
    border-bottom: 4px solid var(--accent-gold);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.banner::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--accent-gold) 0px,
        var(--accent-gold) 10px,
        var(--navy-primary) 10px,
        var(--navy-primary) 12px
    );
}

.banner img {
    width: 100%;
    height: auto;
    display: block;
    filter: contrast(1.05) brightness(0.95);
}

/* Gallery Sections */
.centergallery {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    clear: both;
    padding: 2rem 1rem;
    position: relative;
}

.centergallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(152, 193, 217, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

section.gallery {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    clear: both;
    position: relative;
    z-index: 1;
}

.gallery div {
    margin: 1em;
}

/* Tiles */
.tile {
    text-decoration: none;
    color: var(--navy-dark);
    display: block;
    transition: all 0.3s ease;
    position: relative;
}

.tile:hover {
    transform: translateY(-8px);
}

.tile:hover .description {
    color: var(--accent-gold);
    font-weight: 700;
}

.tile img {
    width: 100%;
    height: 40vh;
    max-width: 50vh;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    border: 3px solid var(--navy-light);
    transition: all 0.3s ease;
    object-fit: cover;
    object-position: center;
}

.tile:hover img {
    border-color: var(--accent-gold);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.tile .description {
    text-align: center;
    margin-top: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    transition: all 0.3s ease;
    color: var(--navy-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Partner Tiles */
.ptile {
    text-decoration: none;
    color: var(--navy-dark);
    margin: 1vh 1vw;
    transition: all 0.3s ease;
    display: block;
    padding: 1rem;
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.ptile:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(61, 90, 128, 0.2);
    border-color: var(--accent-gold);
}

.ptile:hover .description {
    color: var(--accent-gold);
}

.ptile img {
    width: 100%;
    height: auto;
    max-width: 20vh;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.ptile:hover img {
    filter: brightness(1.1);
}

.ptile .description {
    text-align: center;
    margin-top: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    color: var(--navy-dark);
    font-size: 0.9rem;
}

/* Contact Section */
.contact-info {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: linear-gradient(135deg, var(--off-white) 0%, var(--white) 100%);
    border-radius: 12px;
    border: 2px solid var(--navy-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.contact-info h3 {
    color: var(--navy-primary);
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.content-section article .contact-info p:first-of-type::first-letter {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    float: none;
    margin: 0;
}

.contact-info a {
    color: var(--navy-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

.note {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-medium);
    background: var(--off-white);
    padding: 1rem;
    border-left: 4px solid var(--navy-light);
    border-radius: 4px;
}

.certification {
    font-weight: 600;
    margin-top: 1.5rem;
    color: var(--navy-primary);
    background: var(--off-white);
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid var(--accent-gold);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-primary) 100%);
    color: var(--white);
    text-align: center;
    padding: 2.5rem 1rem;
    margin-top: 4rem;
    border-top: 4px solid var(--accent-gold);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--accent-gold) 0px,
        var(--accent-gold) 10px,
        var(--navy-primary) 10px,
        var(--navy-primary) 12px
    );
}

footer p {
    max-width: 100%;
    color: var(--white);
    margin: 0;
    font-weight: 500;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .hidemobile {
        display: none;
    }

    nav {
        flex-wrap: wrap;
        max-height: none;
    }

    nav a {
        font-size: 14px;
        padding: 1em 0.8em;
    }

    nav a.navlogo img {
        max-width: 60px;
        max-height: 50px;
    }

    nav a:not(.navlogo)::after {
        display: none;
    }

    .centergallery {
        flex-direction: column;
        min-height: auto;
    }

    section.gallery {
        width: 100%;
    }

    p {
        max-width: 90vw;
    }

    .tile img {
        max-width: 80vw;
    }

    .ptile {
        padding: 0.75rem;
    }

    .ptile img {
        max-width: 30vw;
    }

    .content-section {
        padding: 3.5rem 0.5rem 2rem;
    }

    .content-section::before {
        top: 0.5rem;
        font-size: 1.5rem;
    }

    .content-section article {
        padding: 1.5rem;
        animation: none;
    }

    .contact-info {
        padding: 1.5rem;
    }

    .banner {
        margin-bottom: 80px;
    }

    .tile img {
        height: 250px;
        max-width: 300px;
    }

    .ptile img {
        max-width: 120px;
    }

    a, button, .tile, .ptile, .tile img, .ptile img {
        transition: none;
    }

    footer {
        padding: 2rem 1rem;
    }
}

@media screen and (max-width: 480px) {
    nav a {
        padding: 0.8em 0.5em;
        font-size: 12px;
    }

    .section-heading {
        font-size: 1.5rem;
        padding: 0 0.5rem 1rem;
    }

    .space {
        margin-bottom: 4rem;
    }

    .tile .description {
        font-size: 1rem;
    }

    .content-section article p:first-of-type::first-letter {
        font-size: 1.5em;
    }
}