/* General Styles */
:root {
    /* Sailboat Theme Palette */
    --primary-blue: #007aff;
    /* Nautical Blue */
    --secondary-teal: #008080;
    /* Teal */
    --accent-gold: #D4AF37;
    /* Gold */
    --bg-body: #f5f5f7;
    /* Off-white */
    --bg-card: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --text-light: #ffffff;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.03);
    --radius: 4px;
    /* Sharper edges for luxury feel */
}

[data-theme="dark"] {
    --primary-blue: #0a84ff;
    --secondary-teal: #4db6ac;
    --accent-gold: #ffd700;
    --bg-body: #1c1c1e;
    --bg-card: #2c2c2e;
    --text-main: #f5f5f7;
    --text-muted: #a1a1a6;
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    /* Lighter weight for premium feel */
    margin: 0;
    padding: 0;
    color: var(--text-main);
    background-color: var(--bg-body);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.8;
    /* Increased breathing room */
    text-align: center;
    overflow-x: hidden;
    letter-spacing: 0.3px;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    margin: 0;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    letter-spacing: -0.5px;
    /* Tight serif kerning for elegant headers */
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: all 0.3s;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 500;
}

a:hover {
    color: var(--secondary-teal);
    text-decoration: none;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background-color: var(--bg-card);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s;
}

header .logo img {
    height: 50px;
    display: block;
}

header nav ul li a:hover {
    color: var(--primary-blue);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

#hamburger {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    padding: 0;
    z-index: 1100;
}

#hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

#hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#hamburger.active span:nth-child(2) {
    opacity: 0;
}

#hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

#nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--bg-card);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1050;
}

#nav-menu.active {
    right: 0;
}

#nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

#nav-menu ul li {
    margin: 0;
}

#nav-menu ul li a {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text-main);
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#nav-menu ul li a:hover {
    color: var(--primary-blue);
}

#theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s, color 0.3s;
}

#theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-blue);
}

[data-theme="dark"] #theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
#hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('sailboat-header.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
    text-align: center;
    padding: 0 20px;
}

#hero h1 {
    font-size: 2.5rem;
    max-width: 800px;
    margin-bottom: 25px;
    color: var(--text-light);
    line-height: 1.3;
}

.cta-button {
    display: inline-block;
    padding: 16px 40px;
    background-color: var(--accent-gold);
    color: #111;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
}

.cta-button:hover {
    background-color: #e5c100;
    transform: translateY(-2px);
    color: #333;
}

/* Sections General */
section {
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center children vertically and horizontally */
    justify-content: center;
}

section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2rem;
    position: relative;
    padding-bottom: 15px;
    width: 100%;
}

section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-gold);
    margin: 15px auto 0;
}

/* Services */
#services {
    background-color: var(--bg-card);
}

.services-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.service-box {
    text-align: center;
    padding: 30px;
    background: var(--bg-body);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s;
    width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.service-icon {
    display: flex;
    justify-content: center;
    width: 100%;
}

.service-box h3 {
    margin-bottom: 15px;
    color: var(--text-main);
    width: 100%;
}

.service-box p {
    color: var(--text-muted);
    font-size: 0.95rem;
    width: 100%;
}

/* About Us */
#about {
    background-color: var(--bg-body);
}

#about p {
    max-width: 800px;
    margin: 0 auto 20px;
}

.team {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    width: 100%;
}

.team-member {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--accent-gold);
}

.team-member h4 {
    color: var(--primary-blue);
    margin-bottom: 5px;
}

/* Portfolio */
#portfolio {
    background-color: var(--bg-card);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.portfolio-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    aspect-ratio: 4/3;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Testimonials */
#testimonials {
    background-color: var(--bg-body);
}

.testimonial-carousel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial {
    padding: 20px;
    font-style: italic;
    color: var(--text-muted);
}

/* Schedule & Plans */
#schedule,
#plans {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Contact */
#contact {
    background-color: var(--bg-body);
}

.contact-form {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    text-align: left;
    box-sizing: border-box;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: var(--bg-body);
    color: var(--text-main);
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1rem;
}

.contact-form button {
    width: 100%;
    padding: 16px 40px;
    background-color: var(--accent-gold);
    color: #111;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.contact-form button:hover {
    background-color: #e5c100;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Footer */
footer {
    background-color: var(--bg-card);
    color: var(--text-main);
    padding: 50px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background-color 0.3s, color 0.3s;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] footer {
    background-color: #222;
    color: #fff;
}

footer h3 {
    color: var(--text-main);
}

[data-theme="dark"] footer h3 {
    color: #fff;
}

.footer-content {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Center footer columns */
    gap: 40px;
}

footer .footer-contact,
footer .footer-hours,
footer .footer-nav {
    text-align: center !important;
    /* Force center footer text */
    flex: 1;
    min-width: 250px;
}

footer .footer-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center links in the column */
    gap: 10px;
}

footer a {
    color: var(--text-main);
    opacity: 0.8;
}

[data-theme="dark"] footer a {
    color: #fff;
}

footer a:hover {
    opacity: 1;
}

footer .social-media a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    margin: 0 10px;
    transition: background-color 0.3s, transform 0.3s;
    color: var(--text-main);
    text-decoration: none;
}

[data-theme="dark"] footer .social-media a {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

footer .social-media a:hover {
    background-color: var(--primary-blue);
    transform: translateY(-3px);
}

footer .social-media svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}