/* --- Global Styles & Variables --- */
:root {
    --primary-color: #6A5ACD; /* SlateBlue */
    --secondary-color: #F0F8FF; /* AliceBlue */
    --accent-color: #66CDAA; /* MediumAquamarine */
    --text-color: #2F4F4F; /* DarkSlateGray */
    --light-text-color: #FFFFFF;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h2 {
    text-align: center;
    font-size: 2.5rem;
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
}

section {
    padding: 100px 5%;
}

section:nth-of-type(even) {
    background-color: var(--secondary-color);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--light-text-color);
}

.btn-primary:hover {
    background-color: #5ab89a;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--light-text-color);
    border: 2px solid var(--light-text-color);
}

.btn-secondary:hover {
    background-color: var(--light-text-color);
    color: var(--primary-color);
}

/* --- Header & Navigation Enhancements --- */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    z-index: 1000;
    box-shadow: none;
    border-bottom: 1px solid transparent;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

header.scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-color: #eee;
}

.logo a {
    text-decoration: none;
}

.logo img {
    height: 50px; 
    width: auto;
    display: block;
}

.desktop-navigation ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

.desktop-navigation a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.desktop-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease-out;
}

.desktop-navigation a:hover {
    color: var(--primary-color);
}

.desktop-navigation a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Hides the mobile-only navigation by default */
.primary-navigation {
    display: none;
}

/* --- Mobile Navigation Styles --- */
.mobile-nav-toggle {
    display: none;
    position: absolute;
    z-index: 2000;
    right: 1.5rem;
    top: 1.5rem;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.mobile-nav-toggle .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* --- Hero Section Enhancements --- */
#hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--light-text-color);
    background: linear-gradient(rgba(47, 79, 79, 0.6), rgba(47, 79, 79, 0.6)), url('hero.png') no-repeat center center/cover;
    padding: 0 5%;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--light-text-color);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 800px;
    text-align: center;
}

.hero-buttons .btn {
    margin: 0 10px;
}

#hero .btn-primary {
    box-shadow: 0 4px 15px rgba(102, 205, 170, 0.4);
}

.hero-content h1,
.hero-content p,
.hero-content .hero-buttons {
    animation: fadeInAnimate 1s ease-out forwards;
    opacity: 0;
}

.hero-content h1 {
    animation-delay: 0.2s;
}
.hero-content p {
    animation-delay: 0.4s;
}
.hero-content .hero-buttons {
    animation-delay: 0.6s;
}

@keyframes fadeInAnimate {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- About Us Enhancements --- */
.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 1100px;
    margin: 0 auto;
}

.about-container:not(:last-child) {
    margin-bottom: 80px;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    border: 5px solid var(--secondary-color);
    transition: border-color 0.3s ease;
}

.about-image img:hover {
    border-color: var(--accent-color);
}

.about-text {
    flex: 1.5;
}

.about-text h2,
.about-text h3 {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: 1.5rem;
}

.about-text h2::after,
.about-text h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
}

.about-container--inverted .about-text h3::after {
    left: 0; 
}


/* --- Services Section Enhancements --- */
.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    align-items: start;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
}

.service-cards .card {
    border-top: 4px solid var(--primary-color);
    background: #fff;
    padding: 30px;
    border-radius: 0 0 10px 10px;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-cards .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card .price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin: 1rem 0;
}

.card ul {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
    padding-left: 10px;
    flex-grow: 1;
}

.card ul li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 30px;
}

.card ul li::before {
    content: '✔';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.featured-card {
    position: relative;
    border-top-color: var(--accent-color);
    transform: scale(1.05);
}

.featured-card:hover {
     transform: scale(1.1) translateY(-10px);
}

.featured-card::before {
    content: 'Popular';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: var(--light-text-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* --- Testimonials Section --- */
.testimonial-item {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 900px;
    margin: 0 auto 60px auto;
}

.testimonial-item:nth-child(even) {
    flex-direction: row-reverse;
}

.testimonial-img {
    flex-shrink: 0;
}

.testimonial-img img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--card-shadow);
}

.testimonial-text {
    flex: 1;
}

.testimonial-text blockquote {
    font-size: 1.2rem;
    font-style: italic;
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
    margin-bottom: 1rem;
}

.testimonial-text cite {
    font-weight: bold;
    color: var(--primary-color);
}

/* --- Contact Section --- */
.contact-card {
    display: flex;
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    box-shadow: var(--card-shadow);
    border-radius: 10px;
    overflow: hidden;
}

.contact-image {
    flex: 1;
    background: url('contactimage.png') no-repeat center center/cover;
    min-width: 300px;
}

.contact-form-container {
    flex: 1.5;
    padding: 40px;
}

.contact-form-container form {
    display: flex;
    flex-direction: column;
}

.contact-form-container input,
.contact-form-container textarea {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-family: inherit;
    font-size: 1rem;
}

.contact-form-container button {
    align-self: flex-start;
}

/* --- Socials Section (with CSS Grid) --- */
.social-embeds {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

.social-item {
    text-align: center;
}
.social-item h3 {
    margin-bottom: 15px;
}
.instagram-link-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    max-width: 340px;
    width: 100%;
    height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0 auto;
}
.instagram-link-card img {
    border-radius: 50%;
    margin-bottom: 15px;
    height: 100px;
    width: 100px;
    object-fit: cover;
}

/* --- Footer --- */
footer {
    background: var(--text-color);
    color: var(--light-text-color);
    padding: 3rem 5%;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    align-items: center; /* Vertically centers the columns */
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-height: 100px; 
    justify-content: center;
}

/* Set both logos to the same height for alignment */
.footer-logo {
    height: 80px;
    width: auto;
}

.wearside-web-logo {
    height: 80px;
    width: auto;
    max-width: 150px;
    border-radius: 5px;
}

/* styles for icon links */
.footer-social-links {
    display: flex;
    gap: 25px; /* Space between icons */
    
    /* Added for alignment */
    min-height: 2rem; 
    align-items: center;
}

.footer-social-links a {
    color: var(--light-text-color);
    text-decoration: none;
    transition: color 0.3s, transform 0.3s;
    font-size: 1.8rem; /* Icon size */
}

.footer-social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* style to remove underline from Wearside Web link */
.wearside-web-link {
    color: var(--light-text-color);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: color 0.3s;
}

/* Added for alignment */
.wearside-web-link p {
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wearside-web-link:hover {
    color: var(--accent-color);
}

.footer-col-3 {
    font-size: 0.9rem;
}


/* --- Modal Popup --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    text-align: center;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #aaa;
}
.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}
.modal-content input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    /* Hide the desktop nav on mobile */
    .desktop-navigation {
        display: none;
    }

    /* --- Mobile Navigation Overlay Styles --- */
    .primary-navigation {
        position: fixed;
        inset: 0;
        z-index: 1500; /* Ensures menu is above content but below toggle */
        background: rgba(106, 90, 205, 0.98); 
        backdrop-filter: blur(5px);
        display: flex;
        justify-content: center;
        align-items: center;
        clip-path: circle(0% at 100% 0%);
        transition: clip-path 0.6s ease-in-out;
        pointer-events: none;
    }

    .primary-navigation[data-visible="true"] {
        clip-path: circle(150% at 100% 0%); 
        pointer-events: auto;
    }

    .close-mobile-nav {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        background: transparent;
        border: 0;
        color: var(--light-text-color);
        font-size: 2.5rem;
        cursor: pointer;
        line-height: 1;
    }

    .primary-navigation ul {
        list-style: none;
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }

    .primary-navigation a {
        color: var(--light-text-color);
        font-size: 1.8rem;
        font-weight: bold;
    }
    .primary-navigation a:hover {
        color: var(--accent-color);
    }
    .primary-navigation a::after {
        background-color: var(--accent-color);
    }

    /* --- Hamburger Icon Styling --- */
    .mobile-nav-toggle {
        display: block;
        z-index: 2000;
        width: 2rem;
        height: 2rem;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgb(106, 90, 205)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%f</svg%3e");
        background-repeat: no-repeat;
    }

    .mobile-nav-toggle[aria-expanded="true"] {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgb(255, 255, 255)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M6 6l18 18M24 6L6 24'/%3e%3c/svg%3e");
    }

    /* --- Other Mobile Layout Adjustments --- */
    section { padding: 60px 5%; }
    h2 { font-size: 2rem; }
    .hero-content h1 { font-size: 2.5rem; }

    .about-container,
    .about-container--inverted { 
        flex-direction: column; 
        text-align: center;
        gap: 30px;
    }

    .testimonial-item,
    .testimonial-item:nth-child(even) {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    .testimonial-img img { margin: 0 auto; }
    .contact-card { flex-direction: column; }
    .contact-image { min-height: 200px; }

    .featured-card {
        transform: scale(1);
    }
    .featured-card:hover {
        transform: translateY(-10px);
    }
    
    .social-embeds {
        grid-template-columns: 1fr;
    }
}