/* --- Global Styles & Variables --- */
:root {
    --primary-bg: #F1F1F1; /* Light Grey/Off-white */
    --primary-text: #333333;
    --heading-text: #455257; /* Dark Grey/Slate */
    --accent-color: #B08D57; /* Muted Gold/Bronze */
    --accent-hover: #9a7c4c;
    --white: #FFFFFF;
    --light-grey-bg: #FAFAFA; /* Slightly off-white for alternate sections */
    --border-color: #DDDDDD;

    --font-heading: 'Cinzel', serif;
    --font-body: 'Cormorant Garamond', serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--primary-text);
    background-color: var(--primary-bg);
    font-size: 17px; /* Base font size for better readability */
    overflow-wrap: break-word;
    word-wrap: break-word;
    -ms-word-break: break-word;
    word-break: break-word;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--heading-text);
    margin-bottom: 0.8em;
    line-height: 1.3;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5em;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 1.5em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

h3 {
    font-size: 1.8rem;
    color: var(--heading-text);
}

h4 {
    font-size: 1.4rem;
    color: var(--heading-text);
}

p {
    margin-bottom: 1.2em;
}

ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.2em;
}

ul li {
    padding-left: 1.5em;
    position: relative;
    margin-bottom: 0.5em;
}

ul li::before {
    content: '✓';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
    word-break: break-all;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.responsive-img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    object-fit: cover;
}
.medium-img {
    max-width: 100%;
    width: 100%;
    max-width: 500px;
    display: block;
    margin: 1em auto;
}
.centered-img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.space-above {
    margin-top: 2em;
}
.caption {
    text-align: center;
    font-style: italic;
    color: #666;
    font-size: 0.9em;
    padding: 0 1rem;
}


/* --- Header & Navigation --- */
#header {
    background-color: var(--white);
    padding: 1em 0;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#logo {
    height: 60px;
}

/* Override SVG logo colors to make text visible against white background */
.logo-link svg .a6izo4zJpcolor path, 
.logo-link svg .aD6z1nYkhcolor path, 
.logo-link svg .aLgOaV3zRcolors-0,
.logo-link svg .asr1BtIxlfillColor,
.logo-link svg .aR9TavoXYfillColor {
    fill: var(--heading-text) !important; /* Use site heading color for better visibility */
}

#nav-menu ul {
    list-style: none;
    display: flex;
    margin-bottom: 0;
}

#nav-menu ul li {
    margin-left: 1.5em;
    padding-left: 0;
}
#nav-menu ul li::before {
    content: none;
}

#nav-menu ul li a {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--heading-text);
    padding: 0.5em 0;
    position: relative;
    white-space: nowrap; /* Prevent text wrapping */
    display: inline-block; /* Ensure the entire text stays together */
}

#nav-menu ul li a:hover,
#nav-menu ul li a.active {
    color: var(--accent-color);
    text-decoration: none;
}

#nav-menu ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

#nav-menu ul li a:hover::after,
#nav-menu ul li a.active::after {
    width: 100%;
}

/* Dropdown Menu - Desktop */
.dropdown {
    position: relative;
}
.dropdown-arrow {
    font-size: 0.7em;
    margin-left: 5px;
    pointer-events: none; /* So it doesn't interfere with link click */
}
.dropdown-content {
    display: none !important; /* Hidden by default with !important */
    position: absolute;
    background-color: var(--white);
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    padding: 0.5em 0;
    border-radius: 4px;
    margin-top: 5px;
}
.dropdown-content li {
    width: 100%;
    margin-left: 0;
}
.dropdown-content a {
    color: var(--heading-text);
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-size: 0.95em;
}
.dropdown-content a:hover {
    background-color: var(--primary-bg);
    color: var(--accent-color);
}

/* Desktop: Show dropdown on hover or when parent link has focus and dropdown is focusable */
@media (min-width: 769px) {
    .dropdown:hover .dropdown-content,
    .dropdown > a:focus + .dropdown-content { /* Parent link focus */
        display: block !important; /* Override the !important in the default style */
    }
}


#mobile-menu-toggle {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: var(--heading-text);
    cursor: pointer;
}

/* --- General Section Styling --- */
section {
    padding: 60px 0;
}

section:nth-child(even) {
    background-color: var(--light-grey-bg);
}
.section-intro {
    text-align: center;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 2em auto;
    color: #555;
}

/* --- Hero Section (Home) --- */
.hero-section {
    color: var(--white);
    padding: 0;
    text-align: left;
    min-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(48, 58, 62, 0.95) 0%, rgba(48, 58, 62, 0.8) 50%, rgba(48, 58, 62, 0.6) 100%), url('images/hero-background-placeholder.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 80px 0;
    gap: 2rem;
}

.hero-text {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    margin-bottom: 2rem;
}

.hero-section h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 0.2em;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-section .tagline {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-bottom: 1.2em;
    font-weight: 500;
    position: relative;
    display: inline-block;
    border-bottom: none;
    transform: none;
    text-align: left;
    left: 0;
}

.hero-section .sub-headline {
    font-size: 1.3rem;
    margin-bottom: 2em;
    font-weight: 300;
    line-height: 1.5;
    max-width: 550px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-features {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--accent-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    transition: all 0.3s ease;
    width: 100%; /* Ensure cards take full width */
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.feature-card:last-child {
    margin-bottom: 45px; /* Extra space before the scroll indicator */
}

.feature-icon {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    text-align: center;
}

.feature-text h3 {
    color: var(--white);
    margin-bottom: 0.3rem;
    font-size: 1.25rem;
}

.feature-text p {
    margin-bottom: 0;
    font-size: 1rem;
    opacity: 0.85;
    line-height: 1.4;
    padding-right: 5px;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    animation: bounce 2s infinite;
    padding: 30px 0 15px 0;
    margin-top: 20px;
    background: linear-gradient(to bottom, transparent, rgba(48, 58, 62, 0.95) 70%);
    z-index: 5;
}

.hero-scroll-indicator a {
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.hero-scroll-indicator a:hover {
    opacity: 1;
    color: var(--white);
}

.scroll-text {
    margin-bottom: 0.5rem;
}

.scroll-arrow {
    font-size: 1.2rem;
    line-height: 1;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}


/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 25px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    border: none;
    margin: 0.5em;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
}
.btn-primary:hover {
    background-color: var(--accent-hover);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}
.btn-secondary:hover {
    background-color: var(--accent-color);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
}
.hero-section .btn-secondary {
    color: var(--white);
    border-color: var(--white);
}
.hero-section .btn-secondary:hover {
    background-color: var(--white);
    color: var(--accent-color);
}
.cta-group {
    margin-top: 2em;
}


/* --- About Us Section --- */
#about .about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}
#about .about-text {
    flex: 2;
    min-width: 300px;
    width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}
#about .about-text p {
    max-width: 100%;
}
#about .about-image-area {
    flex: 1;
    text-align: center;
    min-width: 250px;
    max-width: 100%;
}
#about .team-introduction {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 2em 0;
}
#about .team-member {
    background-color: var(--white);
    padding: 1.5em;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
}
#about .team-member img.team-photo {
    width: 180px;
    height: 180px;
    max-width: 80%;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1em;
    margin-left: auto;
    margin-right: auto;
    border: 4px solid var(--accent-color);
}

/* Specific adjustment for Charlotte's photo to avoid head being cut off */
#about .team-member img[src="images/New picture for website Charlotte.JPEG"],
#about .team-member img[data-src="images/New picture for website Charlotte.JPEG"],
#about .team-member img[alt="Charlotte Zablocki"] {
    object-position: center 10% !important; /* Move the focal point up to show the top of her head */
}
#about .team-summary {
    text-align: center;
    margin-top: 1.5em;
    font-style: italic;
}


/* --- Services Section --- */
/* Services Quick Navigation */
.services-quick-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    position: sticky;
    top: 80px;
    background: rgba(245, 245, 245, 0.95);
    padding: 15px;
    border-radius: 8px;
    z-index: 100;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.service-jump {
    background-color: var(--light-grey-bg);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 10px 15px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--heading-text);
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
}

.service-jump:hover {
    background-color: var(--accent-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-decoration: none;
}

/* Services Grid Layout */
.services-grid {
    margin-top: 20px;
}

.service-item {
    background-color: var(--white);
    padding: 2em;
    margin-bottom: 2em;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
    border-left: 5px solid var(--accent-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    box-sizing: border-box;
    scroll-margin-top: 150px; /* Ensures anchor links scroll to correct position */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.service-item:target {
    animation: highlight 2s ease;
}

@keyframes highlight {
    0% { background-color: rgba(176, 141, 87, 0.2); }
    100% { background-color: var(--white); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.service-item h3 {
    margin-top: 0;
    color: var(--heading-text);
    font-size: 1.8rem;
    border-bottom: 1px solid rgba(176, 141, 87, 0.3);
    padding-bottom: 0.5em;
    margin-bottom: 0.8em;
}

.service-item h4 {
    font-family: var(--font-body);
    font-weight: bold;
    color: var(--heading-text);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-size: 1.3rem;
    position: relative;
}

/* Removed horizontal gold lines before h4 headings */

.service-item p {
    font-size: 1.05rem;
    line-height: 1.6;
}

.service-item ul {
    margin-left: 0.5em;
}

.service-item ul li {
    margin-bottom: 0.8em;
    line-height: 1.4;
}

.service-item .btn {
    margin-top: 1em;
}

/* --- Expertise Section --- */
#expertise ul li::before {
    content: '»';
}

/* Certificate Display Styling */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 2rem 0;
}

.certification-item {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.cert-thumbnail {
    border-bottom: 1px solid var(--border-color);
}

.cert-thumbnail a {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
}

.cert-thumbnail a:hover {
    transform: translateY(-3px);
    background-color: rgba(176, 141, 87, 0.05);
}

.cert-preview {
    padding: 25px 20px;
    text-align: center;
}

.cert-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.cert-preview h4 {
    color: var(--heading-text);
    margin-bottom: 5px;
}

.cert-id {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 0;
}

.cert-description {
    padding: 20px;
}

.cert-description h4 {
    color: var(--heading-text);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.cert-description p {
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .certifications-grid {
        grid-template-columns: 1fr;
    }
}


/* --- Portfolio Section --- */
#portfolio .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 2em;
}
#portfolio .gallery-item {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
}
#portfolio .gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
#portfolio .gallery-item p {
    padding: 1em;
    margin-bottom: 0;
    font-weight: 500;
    color: var(--heading-text);
}
.section-note {
    text-align: center;
    margin-top: 2em;
    font-style: italic;
    color: #777;
}


/* --- Testimonials Section --- */
#testimonials {
    background-color: var(--heading-text);
    color: var(--primary-bg);
}
#testimonials h2 {
    color: var(--white);
    border-bottom-color: var(--accent-color);
}
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.testimonial-item {
    background-color: rgba(255,255,255, 0.1);
    padding: 1.5em;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}
.testimonial-item p {
    margin-bottom: 1em;
    font-style: italic;
    color: var(--primary-bg);
}
.testimonial-item h4 {
    color: var(--accent-color);
    font-family: var(--font-body);
    font-weight: bold;
    text-align: right;
}

/* --- Contact Section --- */
.contact-details-form-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 2em;
}
.contact-details {
    flex: 1;
    min-width: 300px;
}
.contact-details p {
    margin-bottom: 0.8em;
}
.contact-details strong {
    color: var(--heading-text);
}
.contact-cta-buttons {
    margin-top: 1.5em;
}
.contact-cta-buttons .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

.contact-form-container {
    flex: 1.5;
    min-width: 320px;
    background-color: var(--white);
    padding: 2em;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
}
.contact-form-container h3 {
    margin-top: 0;
    text-align: center;
    margin-bottom: 1.5em;
}
#contactForm div {
    margin-bottom: 1.5em;
}
#contactForm label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
    color: var(--heading-text);
}
#contactForm input[type="text"],
#contactForm input[type="email"],
#contactForm input[type="tel"],
#contactForm textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
}
#contactForm textarea {
    resize: vertical;
}
#contactForm input:focus,
#contactForm textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(176, 141, 87, 0.3);
}
#contactForm button[type="submit"] {
    display: block;
    width: 100%;
    padding: 15px;
}
#form-status {
    margin-top: 1em;
    text-align: center;
    font-weight: bold;
}


/* --- FAQ Section --- */
.faq-item {
    margin-bottom: 1.5em;
    padding-bottom: 1.5em;
    border-bottom: 1px solid var(--border-color);
}
.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.faq-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5em;
}

/* --- Footer --- */
footer {
    background-color: var(--heading-text);
    color: var(--primary-bg);
    text-align: center;
    padding: 2em 0;
    font-size: 0.9rem;
}
footer p {
    margin-bottom: 0.5em;
}
footer a {
    color: var(--accent-color);
}
footer a:hover {
    color: var(--white);
}
.footer-logo {
    text-align: center;
    margin-bottom: 1.5em;
}
.logo-link-footer {
    display: inline-block;
}


/* --- Responsive Design --- */
/* Reset animations on mobile - prevents animation-related alignment issues */
@media (max-width: 767px) {
    .hero-section .feature-card {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* iPad Pro and similar tablet sizes */
@media only screen and (min-width: 768px) and (max-width: 1366px) {
    #nav-menu ul li {
        margin-left: 0.5em; /* More compact nav for iPad Pro */
    }
    
    #nav-menu ul li a {
        font-size: 0.85rem; /* Smaller font for nav items */
        letter-spacing: -0.02em; /* Tighter letter spacing */
        word-spacing: -0.03em; /* Slightly tighter word spacing */
    }
    
    /* Specifically target the iPad 10.2" screen size (768 × 1024) */
    @media (width: 768px) and (height: 1024px), 
           (width: 810px) and (height: 1080px) { /* iPad 10.2" and similar */
        #nav-menu ul {
            justify-content: space-between; /* Distribute space more evenly */
        }
        
        #nav-menu ul li {
            margin-left: 0.2em; /* Very compact spacing */
        }
        
        #nav-menu ul li a {
            font-size: 0.78rem; /* Even smaller font */
            letter-spacing: -0.03em; /* Extra tight letter spacing */
            padding: 0.5em 0.15em; /* Minimal horizontal padding */
        }
        
        /* Fix for "Contact Us" and other multi-word menu items */
        #nav-menu ul li a[href="#contact"],
        #nav-menu ul li a[href="#about"],
        #nav-menu ul li a[href="#expertise"],
        #nav-menu ul li a[href="#testimonials"] {
            word-spacing: -0.15em; /* Even tighter word spacing for multi-word items */
        }
        
        /* Fix for "Learn About Our Approach" button to prevent line break */
        .hero-cta .btn-secondary {
            font-size: 0.85rem;
            letter-spacing: -0.03em;
            padding: 10px 15px;
        }
        
        .hero-cta .btn-secondary span {
            font-size: 0.85rem;
            letter-spacing: -0.03em;
            white-space: nowrap;
        }
    }
}

/* iPad / Tablets */
@media (min-width: 768px) and (max-width: 1023px) {
    #logo {
        height: 50px; /* Smaller logo on tablets */
    }
    
    #nav-menu ul li {
        margin-left: 0.3em; /* Further reduce space between nav items */
    }
    
    #nav-menu ul li a {
        font-size: 0.8rem; /* Smaller font on tablets */
        letter-spacing: -0.02em; /* Even tighter letter spacing */
        padding: 0.5em 0.2em; /* Add some horizontal padding */
        word-spacing: -0.05em; /* Reduce space between words */
    }
    
    .dropdown-arrow {
        font-size: 0.6em; /* Smaller dropdown arrow */
        margin-left: 2px; /* Reduce space before dropdown arrow */
    }
}

@media (max-width: 992px) {
    h1 { font-size: 2.4rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.6rem; }
    
    /* Navigation adjustments for tablet */
    #nav-menu ul li {
        margin-left: 1em; /* Reduce space between nav items */
    }
    
    #nav-menu ul li a {
        font-size: 0.9rem; /* Slightly smaller font */
    }
    
    .hero-section h1 { font-size: 2.8rem; }
    .hero-section .tagline { font-size: 1.5rem; }
    .hero-section .sub-headline { font-size: 1.2rem; }
    
    .hero-content {
        padding: 60px 0;
    }
    
    .feature-card {
        padding: 1.2rem;
    }
    
    .feature-text h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    body { font-size: 16px; }
    #logo { height: 50px; }
    
    /* Reset animations on mobile - prevents animation-related alignment issues */
    .hero-section .feature-card {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Services Mobile Style */
    .services-quick-nav {
        padding: 10px;
        overflow-x: auto;
        justify-content: flex-start;
        flex-wrap: nowrap;
        top: 65px;
    }
    
    .services-quick-nav::-webkit-scrollbar {
        height: 3px;
    }
    
    .services-quick-nav::-webkit-scrollbar-thumb {
        background-color: var(--accent-color);
    }
    
    .service-jump {
        font-size: 0.8rem;
        padding: 8px 12px;
        white-space: nowrap;
    }
    
    .service-item {
        padding: 1.5em;
    }
    
    /* Mobile Navigation */
    #nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        flex-direction: column;
        padding-bottom: 1em;
    }
    #nav-menu.active {
        display: flex;
    }
    #nav-menu ul {
        flex-direction: column;
        width: 100%;
        align-items: center;
    }
    #nav-menu ul li {
        margin: 0; /* Remove side margin for stacked items */
        width: 100%;
        text-align: center;
    }
    #nav-menu ul li a {
        display: block;
        padding: 0.8em 1em;
        border-bottom: 1px solid var(--primary-bg); /* Separator */
    }
     #nav-menu ul li:last-child a {
        border-bottom: none;
    }


    #mobile-menu-toggle {
        display: block;
    }

    /* Mobile Dropdown Specifics */
    .dropdown .dropdown-content {
        position: static; /* No longer absolute */
        box-shadow: none;
        background-color: var(--light-grey-bg); /* Differentiate from main nav items */
        min-width: 100%;
        margin-top: 0;
        padding: 0;
        border-top: 1px solid var(--border-color);
        display: none !important; /* Initially hidden, JS controls with .open */
    }
    .dropdown.open .dropdown-content {
        display: block !important; /* Show when .open class is added by JS */
    }
    .dropdown-content a {
        padding: 10px 20px;
        font-size: 0.9em;
        border-bottom: 1px solid var(--primary-bg);
    }
     .dropdown-content li:last-child a {
        border-bottom: none;
    }
    /* Disable desktop hover behavior for dropdowns on mobile */
    .dropdown:hover .dropdown-content {
        display: none;
    }


    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
    
    /* Mobile Hero Section */
    .hero-section { 
        min-height: auto; 
        text-align: center;
    }
    
    .hero-content {
        padding: 60px 0;
        flex-direction: column;
    }
    
    .hero-text {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-section h1 { 
        font-size: 2.4rem; 
        text-align: center;
    }
    
    .hero-section .tagline {
        font-size: 1.3rem;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-section .sub-headline { 
        font-size: 1.1rem; 
        text-align: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .feature-card {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-scroll-indicator {
        bottom: 0;
        padding-top: 25px;
    }
    
    .hero-features {
        margin-bottom: 30px;
    }

    #about .about-content {
        flex-direction: column;
    }
    .contact-details-form-wrapper {
        flex-direction: column;
    }
}

/* Specific fixes for problematic mobile screen sizes */
@media (min-width: 380px) and (max-width: 430px) {
    .hero-features {
        width: 100%;
        align-items: center;
    }
    
    .feature-card {
        width: 100%;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }
    
    .feature-icon {
        flex: 0 0 40px; /* Fixed width, don't grow or shrink */
        text-align: center;
    }
    
    .feature-text {
        flex: 1;
        width: calc(100% - 60px); /* Account for icon + margins */
    }
}

/* Specific fixes for problematic mobile screen sizes */
@media (min-width: 380px) and (max-width: 430px) {
    .hero-features {
        width: 100%;
        align-items: stretch;
    }
    
    .feature-card {
        display: block; /* Change from flex to block for more reliable layout */
        width: 100%;
        max-width: none;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
        padding: 1.2rem;
        padding-left: 3.5rem; /* Space for the icon */
        position: relative; /* For absolute positioning of the icon */
    }
    
    .feature-icon {
        position: absolute;
        left: 1.2rem;
        top: 1.2rem;
        width: 30px;
        text-align: center;
    }
    
    .feature-text {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container { width: 95%; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.4rem; }
    
    /* Smaller padding for all content sections */
    section {
        padding: 40px 0;
    }
    
    /* Fix for hero section scroll indicator spacing */
    .hero-section {
        padding-bottom: 30px;
    }
    
    .feature-card:last-child {
        margin-bottom: 60px;
    }
    
    .service-item {
        padding: 1.5em;
    }
    
    /* Fix for long words and URLs */
    p, h1, h2, h3, h4, li, a {
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    /* Hero section mobile fixes */
    .hero-section h1 { 
        font-size: 2rem; 
    }
    
    .hero-section .tagline {
        font-size: 1.2rem;
    }
    
    .hero-section .sub-headline { 
        font-size: 1rem; 
    }
    
    .hero-content {
        padding: 40px 0;
    }
    
    .feature-card {
        padding: 1rem;
    }
    
    .feature-text h3 {
        font-size: 1.1rem;
    }
    
    .feature-text p {
        font-size: 0.9rem;
    }
    
    /* Button fixes for mobile */
    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .cta-group .btn + .btn {
        margin-top: 10px;
    }
    
    .contact-cta-buttons .btn {
         width: auto;
    }
    
    /* About section mobile fixes */
    #about .about-text {
        padding: 0;
    }
    
    /* Image handling on small screens */
    .medium-img {
        width: 100%;
        max-width: 90%;
    }
}