/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    .background-color: #1e3a8a;
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: 700;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #93c5fd;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 400px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center; /* Ensures full center alignment */
    text-align: center; /* Centers text inside */
}

.carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-logo {
    width: 250px; /* Default size for large screens */
    height: 250px;
    max-width: 100%; /* Prevents overflow */
    display: block;
    margin: 0 auto 20px; /* Centers and adds spacing below */
}

/* Responsive Logo Size */
@media (max-width: 1024px) {
    .hero-logo {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .hero-logo {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .hero-logo {
        width: 100px;
        height: 100px;
    }
}

.hero-content {
    text-align: center;
    padding: 20px;
    color: #ffffff;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Ensures horizontal centering */
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
}

.hero p {
    font-size: 20px;
    max-width: 600px;
    margin: 0 auto 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.cta-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: #93c5fd;
    color: #1e3a8a;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #1e3a8a;
    color: #ffffff;
}

/* Section Styles */
.section {
    padding: 60px 20px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.section.in-view {
    opacity: 1;
    transform: translateY(0);
}

.section h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #1e3a8a;
}

.section p {
    font-size: 16px;
    max-width: 800px;
    margin: 0 auto 20px;
}

/* Team Section */
.team-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    perspective: 1000px;
    flex-wrap: wrap; /* Ensures wrapping on smaller screens */
}

/* Default order for large screens */
.team-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-align: center;
    transition: transform 0.3s ease-in-out;
    width: 450px;
    height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Middle card (Sarah) appears larger */
.middle-card {
    transform: scale(1.1);
    z-index: 2;
}

/* Hover effect */
.team-card:hover {
    transform: scale(1.15);
}

.team-card img {
    width: 80%;
    height: auto;
    border-radius: 10px;
    max-height: 250px; /* Ensures image stays within the card */
    object-fit: cover;
}

.team-card .description {
    display: none;
    font-size: 14px;
    margin-top: 10px;
}

.team-card:hover .description {
    display: block;
}

/* Reordering team members on small screens */
@media (max-width: 768px) {
    .team-container {
        flex-direction: column;
        align-items: center;
    }

    /* Order: Sarah -> Christian -> Graham */
    .team-card:nth-child(2) { order: 1; } /* Sarah */
    .team-card:nth-child(3) { order: 2; } /* Christian */
    .team-card:nth-child(1) { order: 3; } /* Graham */

    .team-card {
        width: 90%;
        height: auto;
        padding: 10px;
    }

    .team-card img {
        width: 100%;
        max-height: 200px;
    }
}

/* Contact Section */
.contact-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.contact-details {
    flex: 1;
    max-width: 50%;
}

.contact-form {
    flex: 1;
    max-width: 50%;
}

.contact-form form {
    display: flex;
    flex-direction: column;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.contact-form button {
    padding: 12px;
    background-color: #1e3a8a;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: #93c5fd;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 15px;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
    }

    nav ul li {
        margin: 10px 0;
    }

    .hero {
        padding: 30px;
        height: auto;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .cta-button {
        padding: 10px 20px;
    }

    .section {
        padding: 40px 10px;
    }

    .team-container {
        flex-direction: column;
    }

    .contact-container {
        flex-direction: column;
        text-align: center;
    }

    .contact-details, .contact-form {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 24px;
    }

    .hero p {
        font-size: 14px;
    }

    form {
        max-width: 100%;
    }
}
