/* --- H&H Custom Professional Stylesheet (Enhanced with Critical Fixes) --- */

/* --- 1. Global Styles & Typography --- */
:root {
    --primary-blue: #007bff;
    --dark-blue: #192a56;
    --light-grey-bg: #f8f9fa;
    --dark-text: #343a40;
    --light-blue-bg: #e9f7ff;
    --accent-gold: #c5a572;
    --success-green: #28a745;
    --error-red: #dc3545;
    --warning-yellow: #ffc107;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: var(--dark-text);
    background-color: #fff;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--dark-blue);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 20px;
    text-align: center;
}

h1, h2, h3, h4 {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.2rem); }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); }
p { font-size: 1.1rem; max-width: 700px; margin-left: auto; margin-right: auto; margin-bottom: 1rem; }

/* --- 2. Enhanced Header & Navigation --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 5%;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.main-header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.logo img {
    height: 80px;
    width: inherit;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.main-nav {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.main-nav a {
    position: relative;
    text-decoration: none;
    color: #455580;
    margin-left: 25px;
    font-weight: bold;
    transition: color 0.3s ease;
    padding: 12px 8px;
    border-radius: 4px;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-nav a i {
    margin-right: 8px;
}

.main-nav a:hover,
.main-nav a:focus {
    color: var(--primary-blue);
    background-color: rgba(0, 123, 255, 0.1);
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-blue);
    transition: width 0.4s ease;
}

.main-nav a:hover::after {
    width: calc(100% - 16px);
}

/* --- Enhanced Social Media Icons --- */
.social-icons {
    margin-left: 30px;
}

.social-icons a {
    color: var(--dark-blue);
    font-size: 1.4rem;
    margin-left: 15px;
    transition: color 0.3s ease, transform 0.3s ease;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
}

.social-icons a:hover,
.social-icons a:focus {
    color: var(--primary-blue);
    transform: scale(1.1);
    background-color: rgba(0, 123, 255, 0.1);
}

/* --- Enhanced Mobile Navigation --- */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: 2px solid var(--dark-blue);
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-blue);
    z-index: 1001;
    min-height: 44px;
    min-width: 44px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus {
    background-color: var(--dark-blue);
    color: white;
    transform: scale(1.05);
}

.mobile-nav-toggle.active {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* --- 3. Enhanced Buttons & Forms --- */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
    50% { transform: scale(1.03); box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-blue);
    color: #fff;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: none;
    font-family: 'Outfit', sans-serif;
    position: relative;
    overflow: hidden;
    z-index: 1;
    animation: pulse 2.5s infinite ease-in-out;
    cursor: pointer;
    min-height: 44px;
    min-width: 120px;
}

.cta-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    animation: none;
}

.cta-button.loading {
    color: transparent;
    animation: none;
}

.cta-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
    z-index: -1;
}

.cta-button:hover:not(:disabled) {
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
    animation-play-state: paused;
}

.cta-button:hover::before {
    left: 150%;
}

/* Enhanced Form Styles */
.contact-form input,
.contact-form textarea {
    font-family: 'Outfit', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #ddd;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

.contact-form input.error,
.contact-form textarea.error {
    border-color: var(--error-red);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-error {
    color: var(--error-red);
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

.form-error.show {
    display: block;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background-color: var(--success-green);
}

.toast.error {
    background-color: var(--error-red);
}

.toast.info {
    background-color: var(--primary-blue);
}

/* --- 4. Enhanced Page Sections & Animations --- */
.hero {
    background: radial-gradient(circle, #2caae0, #f0e9e100);
    color: #fff;
    text-align: center;
    padding: 120px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    filter: blur(3px);
    z-index: -1;
}

.hero-content { 
    max-width: 800px; 
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: #fff;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 3px 12px rgba(0,0,0,0.5);
    opacity: 0;
    animation: slideInUp 1s ease-out forwards;
}

.hero-subheading {
    font-size: clamp(1.2rem, 3vw, 1.7rem);
    color: #fff;
    margin-top: 0;
    margin-bottom: 40px;
    font-family: 'Raleway', sans-serif;
    font-weight: bold;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    opacity: 0;
    animation: slideInUp 1s ease-out 0.4s forwards;
}

.hero-images { 
    display: flex; 
    justify-content: center; 
    gap: 40px; 
    margin: 40px 0;
    flex-wrap: wrap;
}

.hero-image-link { 
    text-decoration: none; 
    color: #fff; 
    text-align: center; 
    transition: transform 0.3s ease;
    min-height: 44px;
    opacity: 0;
    animation: slideInUp 1s ease-out 0.8s forwards;
}

.hero-image-link img { 
    width: 200px; 
    height: 200px; 
    border-radius: 50%; 
    border: 5px solid #fff; 
    object-fit: cover; 
    transition: all 0.4s ease; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.hero-image-link:hover,
.hero-image-link:focus { 
    transform: scale(1.05); 
    outline: none;
}

.hero-image-link:hover img,
.hero-image-link:focus img { 
    border-color: var(--primary-blue); 
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.hero-image-link span { 
    display: block; 
    margin-top: 15px; 
    font-size: 1.2rem; 
    font-weight: bold; 
    font-family: 'Raleway', sans-serif;
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Enhanced Service Cards */
.services { background-color: var(--light-grey-bg); }
.services-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 30px; 
    margin-top: 50px; 
}

.service-card { 
    background: #fff; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.08); 
    transition: all 0.4s ease; 
    text-align: left;
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(0, 123, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover,
.service-card:focus-within { 
    transform: translateY(-10px); 
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card img { 
    width: 100%; 
    height: 220px; 
    object-fit: cover; 
    transition: transform 0.4s ease;
}

.service-card:hover img {
    transform: scale(1.05);
}

.service-card-content { padding: 25px; position: relative; z-index: 1; }
.service-card-content h4 { font-size: 1.5rem; margin-bottom: 0.8rem; }
.service-card-content p { font-size: 1rem; margin-bottom: 1.5rem; }

.card-link { 
    color: var(--primary-blue); 
    text-decoration: none; 
    font-weight: bold; 
    transition: all 0.3s;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
}

.card-link:hover,
.card-link:focus { 
    color: var(--dark-blue);
    background-color: rgba(0, 123, 255, 0.1);
    transform: translateX(5px);
}

/* Enhanced Portfolio Grid */
.portfolio-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 20px; 
    margin-top: 40px; 
}

.portfolio-item { 
    overflow: hidden; 
    border-radius: 12px; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.08); 
    transition: all 0.4s ease;
    position: relative;
}

.portfolio-item::after {
    content: 'View Project';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover,
.portfolio-item:focus-within { 
    transform: translateY(-10px); 
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.portfolio-item:hover::after {
    opacity: 1;
}

.portfolio-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
    transition: transform 0.4s ease;
}

.portfolio-item:hover img { 
    transform: scale(1.1);
    filter: brightness(0.8);
}

/* --- Lazy Loading Styles --- */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

.image-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* --- Enhanced Why Us Section --- */
.why-us {
    background-color: var(--light-blue-bg);
    position: relative;
    overflow: hidden;
}

.why-us::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 40%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1));
    transform: rotate(15deg);
    z-index: 1;
}

.why-us .container {
    text-align: left;
    position: relative;
    z-index: 2;
}

.why-us-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.why-us-content h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.why-us-subheading {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: none;
}

.benefits-list {
    margin-bottom: 2.5rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 1.5rem;
    padding: 15px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.benefit-item:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.benefit-icon {
    font-size: 1.8rem;
    color: var(--accent-gold);
    padding-top: 5px;
    transition: transform 0.3s ease;
}

.benefit-item:hover .benefit-icon {
    transform: scale(1.1) rotate(5deg);
}

.benefit-text h4 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.benefit-text p {
    font-size: 1rem;
    margin: 0;
    max-width: none;
}

.why-us-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.why-us-image:hover img {
    transform: scale(1.02);
}

/* --- Enhanced Process Section --- */
.process-section { 
    background-color: #fff; 
    position: relative;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.process-step { 
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.process-step:hover {
    background-color: rgba(0, 123, 255, 0.05);
    transform: translateY(-5px);
}

.process-icon {
    font-size: 2.5rem;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-gold), #d4af37);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(197, 165, 114, 0.3);
}

.process-step:hover .process-icon {
    transform: scale(1.1) rotate(10deg);
    background: linear-gradient(135deg, var(--primary-blue), #0056b3);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

.process-step h4 { 
    font-size: 1.4rem; 
    margin-bottom: 0.5rem; 
    transition: color 0.3s ease;
}

.process-step:hover h4 {
    color: var(--primary-blue);
}

.process-step p { 
    font-size: 1rem; 
    max-width: none; 
}

/* --- Enhanced Testimonials --- */
.testimonials { 
    background: linear-gradient(135deg, var(--light-grey-bg), #ffffff);
    position: relative;
}

.testimonial {
    position: relative;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--accent-gold);
    font-family: serif;
}

.testimonial-text { 
    font-style: italic; 
    font-size: 1.3rem; 
    margin-bottom: 1rem; 
    color: #555;
    line-height: 1.6;
}

.testimonial-author { 
    font-weight: bold; 
    font-family: 'Raleway', sans-serif; 
    color: var(--accent-gold);
    text-align: right;
}

/* --- Enhanced Final CTA --- */
.final-cta { 
    background: linear-gradient(135deg, var(--dark-blue), #2c3e50);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.final-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.final-cta .container {
    position: relative;
    z-index: 1;
}

.final-cta h2 { 
    color: #fff;
    margin-bottom: 1rem;
}

.final-cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
}

/* --- Enhanced Fade-in Animations --- */
.fade-in-section { 
    opacity: 0; 
    transform: translateY(40px); 
    transition: opacity 1s ease-out, transform 1s ease-out; 
}

.fade-in-section.is-visible { 
    opacity: 1; 
    transform: translateY(0); 
}

.project-entry, .service-feature { 
    opacity: 0; 
    transform: translateY(40px); 
    transition: opacity 0.8s ease-out, transform 0.8s ease-out; 
}

/* Staggered animation for multiple items */
.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }

.benefit-item:nth-child(1) { transition-delay: 0.1s; }
.benefit-item:nth-child(2) { transition-delay: 0.2s; }
.benefit-item:nth-child(3) { transition-delay: 0.3s; }

.process-step:nth-child(1) { transition-delay: 0.1s; }
.process-step:nth-child(2) { transition-delay: 0.2s; }
.process-step:nth-child(3) { transition-delay: 0.3s; }
.process-step:nth-child(4) { transition-delay: 0.4s; }

/* --- 5. Enhanced Footer --- */
.main-footer {
    background: linear-gradient(135deg, var(--dark-blue), #1a252f);
    color: #ccc;
    padding: 60px 5% 20px 5%;
    position: relative;
}

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

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.footer-col { 
    flex: 1; 
    min-width: 220px; 
}

.footer-logo { 
    height: 70px; 
    width: inherit;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
}

.about-col p { 
    font-size: 0.95rem; 
    max-width: none; 
    margin: 0;
    line-height: 1.6;
}

.footer-col h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-gold), var(--primary-blue));
}

.links-col ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}

.links-col li { 
    margin-bottom: 10px; 
}

.links-col a { 
    color: #ccc; 
    text-decoration: none; 
    transition: all 0.3s;
    padding: 5px 0;
    display: block;
}

.links-col a:hover,
.links-col a:focus { 
    color: #fff; 
    padding-left: 8px;
    border-left: 3px solid var(--accent-gold);
}

.contact-col p { 
    font-size: 1rem; 
    margin-bottom: 10px; 
    display: flex; 
    align-items: center;
    transition: transform 0.3s ease;
}

.contact-col p:hover {
    transform: translateX(5px);
}

.contact-col a { 
    color: #ccc; 
    text-decoration: none; 
    transition: color 0.3s; 
}

.contact-col a:hover,
.contact-col a:focus { 
    color: #fff;
}

.contact-col i { 
    color: var(--accent-gold); 
    margin-right: 15px; 
    font-size: 1.1rem; 
    width: 20px; 
    text-align: center;
    transition: transform 0.3s ease;
}

.contact-col p:hover i {
    transform: scale(1.2);
}

.footer-social-icons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.footer-social-icons a {
    color: #ccc;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid transparent;
}

.footer-social-icons a:hover,
.footer-social-icons a:focus {
    color: #fff;
    transform: scale(1.1) rotate(5deg);
    border-color: var(--accent-gold);
    background-color: rgba(197, 165, 114, 0.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid #444;
    font-size: 0.9rem;
    position: relative;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

/* --- 6. Enhanced Responsive Design --- */
@media (max-width: 992px) {
    /* --- Enhanced Mobile Navigation --- */
    .main-nav { 
        display: none; 
        flex-direction: column; 
        position: absolute; 
        top: 100%; 
        right: 0; 
        background: linear-gradient(135deg, #fff, #f8f9fa);
        width: 100%; 
        box-shadow: 0 8px 25px rgba(0,0,0,0.15); 
        padding: 30px 0;
        text-align: center;
        border-radius: 0 0 15px 15px;
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .main-nav.is-open { 
        display: flex; 
        align-items: center;
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .main-nav a { 
        margin: 8px 25px; 
        width: calc(100% - 50px);
        padding: 15px 20px;
        border-radius: 8px;
        transition: all 0.3s ease;
        background-color: transparent;
    }

    .main-nav a:hover,
    .main-nav a:focus {
        background-color: var(--primary-blue);
        color: white;
        transform: scale(1.02);
    }

    .main-nav a::after {
        display: none;
    }
    
    .main-nav .social-icons {
        margin-top: 20px;
        margin-left: 0;
        padding-top: 20px;
        border-top: 2px solid #eee;
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 20px;
    }
    
    .main-nav .social-icons a {
        width: 50px;
        height: 50px;
        margin: 0;
        padding: 0;
        font-size: 1.8rem;
        border: 2px solid var(--primary-blue);
        border-radius: 50%;
        background-color: transparent;
    }

    .main-nav .social-icons a:hover {
        background-color: var(--primary-blue);
        color: white;
        transform: scale(1.1);
    }
    
    .mobile-nav-toggle { 
        display: block; 
    }

    /* --- General Layout Adjustments --- */
    .container {
        padding: 60px 15px;
    }

    .why-us-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .why-us-image {
        order: -1;
    }
    
    .why-us .container {
        text-align: center;
    }

    .hero {
        padding: 80px 20px;
    }

    .hero h1 { 
        font-size: clamp(2rem, 8vw, 2.8rem); 
    }
    
    .hero-subheading { 
        font-size: clamp(1rem, 4vw, 1.2rem);
        margin-bottom: 30px;
    }
    
    .hero-images { 
        flex-direction: column; 
        align-items: center;
        gap: 25px;
    }

    .hero-image-link img {
        width: 150px;
        height: 150px;
    }

    .services-grid, 
    .portfolio-grid, 
    .process-grid { 
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .process-grid {
        gap: 30px;
    }
    
    .footer-container { 
        flex-direction: column; 
        text-align: center;
        gap: 30px;
    }
    
    .footer-col h3::after { 
        left: 50%; 
        transform: translateX(-50%); 
    }
    
    .contact-col p { 
        justify-content: center; 
    }

    .footer-social-icons {
        justify-content: center;
    }
    
    /* Services Page Fix */
    .service-feature {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .service-description {
        order: 1;
    }
    
    .service-image {
        order: 2;
    }

    /* Contact page adjustments */
    .contact-section {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-details {
        text-align: center;
    }

    /* Projects page adjustments */
    .before-after-gallery {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .project-details {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 40px 10px;
    }

    .hero {
        padding: 60px 15px;
    }

    .hero-images {
        gap: 20px;
    }

    .hero-image-link img {
        width: 120px;
        height: 120px;
    }

    .hero-image-link span {
        font-size: 1rem;
    }

    .services-grid,
    .portfolio-grid {
        gap: 20px;
    }

    .service-card-content {
        padding: 20px;
    }

    .why-us-grid {
        gap: 30px;
    }

    .benefit-item {
        padding: 10px;
        gap: 15px;
    }

    .benefit-icon {
        font-size: 1.5rem;
    }

    .process-icon {
        width: 60px;
        height: 60px;
        line-height: 60px;
        font-size: 2rem;
    }

    .testimonial {
        padding: 25px;
        margin: 0 10px;
    }

    .testimonial-text {
        font-size: 1.1rem;
    }

    .footer-container {
        gap: 25px;
    }

    .footer-social-icons a {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }

    .toast {
        right: 10px;
        left: 10px;
        width: auto;
        min-width: auto;
    }
}

/* --- High Contrast Mode Support --- */
@media (prefers-contrast: high) {
    :root {
        --primary-blue: #0056b3;
        --dark-blue: #000;
        --dark-text: #000;
    }

    .cta-button {
        border: 2px solid #fff;
    }

    .service-card,
    .portfolio-item,
    .testimonial {
        border: 2px solid var(--dark-text);
    }
}

/* --- Reduced Motion Support --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .cta-button {
        animation: none;
    }
}

/* --- Print Styles --- */
@media print {
    .main-header,
    .mobile-nav-toggle,
    .social-icons,
    .footer-social-icons,
    .cta-button {
        display: none;
    }

    .hero {
        background: none;
        color: black;
    }

    .hero h1,
    .hero-subheading {
        color: black;
        text-shadow: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .container {
        padding: 20px 0;
    }
}

/* --- 7. Before & After Slider --- */
.before-after-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    cursor: col-resize;
}

.before-after-slider > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.before-after-slider .after-image {
    z-index: 1;
}

.before-after-slider .before-image {
    z-index: 2;
    /* Initially, the before image is clipped to show 50% */
    clip-path: inset(0 50% 0 0);
}

.before-after-slider .slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background-color: #fff;
    transform: translateX(-50%);
    z-index: 3;
    pointer-events: none; /* Let the parent handle events */
}

.before-after-slider .slider-handle::before,
.before-after-slider .slider-handle::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    left: 50%;
    transform: translateX(-50%);
}

.before-after-slider .slider-handle::before {
    top: 10px;
    border-width: 10px 7px 0 7px;
    border-color: #fff transparent transparent transparent;
}

.before-after-slider .slider-handle::after {
    bottom: 10px;
    border-width: 0 7px 10px 7px;
    border-color: transparent transparent #fff transparent;
}
