/* Base Styles */
body, input, textarea, button {
    font-family: 'Sorts Mill Goudy', 'Times New Roman', serif;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh; /* Use dynamic viewport height for mobile */
    height: auto; /* Allow content to extend beyond viewport */
    background-color: #eae7dc;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E"),
        linear-gradient(to right, rgba(255,255,255,0.1), rgba(255,255,255,0.1));
    color: #2b2b2b;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    text-shadow: 0px 1px 1px rgba(255,255,255,0.8),
                 0px -1px 1px rgba(0,0,0,0.2);
    line-height: 1.6;
}

/* Mobile-first responsive design */
:root {
    --touch-target-size: 44px;
    --mobile-padding: 16px;
    --tablet-padding: 24px;
    --desktop-padding: 40px;
    --mobile-font-base: 18px;
    --tablet-font-base: 20px;
    --desktop-font-base: 24px;
    --mobile-min-font: 16px; /* Minimum readable font size */
    --mobile-header-height: 60px; /* Minimum header height for mobile */
}

/* Common Layout Elements */
.business-card-layout {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    background-color: #eae7dc;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E"),
        linear-gradient(to right, rgba(255,255,255,0.1), rgba(255,255,255,0.1));
    width: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    font-size: clamp(18px, 6vw, 36px);
    text-shadow: 0px 1px 2px #fff,
                 0px -1px 1px rgba(0,0,0,0.25);
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-shrink: 0;
    gap: 1rem;
}

.contact-email {
    margin: 0;
}

.contact-email a {
    position: relative;
    min-height: var(--touch-target-size);
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.contact-email a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #2b2b2b;
    transition: width 0.3s ease;
}

.contact-email a:hover:after,
.contact-email a:focus:after {
    width: 100%;
}

.header-nav {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-row {
    margin: 0;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-row a {
    position: relative;
    margin: 0;
    transition: all 0.2s ease;
    min-height: var(--touch-target-size);
    display: flex;
    align-items: center;
    padding: 8px 12px max(12px, env(safe-area-inset-bottom));
    border-radius: 4px;
}

.nav-row a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #2b2b2b;
    transition: width 0.3s ease;
}

.nav-row a:hover:after,
.nav-row a:focus:after {
    width: 100%;
}

.nav-row a:focus {
    outline: 2px solid #2b2b2b;
    outline-offset: 2px;
}

.nav-separator {
    opacity: 0.5;
    margin: 0 4px;
}

/* Hide landscape-only separators by default */
.nav-separator.landscape-only {
    display: none;
}

/* Hide separators on mobile for cleaner navigation */
@media (max-width: 767px) {
    .nav-separator {
        display: none;
    }
}

/* Main Content Area */
.card-content {
    flex-grow: 1;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    overflow-y: auto;
    padding: 0 2rem; /* Add balanced horizontal padding to utilize the freed-up space */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;

    /* Firefox scrollbar styling */
    @supports (scrollbar-width: thin) {
        scrollbar-width: thin;
        scrollbar-color: rgba(43, 43, 43, 0.3) transparent;
    }
}

.card-content::-webkit-scrollbar {
    width: 6px;
}

.card-content::-webkit-scrollbar-track {
    background: transparent;
}

.card-content::-webkit-scrollbar-thumb {
    background-color: rgba(43, 43, 43, 0.3);
    border-radius: 6px;
}

.card-content:not(.homepage .card-content) {
    font-size: 0.4em;
}

.card-content h1 {
    text-align: center;
    margin-bottom: 2rem;
}

/* Footer Styles */
footer {
    margin-top: auto; /* Pushes footer to bottom via flexbox */
    text-align: center;
    flex-shrink: 0;
    position: relative;
    padding: 0.25rem 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
}

/* Position footer at bottom for desktop */
@media (min-width: 1024px) {
    footer {
        position: relative; /* Reset to flow naturally */
        margin: auto; /* Center horizontally and push to bottom in flexbox */
        max-width: 800px;
    }

    /* Fix homepage footer to viewport bottom on desktop */
    .homepage footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        max-width: none;
        z-index: 10;
    }
}

/* Position footer at bottom for landscape tablets */
@media (min-width: 768px) and (max-width: 1023px) and (orientation: landscape) {
    footer {
        position: relative; /* Reset to flow naturally */
        margin: auto; /* Center and push to bottom */
    }

    /* Fix homepage footer to viewport bottom in tablet landscape */
    .homepage footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        z-index: 10;
    }
}

/* Hide footer on portrait devices with mobile navigation to prevent overlap */
@media (max-width: 1023px) and (orientation: portrait) {
    footer {
        display: none;
    }
}

/* Hide footer links specifically on 13-inch iPad portrait view */
@media (max-width: 1025px) and (orientation: portrait),
       (max-width: 1024px) and (orientation: portrait),
       (width: 1024px) and (orientation: portrait) {
    .business-card-layout footer .footer-links,
    .business-card-layout footer .desktop-footer-nav,
    footer .footer-links,
    footer .desktop-footer-nav,
    .footer-links,
    .desktop-footer-nav {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}

.footer-links {
    margin: 0.5rem 0;
    position: relative;
    width: 100%; /* Span full footer width */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Divider is now positioned by flexbox */

/* Position footer elements with center spacing */
.footer-links {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    width: 100%;
    text-align: center;
    margin: 0.5rem 0 0.1rem 0;
    padding: 0;
    font-size: 0.9em;
}


/* Hide footer links on desktop, keep copyright visible */
@media (min-width: 1024px) {
    .footer-links {
        display: none;
    }
}

/* Desktop footer navigation - visible only on desktop */
@media (min-width: 1024px) {
    .desktop-footer-nav {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        font-size: inherit; /* Same as nav-row links */
        text-align: center;
        position: relative; /* Natural flow within footer */
        bottom: auto;
        transform: none;
        width: 400px;
        max-width: 90vw;
        white-space: nowrap;
        z-index: auto;
        margin: 0;
        padding: 0;
    }

    .desktop-footer-nav a {
        position: relative;
        margin: 0;
        transition: all 0.2s ease;
        min-height: var(--touch-target-size);
        display: flex;
        align-items: center;
        padding: 8px 12px;
        border-radius: 4px;
    }

    .desktop-footer-nav a:after {
        content: '';
        position: absolute;
        width: 0;
        height: 1px;
        bottom: -2px;
        left: 0;
        background-color: #2b2b2b;
        transition: width 0.3s ease;
    }

    .desktop-footer-nav a:hover:after,
    .desktop-footer-nav a:focus:after {
        width: 100%;
    }

    .desktop-footer-nav a:focus {
        outline: 2px solid #2b2b2b;
        outline-offset: 2px;
    }

    .desktop-footer-nav .nav-separator {
        opacity: 0.5;
        margin: 0 4px;
    }
}

/* Hide desktop footer nav on mobile/tablet, but show in mobile landscape */
@media (max-width: 1023px) and (orientation: portrait) {
    .desktop-footer-nav {
        display: none;
    }
}

.footer-links a:first-child,
.footer-links a:last-child,
.nav-separator {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0; /* Override base margin for proper flex spacing */
}

.footer-links a {
    position: relative;
    min-height: var(--touch-target-size);
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 4px;
    width: auto; /* Ensure links don't take full width */
    flex-shrink: 0; /* Prevent shrinking */
}

.footer-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #2b2b2b;
    transition: width 0.3s ease;
}

.footer-links a:hover:after,
.footer-links a:focus:after {
    width: 100%;
}

.footer-links a:focus {
    outline: 2px solid #2b2b2b;
    outline-offset: 2px;
}

/* Common Link Styles */
a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* Touch-friendly button and interactive elements */
button, .copy-btn, .read-more, .cta-button-elegant {
    min-height: var(--touch-target-size);
    min-width: var(--touch-target-size);
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:focus, .copy-btn:focus, .read-more:focus, .cta-button-elegant:focus {
    outline: 2px solid #2b2b2b;
    outline-offset: 2px;
}

/* Breadcrumbs Navigation */
.breadcrumbs {
    margin-bottom: 0.00390625rem;
    font-size: 0.9em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.breadcrumbs a {
    margin-right: 0;
    min-height: var(--touch-target-size);
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 4px;
}

.breadcrumbs a:after {
    content: ' >';
    margin-left: 0.5rem;
}

.breadcrumbs a:last-child:after {
    content: '';
    margin: 0;
}

.breadcrumbs a:focus {
    outline: 2px solid #2b2b2b;
    outline-offset: 2px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 100px; /* Position above mobile nav */
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #2b2b2b;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(43, 43, 43, 0.3);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10001; /* Higher than mobile nav */
    min-height: var(--touch-target-size);
    min-width: var(--touch-target-size);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover,
.back-to-top:focus {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.back-to-top:focus {
    outline: 2px solid #2b2b2b;
    outline-offset: 2px;
}

/* Homepage Specific Styles */
.homepage .card-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 45%; /* Move up slightly to create more space below */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    padding: 0 0 2rem 0 !important; /* Add bottom padding for more space below content */
}

.tagline {
    margin-top: -1.25rem; /* Bring tagline even closer to title */
}

/* Services Page Styles */
.services-consolidated {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 3rem;
    font-size: 1.1em;
    text-align: center;
}

/* Mobile and tablet portrait bottom padding for services page to prevent navigation overlap */
@media (max-width: 1024px) and (orientation: portrait) {
    .services-consolidated {
        padding-bottom: max(3rem, 250px); /* Extra spacing for services page content */
    }
}

.services-hero {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    padding-top: 1rem;
}

.services-hero h1 {
    margin-bottom: 0.5rem;
    font-size: 2.5em;
}

.services-hero .services-tagline {
    font-style: italic;
    margin: 0.5rem 0 1.5rem;
    opacity: 0.8;
    font-size: 1.2em;
}

.services-hero .services-intro {
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.3em;
}

/* Consolidated Service Overview */
.services-overview {
    margin: 4rem 0;
}

.service-section {
    margin-bottom: 3.5rem;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(43, 43, 43, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
    text-align: center;
}

.service-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.section-number {
    font-size: 2.5em;
    font-weight: bold;
    opacity: 0.15;
    color: #2b2b2b;
    flex-shrink: 0;
}

.section-header h2 {
    margin: 0;
    font-size: 2em;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -8px;
    left: 0;
    background: linear-gradient(90deg, #2b2b2b, transparent);
    transition: width 0.6s ease;
}

.service-section:hover .section-header h2::after {
    width: 100%;
}

.section-description {
    margin: 0 auto 1.5rem auto;
    font-size: 1.1em;
    line-height: 1.7;
    color: rgba(43, 43, 43, 0.9);
    max-width: 700px;
}

.service-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.highlight {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(43, 43, 43, 0.2);
    border-radius: 20px;
    font-size: 0.9em;
    color: #2b2b2b;
    transition: all 0.3s ease;
    cursor: default;
}

.highlight:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(43, 43, 43, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(43, 43, 43, 0.1);
}

.services-approach {
    margin: 4rem 0;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.services-approach h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.8em;
    position: relative;
    display: inline-block;
    text-align: center;
}

.services-approach h2::after {
    content: '';
    position: absolute;
    width: 40%;
    height: 2px;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, #2b2b2b, transparent);
}

.services-approach p {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.services-cta {
    margin-top: 4rem;
    padding: 3rem;
    position: relative;
    text-align: center;
}

.services-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    z-index: -1;
}

.services-cta h2 {
    margin-top: 0;
    font-size: 1.8em;
}

.services-cta p {
    margin-bottom: 2rem;
    font-size: 1.1em;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button-primary,
.cta-button-secondary {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    min-height: var(--touch-target-size);
    min-width: var(--touch-target-size);
}

.cta-button-primary {
    background: #2b2b2b;
    color: #eae7dc;
    border: 2px solid #2b2b2b;
}

.cta-button-primary:hover,
.cta-button-primary:focus {
    background: transparent;
    color: #2b2b2b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(43, 43, 43, 0.3);
}

.cta-button-secondary {
    background: transparent;
    color: #2b2b2b;
    border: 2px solid #2b2b2b;
}

.cta-button-secondary:hover,
.cta-button-secondary:focus {
    background: #2b2b2b;
    color: #eae7dc;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(43, 43, 43, 0.3);
}



/* Contact Page Styles */
.contact-simplified {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 2rem;
    text-align: center;
}

.contact-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-hero h1 {
    margin-bottom: 1rem;
    font-size: 2.5em;
}

.contact-intro {
    font-size: 1.1em;
    line-height: 1.7;
    color: rgba(43, 43, 43, 0.9);
    max-width: 600px;
    margin: 0 auto;
}

.contact-methods-simple {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.contact-method-simple {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.contact-method-simple:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.contact-method-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-method-icon svg {
    width: 24px;
    height: 24px;
    color: #2b2b2b;
}

.contact-method-content {
    flex-grow: 1;
}

.contact-method-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2em;
    color: #2b2b2b;
}

.contact-link-primary {
    display: block;
    font-weight: bold;
    font-size: 1.1em;
    color: #2b2b2b;
    text-decoration: none;
    margin-bottom: 0.5rem;
    position: relative;
}

.contact-link-primary:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #2b2b2b;
    transition: width 0.3s ease;
}

.contact-link-primary:hover:after {
    width: 100%;
}

.contact-method-content p {
    margin: 0;
    font-size: 0.9em;
    color: rgba(43, 43, 43, 0.8);
    line-height: 1.5;
}








.copy-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(43, 43, 43, 0.15);
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Sorts Mill Goudy', 'Times New Roman', serif;
    color: #2b2b2b;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.copy-btn::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='none' stroke='%232b2b2b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.copy-btn.success {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.4);
    color: #2e7d32;
}

.copy-btn.success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='none' stroke='%232e7d32' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
}

.copy-btn.error {
    background: rgba(244, 67, 54, 0.15);
    border-color: rgba(244, 67, 54, 0.4);
    color: #d32f2f;
}


/* Responsive Styles - Mobile First Approach */

/* Large Mobile and Small Tablet (600px - 768px) */
@media (min-width: 600px) {
    .nav-separator {
        display: inline; /* Show separators on larger screens */
    }

    .header-nav {
        text-align: right;
    }

    .nav-row {
        gap: 0.25rem; /* Closer together */
    }

    .nav-row a {
        padding: 10px 16px;
    }
    
    .footer-links {
        gap: 0.75rem; /* Closer together on tablets for better centering */
    }
    
    .footer-links a {
        padding: 10px 16px;
    }
    
    .breadcrumbs a {
        padding: 10px 16px;
    }
    
    .back-to-top {
        bottom: 110px; /* Above mobile nav */
        right: 15px;
        width: 45px;
        height: 45px;
    }
}

/* Tablet (768px - 1024px) */
@media (min-width: 768px) {
    .card-content:not(.homepage .card-content) {
        font-size: 0.5em;
    }

    /* Optimize homepage title for tablet landscape */
    .homepage .card-content h1 {
        font-size: 2.8rem;
    }

    .homepage .tagline {
        font-size: 1.2rem;
    }
    
    .services-header {
        margin-bottom: 2rem;
    }
    
    .services-pillars {
        gap: 3rem;
    }
    
    .service-pillar {
        flex-direction: row;
        gap: 2rem;
    }
    
    .pillar-number {
        width: 80px;
        font-size: 2.5em;
    }
    
    .service-list {
        gap: 1rem;
    }
    
    .services-approach {
        padding: 2rem;
    }
    
    .approach-content {
        gap: 1.5rem;
    }

    .back-to-top {
        bottom: 35px;
        right: 35px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .business-card-layout {
        font-size: min(36px, 9vw);
    }

    /* Push navigation more to the right on desktop */
    header {
        justify-content: flex-end;
        gap: 2rem;
    }

    .contact-email {
        margin-right: auto;
        margin-left: 1.5rem; /* Move 70% closer to left margin (from 5rem to 1.5rem) */
    }

    .nav-row {
        display: grid;
        grid-template-columns: repeat(2, auto);
        grid-template-rows: repeat(2, auto);
        gap: 0.1rem; /* Further reduced for tighter spacing */
        justify-content: flex-end;
        align-items: center;
        margin: 0;
    }

    /* Hide separators in grid layout */
    .nav-row .nav-separator {
        display: none;
    }

    .nav-row a {
        padding: 2px 6px; /* Further reduced for even tighter feel */
    }

    .card-content {
        padding: 0 5rem; /* Symmetric padding for proper centering */
    }

    .card-content:not(.homepage .card-content) {
        font-size: 0.6em;
    }

    /* Extra large screens */
    @media (min-width: 1440px) {
        .card-content {
            padding: 0 6rem; /* Symmetric padding for very large screens */
        }

        /* Prevent homepage title from getting too large on very wide screens */
        .homepage .card-content h1 {
            font-size: 3.5rem;
            max-width: 800px;
            margin: 0 auto;
        }

        .homepage .tagline {
            font-size: 1.3rem;
        }
    }

    .services-elegant {
        max-width: 1000px;
    }

    .about-content {
        max-width: 900px;
    }

    .about-hero h1 {
        font-size: 3em;
    }

    .about-intro {
        font-size: 1.3em;
    }

    .values-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2.5rem;
    }

    .value-item {
        padding: 2.5rem 2rem;
    }

    .privacy-content {
        max-width: 900px;
        padding-bottom: 3rem;
    }
}


/* Landscape Orientation on Mobile - Comprehensive */
@media (orientation: landscape) and (max-width: 767px) {
    .business-card-layout {
        min-height: 100vh;
        /* Maintain readable base font sizes for compact landscape viewports */
        font-size: clamp(18px, 4vw, 24px);
        /* Ensure symmetric padding for perfect centering */
        padding-left: max(0.5rem, env(safe-area-inset-left));
        padding-right: max(0.5rem, env(safe-area-inset-right));
        padding-top: max(0.5rem, env(safe-area-inset-top));
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }

    header {
        margin-bottom: 0.75rem;
        gap: 0.75rem;
        /* Ensure header stays horizontal in landscape */
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
    }

    .header-nav {
        text-align: right !important;
        width: auto !important;
        order: unset !important;
    }

    /* Make navigation closer together in landscape */
    .nav-row {
        gap: 0.125rem;
        justify-content: flex-end !important;
        flex-wrap: wrap;
    }

    /* Position contact email properly in landscape */
    .contact-email {
        margin-left: 2rem !important;
        margin-top: 0 !important;
        order: unset !important;
        text-align: left !important;
    }

    .contact-email a {
        font-size: 0.8em;
        min-height: 36px;
        padding: 6px 0;
    }

    .card-content {
        margin: 0.25rem auto;
        margin-left: auto;
        margin-right: auto;
        flex-shrink: 1;
        /* Add symmetric horizontal padding for perfect centering */
        padding-left: 2rem;
        padding-right: 2rem;
        box-sizing: border-box;
    }

    footer {
        position: relative;
        margin-top: auto;
        width: 100%;
        padding: 0.25rem max(0.75rem, env(safe-area-inset-left)) 0.25rem max(0.75rem, env(safe-area-inset-right));
        box-sizing: border-box;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    /* Fix homepage footer to viewport bottom in mobile landscape */
    .homepage footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        z-index: 10;
    }

    .footer-links {
        font-size: 0.8em;
        margin-bottom: 0.1rem;
        justify-content: center;
        gap: 1.5rem;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .desktop-footer-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
        width: 100%;
        margin: 0 auto;
        text-align: center;
        font-size: 0.8em;
    }

    .desktop-footer-nav a {
        font-size: 1em;
        padding: 6px 8px;
        min-height: 32px;
    }

    .desktop-footer-nav .nav-separator {
        display: inline;
    }

    .footer-copyright {
        bottom: 0.75rem;
    }

    .footer-links a {
        font-size: 1em;
        padding: 6px 8px;
        min-height: 32px;
    }

    .homepage .card-content {
        justify-content: center;
        padding: 0.5rem 1.5rem !important;
        min-height: 0; /* Firefox compatible alternative to auto */
        gap: 0.75rem;
    }

    .homepage .card-content h1 {
        font-size: clamp(1.8rem, 5vw, 2.4rem) !important;
        margin-bottom: 0.25rem !important;
    }

    .tagline {
        font-size: clamp(1rem, 3.4vw, 1.35rem) !important;
        margin-top: -0.5rem !important;
    }

    /* Ensure mobile nav is properly positioned in landscape */
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        font-size: 0.75em;
    }

    .mobile-nav a {
        min-height: 38px;
        padding: 6px 10px;
        font-size: 0.8em;
        min-width: 60px;
    }

    .card-content:not(.homepage .card-content) {
        font-size: clamp(0.55em, 2vw, 0.65em);
    }

    .card-content h1 {
        font-size: 1.2em;
        margin-bottom: 0.75rem;
    }

    /* Compact navigation links in landscape */
    .nav-row a {
        font-size: 0.8em;
        padding: 6px 8px;
        min-height: 36px;
    }

    /* Ensure content wrappers are centered */
    .privacy-content,
    .about-content,
    .services-consolidated,
    .contact-simplified {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .breadcrumbs {
        justify-content: center;
    }
}

/* Specific landscape handling for very short screens (iPhone landscape) */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {
    .business-card-layout {
        /* Ensure symmetric padding for perfect centering on very short screens */
        padding-left: max(6px, env(safe-area-inset-left));
        padding-right: max(6px, env(safe-area-inset-right));
        padding-top: max(6px, env(safe-area-inset-top));
        padding-bottom: max(6px, env(safe-area-inset-bottom));
        /* Preserve headline legibility on very short screens */
        font-size: clamp(16px, 3.6vw, 22px);
    }

    header {
        margin-bottom: 0.5rem;
        gap: 0.5rem;
        /* Ensure header stays horizontal even on very short screens */
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
    }

    .header-nav {
        text-align: right !important;
        width: auto !important;
        order: unset !important;
    }

    .card-content {
        margin: 0.25rem auto;
    }

    footer {
        position: relative;
        margin-top: auto;
        width: 100%;
        box-sizing: border-box;
    }

    /* Fix homepage footer to viewport bottom on very short landscape screens */
    .homepage footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        z-index: 10;
    }

    .footer-links {
        font-size: 0.7em;
        margin-bottom: 0.1rem;
    }

    .footer-copyright {
        bottom: 0.75rem;
    }

    .footer-links a {
        font-size: 1em;
        padding: 4px 6px;
        min-height: 28px;
    }

    .homepage .card-content {
        padding: 0.25rem 1rem !important;
        justify-content: center;
        gap: 0.5rem;
    }

    .homepage .card-content h1 {
        font-size: clamp(1.6rem, 4.6vw, 2.2rem) !important;
        margin-bottom: 0.2rem !important;
    }

    .tagline {
        font-size: clamp(0.95rem, 3.2vw, 1.2rem) !important;
        margin-top: -0.45rem !important;
    }

    /* Compact navigation for very short landscape screens */
    .nav-row {
        gap: 0.125rem; /* Even closer for very short screens */
        justify-content: flex-end !important;
        flex-wrap: wrap;
    }

    .nav-row a {
        padding: 4px 6px;
        font-size: 0.75em;
        min-height: 32px;
    }

    .footer-links {
        font-size: 0.75em;
    }

    .desktop-footer-nav {
        font-size: 0.75em;
    }

    .desktop-footer-nav a {
        font-size: 1em;
        padding: 4px 6px;
        min-height: 28px;
    }

    .contact-email {
        margin-left: 1rem !important; /* Very small left margin */
        margin-top: 0 !important;
        order: unset !important;
        text-align: left !important;
    }

    .contact-email a {
        font-size: 0.75em;
        min-height: 32px;
        padding: 4px 0;
    }

    .mobile-nav {
        padding: 4px 6px;
        font-size: 0.7em;
    }

    .mobile-nav a {
        min-height: 34px;
        padding: 4px 8px;
        font-size: 0.75em;
        min-width: 55px;
    }

    /* Content pages font adjustments for very short screens */
    .card-content:not(.homepage .card-content) {
        font-size: clamp(0.5em, 1.8vw, 0.6em);
    }

    .card-content h1 {
        font-size: 1.1em;
        margin-bottom: 0.5rem;
    }

    /* Ensure content wrappers are centered on very short screens */
    .privacy-content,
    .about-content,
    .services-consolidated,
    .contact-simplified {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .breadcrumbs {
        justify-content: center;
    }
}


/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-row a:hover:after,
    .contact-email a:hover:after,
    .footer-links a:hover:after {
        width: 0; /* Disable hover effects on touch devices */
    }

    .nav-row a:active,
    .contact-email a:active,
    .footer-links a:active {
        background-color: rgba(43, 43, 43, 0.1);
        border-radius: 4px;
    }

    /* Mobile navigation touch optimizations */
    .mobile-nav a:active {
        background-color: rgba(43, 43, 43, 0.15);
        transform: scale(0.95);
        transition: all 0.1s ease;
    }

    button:active,
    .copy-btn:active,
    .read-more:active,
    .cta-button-elegant:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* High DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .business-card-layout {
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E"),
            linear-gradient(to right, rgba(255,255,255,0.1), rgba(255,255,255,0.1));
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .nav-row a:after,
    .contact-email a:after,
    .footer-links a:after {
        transition: none;
    }
}


/* Contact Page Specific Mobile Styles */
@media (max-width: 900px) {
    .contact-simplified {
        padding: 0 1rem;
    }
    
    .contact-hero h1 {
        font-size: max(1.8em, 1.5rem);
    }
    
    .contact-intro {
        font-size: max(1em, 0.9rem);
    }
    
    .contact-methods-simple {
        gap: 1.25rem;
        margin-bottom: 2.5rem;
    }
    
    .contact-method-simple {
        padding: 1.25rem;
        gap: 1.25rem;
    }
    
    .contact-method-icon {
        width: 44px;
        height: 44px;
    }
    
    .contact-method-icon svg {
        width: 22px;
        height: 22px;
    }
    
    .contact-method-content h3 {
        font-size: max(1.1em, 1rem);
    }
    
    .contact-link-primary {
        font-size: max(1em, 0.9rem);
    }
    
    .contact-method-content p {
        font-size: max(0.85em, 0.8rem);
    }
    
}

@media (max-width: 600px) {
    .contact-simplified {
        padding: 0 0.75rem;
    }
    
    .contact-hero {
        margin-bottom: 2rem;
    }
    
    .contact-methods-simple {
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .contact-method-simple {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem 1rem;
        gap: 1rem;
    }
    
    .contact-method-icon {
        width: 48px;
        height: 48px;
    }
    
    .contact-method-icon svg {
        width: 24px;
        height: 24px;
    }
    
}


/* About Page Styles */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
    font-size: 1.1em;
    text-align: center;
}

/* Mobile and tablet portrait bottom padding for about page to prevent navigation overlap */
@media (max-width: 1024px) and (orientation: portrait) {
    .about-content {
        padding-bottom: max(3rem, 250px); /* Extra spacing for content pages */
    }
}

.about-hero {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.about-hero h1 {
    font-size: 2.5em;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.about-hero h1::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, #2b2b2b, transparent);
}

.about-intro {
    font-size: 1.2em;
    color: rgba(43, 43, 43, 0.8);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.about-section {
    margin-bottom: 4rem;
    padding: 0 1rem;
    text-align: center;
}

.about-section h2 {
    font-size: 2em;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.about-section h2::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #2b2b2b, transparent);
}

.about-section p {
    font-size: 1.1em;
    line-height: 1.7;
    color: rgba(43, 43, 43, 0.9);
    margin-bottom: 0;
}

.about-values {
    margin-bottom: 4rem;
    padding: 0 1rem;
}

.about-values h3 {
    font-size: 1.8em;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.about-values h3::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, #2b2b2b, transparent);
}

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

.value-item {
    text-align: center;
    padding: 2rem 1.5rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.value-item:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.value-item h4 {
    font-size: 1.3em;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.value-item h4::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #2b2b2b, transparent);
}

.value-item p {
    font-size: 1em;
    line-height: 1.6;
    color: rgba(43, 43, 43, 0.8);
    margin: 0;
}

.about-cta {
    margin-top: 4rem;
    margin-bottom: 4rem;
    position: relative;
    padding: 3rem 1rem;
    text-align: center;
}

.about-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    z-index: -1;
}

.cta-content h2 {
    font-size: 2em;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.cta-content h2::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #2b2b2b, transparent);
}

.cta-content p {
    font-size: 1.1em;
    margin-bottom: 2rem;
    color: rgba(43, 43, 43, 0.8);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Privacy Page Styles */
.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.privacy-content h1 {
    font-size: 2.5em;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.privacy-content h1::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, #2b2b2b, transparent);
}

/* Mobile and tablet portrait bottom padding for privacy page to prevent navigation overlap */
@media (max-width: 1024px) and (orientation: portrait) {
    .privacy-content {
        padding-bottom: calc(60px + env(safe-area-inset-bottom)); /* Reduced spacing above mobile nav */
    }
}

/* Additional bottom padding for privacy page in mobile landscape to prevent overlap */
@media (orientation: landscape) and (max-width: 600px) {
    .privacy-content {
        padding-bottom: calc(90px + env(safe-area-inset-bottom)) !important; /* Extra padding for landscape iPhone */
    }
}

/* Mobile and tablet portrait bottom padding for contact page to prevent navigation overlap */
@media (max-width: 1024px) and (orientation: portrait) {
    .contact-simplified {
        padding-bottom: max(1rem, 60px); /* Very minimal spacing for contact page */
    }
}

.privacy-content h1,
.privacy-content h2,
.privacy-content h3 {
    text-align: center;
}

.privacy-content section {
    margin-bottom: 2rem;
}

.privacy-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.4em;
}

.privacy-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.2em;
}

.privacy-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.privacy-content ul, 
.privacy-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.privacy-content li {
    margin-bottom: 0.5rem;
} 

/* Mobile Bottom Navigation */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    background: #eae7dc;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E"),
        linear-gradient(to right, rgba(255,255,255,0.1), rgba(255,255,255,0.1));
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    border-top: 1px solid rgba(43, 43, 43, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 10000; /* High z-index to ensure it's always on top */
    font-size: 0.9em;
    transform: translateZ(0); /* Hardware acceleration for better performance */
}

.mobile-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0 4px;
    gap: 6px;
    width: 100%;
    max-width: 600px;
    overflow-x: auto;
    overflow-y: hidden;
    -ms-overflow-style: none;
    scroll-snap-type: x proximity;

    /* Firefox scrollbar hiding */
    @supports (scrollbar-width: none) {
        scrollbar-width: none;
    }
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* Add subtle fade effect to indicate scrollability */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.mobile-nav ul::-webkit-scrollbar {
    display: none;
}

.mobile-nav li {
    flex: 0 0 auto;
    display: flex;
}

.mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    min-height: var(--touch-target-size);
    min-width: 70px;
    color: #2b2b2b;
    text-decoration: none;
    position: relative;
    transition: all 0.2s ease;
    border-radius: 6px;
    white-space: nowrap;
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
    flex-shrink: 0;
}

.mobile-nav a:hover,
.mobile-nav a:focus {
    background-color: rgba(43, 43, 43, 0.05);
}

.mobile-nav a:active {
    background-color: rgba(43, 43, 43, 0.1);
    transform: scale(0.98);
}

.mobile-nav a:focus {
    outline: 2px solid #2b2b2b;
    outline-offset: 2px;
}

/* Smart text handling for different screen sizes */
@media (max-width: 480px) {
    .mobile-nav a {
        font-size: 0.85em;
        padding: 6px 10px;
        min-width: 60px;
    }
}



/* Scroll indicator for mobile navigation */
.mobile-nav::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b2b2b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.mobile-nav:hover::after {
    opacity: 0.6;
}


/* Hide mobile nav on landscape tablets, desktop, and mobile landscape */
@media (min-width: 1200px) or ((orientation: landscape) and (min-width: 768px) and (max-width: 1366px)) {
    .mobile-nav {
        display: none;
    }

    /* Apply desktop-like padding for better margin consistency in landscape mode */
    .card-content {
        padding: 0 5rem;
    }
}


/* Add bottom padding on mobile and tablet portrait to account for fixed navigation */
@media (max-width: 1024px) and (orientation: portrait) {
    .business-card-layout {
        padding-bottom: 0; /* Remove padding since nav is now viewport-fixed */
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile */
        height: auto; /* Allow content to extend beyond viewport */
    }

    .card-content {
        padding-bottom: calc(120px + env(safe-area-inset-bottom)); /* Adequate spacing above mobile nav */
    }

    /* Hide header navigation on mobile and tablet portrait since we have bottom navigation */
    .header-nav {
        display: none;
    }

    .homepage .card-content {
        justify-content: center; /* Keep content centered on mobile */
        padding-top: 2rem; /* Add some breathing room at top */
        padding-bottom: 2rem; /* Reduced padding since copyright is now positioned separately */
    }

    /* Align content to top to prevent overlap and enable full scrolling */
    .card-content:not(.homepage .card-content) {
        justify-content: flex-start; /* Align to top instead of center to prevent overlap and enable full scrolling */
        padding-top: 1rem; /* Minimal top padding */
        padding-bottom: calc(80px + env(safe-area-inset-bottom)); /* Reduced padding since copyright is now fixed */
    }

}

/* Mobile Header Layout Improvements */
@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
        min-height: var(--mobile-header-height);
        padding: 0.5rem 0;
    }

    .header-nav {
        text-align: center;
        width: 100%;
        order: 1;
    }

    .nav-row {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.125rem; /* Closer together even on mobile */
    }

    .contact-email {
        order: 2;
        margin-top: 0.5rem;
        font-size: 0.9em;
    }

    .nav-row a {
        font-size: 0.9em;
        padding: 6px 10px;
        min-height: 36px;
    }

    .footer-links {
        font-size: 0.9em;
    }

}

/* Show separator in landscape mode on mobile */
@media (orientation: landscape) and (max-width: 1024px) {
    .nav-separator.landscape-only {
        display: inline;
    }
}

/* Mobile Landscape Header - Maintain desktop-like positioning */
@media (orientation: landscape) and (max-width: 1024px) {
    header {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        text-align: left !important;
        gap: 1rem !important;
        min-height: auto !important;
        padding: 0 !important;
    }

    .header-nav {
        text-align: right !important;
        width: auto !important;
        order: unset !important;
    }

    .nav-row {
        display: grid !important;
        grid-template-columns: repeat(2, auto) !important;
        grid-template-rows: repeat(2, auto) !important;
        gap: 0.1rem !important; /* Tight spacing like desktop */
        justify-content: flex-end !important;
        align-items: center !important;
        margin: 0 !important;
    }

    /* Hide separators in mobile landscape grid layout */
    .nav-row .nav-separator {
        display: none !important;
    }

    .contact-email {
        order: unset !important;
        margin-top: 0 !important;
        margin-left: 2rem !important; /* Position towards left margin */
        text-align: left !important;
    }

    .nav-row a {
        font-size: 0.8em;
        padding: 2px 6px; /* Tight padding like desktop */
        min-height: 36px;
    }

    .contact-email a {
        font-size: 0.8em;
        padding: 6px 0;
        min-height: 36px;
    }
}

/* Mobile Portrait Header - Center contact email */
@media (orientation: portrait) and (max-width: 1024px) {
    .contact-email {
        text-align: center !important;
    }

    /* Ensure card-content is centered in mobile portrait mode */
    .card-content:not(.homepage .card-content) {
        padding: 0 1rem;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    /* Force centering for all content containers in mobile portrait */
    .about-content,
    .services-consolidated,
    .contact-simplified,
    .privacy-content {
        margin: 0 auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 0 !important;
        /* padding-bottom handled by individual page rules */
        max-width: none !important;
        width: 100% !important;
        text-align: center !important;
    }

    /* Ensure headings in privacy content are centered */
    .privacy-content h1,
    .privacy-content h2,
    .privacy-content h3 {
        text-align: center !important;
    }

}

/* Extra small mobile services optimization */
@media (max-width: 480px) {
    .service-pillar {
        padding: 1rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        margin-bottom: 1.5rem;
    }
    
    .services-approach {
        padding: 1rem;
        margin: 1.5rem 0;
    }
    
    .services-cta-elegant {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .service-list li {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .business-card-layout {
        font-size: min(32px, 8vw);
    }

    /* Keep homepage title readable but not overwhelming on very small screens */
    .homepage .card-content h1 {
        font-size: 2.2rem;
        line-height: 1.1;
    }

    .homepage .tagline {
        font-size: 1rem;
    }
    
    header {
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .nav-row {
        gap: 0.125rem; /* Consistent close spacing */
    }
    
    .nav-row a {
        font-size: 0.85em;
        padding: 8px 12px;
        min-height: 40px;
    }
    
    .contact-email a {
        font-size: 0.85em;
        min-height: 40px;
    }
    
    .card-content {
        padding: 0 1rem; /* Consistent with other mobile breakpoints */
    }
    
    .card-content h1 {
        font-size: 1.8em;
        margin-bottom: 1.5rem;
    }
    
    .tagline {
        font-size: 0.9em;
    }
}

/* Legacy mobile landscape - keeping for backward compatibility but updated */

/* Improved mobile font scaling */
@media (max-width: 768px) {
    .business-card-layout {
        font-size: clamp(20px, 7vw, 36px);
    }

    .card-content:not(.homepage .card-content) {
        font-size: clamp(0.5em, 2.5vw, 0.6em);
    }

    .services-header h1 {
        font-size: clamp(1.5rem, 5vw, 1.8em);
    }

    .services-tagline {
        font-size: clamp(0.9rem, 3.5vw, 1em);
    }

    .services-intro {
        font-size: clamp(0.9rem, 3.5vw, 1em);
    }

    .pillar-content h2 {
        font-size: clamp(1.2rem, 4.5vw, 1.4em);
    }

    .pillar-content > p {
        font-size: clamp(0.9rem, 3.5vw, 1em);
    }

    .service-name {
        font-size: clamp(0.9rem, 3.5vw, 1em);
    }

    .service-description {
        font-size: clamp(0.85rem, 3vw, 0.9em);
    }

    /* Improve line height for mobile readability */
    body {
        line-height: 1.7;
    }

    .card-content {
        line-height: 1.7;
    }
}

/* Mobile content spacing improvements */
@media (max-width: 600px) {
    .card-content {
        padding: 0 1rem; /* Reduced padding for mobile screens */
    }

    .services-elegant,
    .about-content {
        padding: 0 8px;
    }

    .privacy-content {
        padding-left: 8px;
        padding-right: 8px;
        padding-top: 0;
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }

    .about-hero,
    .services-hero {
        margin-bottom: 2.5rem;
    }

    .about-hero h1 {
        font-size: 2em;
    }

    .about-intro {
        font-size: 1.1em;
    }

    .about-section {
        margin-bottom: 2.5rem;
        padding: 0 0.5rem;
    }

    .about-section h2 {
        font-size: 1.6em;
    }

    .about-values {
        margin-bottom: 2.5rem;
        padding: 0 0.5rem;
    }

    .about-values h3 {
        font-size: 1.4em;
    }

    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .value-item {
        padding: 1.5rem 1rem;
    }

    .about-cta {
        margin-top: 2.5rem;
        padding: 2rem 1rem;
    }

    .cta-content h2 {
        font-size: 1.6em;
    }
}

    .services-pillars {
        gap: 2rem;
        margin: 2rem 0;
    }
    
    .service-pillar {
        margin-bottom: 2rem;
        gap: 1.5rem;
    }
    
    .pillar-number {
        font-size: 2.5em;
        width: 50px;
    }
    
    .services-approach {
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .services-cta-elegant {
        padding: 2rem;
        margin-top: 2rem;
    }

/* Footer responsive design for mobile */
@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
        text-align: center;
        justify-content: center;
        padding: 0;
        margin: 0;
    }
}

/* Mobile touch improvements */
@media (max-width: 768px) {
    .nav-row a,
    .contact-email a,
    .footer-links a,
    .breadcrumbs a {
        -webkit-tap-highlight-color: rgba(43, 43, 43, 0.1);
        touch-action: manipulation;
    }
    
    /* Improve button touch targets */
    .copy-btn,
    .read-more,
    .cta-button-elegant {
        -webkit-tap-highlight-color: rgba(43, 43, 43, 0.1);
        touch-action: manipulation;
        -webkit-user-select: none;
        user-select: none;
    }
}

/* Mobile scroll and performance improvements */
@media (max-width: 768px) {
    .card-content {
        scroll-padding-bottom: 20px;
        scroll-padding-top: 20px;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        overscroll-behavior: contain;
    }
    
    /* Reduce motion for better mobile performance */
    @media (prefers-reduced-motion: reduce) {
        .nav-row a:after,
        .contact-email a:after,
        .footer-links a:after {
            transition: none;
        }
        
        button,
        .copy-btn,
        .read-more,
        .cta-button-elegant {
            transition: none;
        }
    }
}

/* Services Page Mobile Optimizations */
@media (max-width: 768px) {
    .services-header h1 {
        font-size: max(1.8em, 1.5rem);
    }
    
    .services-tagline {
        font-size: max(1em, 0.9rem);
    }
    
    .services-intro {
        font-size: max(1em, 0.9rem);
    }
    
    .services-pillars {
        margin: 2rem 0;
    }
    
    .pillar-content h2 {
        font-size: max(1.4em, 1.2rem);
    }
    
    .pillar-content > p {
        font-size: max(1em, 0.9rem);
    }
    
    .service-name {
        font-size: max(1em, 0.9rem);
    }
    
    .service-description {
        font-size: max(0.9em, 0.85rem);
    }
    
    .services-approach h2 {
        font-size: max(1.5em, 1.3rem);
    }
    
    .cta-content h2 {
        font-size: max(1.5em, 1.3rem);
    }
    
    .cta-content p {
        font-size: max(1em, 0.9rem);
    }
    
    .cta-button-elegant {
        padding: 0.6rem 1.5rem;
        font-size: max(1em, 0.9rem);
        min-height: var(--touch-target-size);
        min-width: var(--touch-target-size);
    }
    
    
    /* Mobile services layout improvements */
    .service-pillar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .pillar-number {
        align-self: center;
        margin-bottom: 0.5rem;
    }
    
    .pillar-content h2:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .services-approach {
        text-align: center;
    }
    
    .services-approach h2:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Consolidated Services Mobile Optimizations */
    .services-consolidated {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 0;
        padding-bottom: max(3rem, 58px); /* Critically reduced spacing for content pages */
        font-size: 1.1em;
    }
    
    .services-hero h1 {
        font-size: 2em;
    }

    .services-hero .services-tagline {
        font-size: clamp(0.9rem, 2.5vw, 1em);
    }

    .services-hero .services-intro {
        font-size: clamp(1rem, 2.8vw, 1.1em);
    }
    
    .services-overview {
        margin: 2rem 0;
    }
    
    .service-section {
        margin-bottom: 2.5rem;
        padding: 1.5rem 0;
    }
    
    .section-header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .section-number {
        font-size: 2em;
        order: 1;
    }
    
    .section-header h2 {
        font-size: clamp(1.4em, 3.5vw, 1.6em);
        order: 2;
        text-align: center;
    }
    
    .section-header h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .section-description {
        font-size: clamp(0.95rem, 2.8vw, 1em);
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    
    .service-highlights {
        gap: 0.5rem;
        justify-content: center;
    }
    
    .highlight {
        padding: 0.4rem 0.8rem;
        font-size: max(0.85em, 0.8rem);
    }
    
    .services-approach {
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .services-approach h2 {
        font-size: max(1.5em, 1.3rem);
    }
    
    .services-approach p {
        font-size: max(1em, 0.9rem);
    }
    
    .services-cta {
        padding: 2rem 1.5rem;
        margin-top: 2rem;
    }
    
    .services-cta h2 {
        font-size: max(1.5em, 1.3rem);
    }
    
    .services-cta p {
        font-size: max(1em, 0.9rem);
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .cta-button-primary,
    .cta-button-secondary {
        padding: 0.8rem 1.5rem;
        font-size: max(1em, 0.9rem);
        min-height: var(--touch-target-size);
        min-width: var(--touch-target-size);
        width: 100%;
        max-width: 300px;
    }
}



/* Improved Touch Interactions */
@media (hover: none) and (pointer: coarse) {
    .nav-row a:active,
    .contact-email a:active,
    .footer-links a:active,
    .breadcrumbs a:active {
        background-color: rgba(43, 43, 43, 0.15);
        transform: translateY(1px);
    }
    
    .copy-btn:active {
        background: rgba(255, 255, 255, 0.8);
        transform: scale(0.95);
    }
    
    .read-more:active,
    .cta-button-elegant:active {
        transform: scale(0.98);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }
}

/* Mobile Typography Improvements */
@media (max-width: 480px) {
    body {
        font-size: clamp(1.2rem, 3vw, 1.4rem);
    }

    .business-card-layout {
        font-size: clamp(24px, 8vw, 32px);
    }

    .card-content:not(.homepage .card-content) {
        font-size: clamp(0.45em, 3vw, 0.55em);
    }

    h1 {
        font-size: clamp(1.4rem, 6vw, 1.6em);
        line-height: 1.3;
    }

    h2 {
        font-size: clamp(1.2rem, 5vw, 1.4em);
        line-height: 1.3;
    }

    h3 {
        font-size: clamp(1.1rem, 4.5vw, 1.2em);
        line-height: 1.3;
    }

    p {
        line-height: 1.7;
        font-size: clamp(0.9rem, 3.5vw, 1rem);
    }
}

/* Mobile Scrollbar Improvements */
@media (max-width: 768px) {
    .card-content::-webkit-scrollbar {
        width: 4px;
    }
    
    .card-content::-webkit-scrollbar-thumb {
        background-color: rgba(43, 43, 43, 0.4);
        border-radius: 4px;
    }
    
    .card-content::-webkit-scrollbar-thumb:hover {
        background-color: rgba(43, 43, 43, 0.6);
    }
}

/* Mobile Focus Management */
@media (max-width: 768px) {
    .nav-row a:focus,
    .contact-email a:focus,
    .footer-links a:focus,
    .breadcrumbs a:focus {
        outline: 2px solid #2b2b2b;
        outline-offset: 2px;
        background-color: rgba(43, 43, 43, 0.1);
        border-radius: 4px;
    }
    
    button:focus,
    .copy-btn:focus,
    .read-more:focus,
    .cta-button-elegant:focus {
        outline: 2px solid #2b2b2b;
        outline-offset: 2px;
        box-shadow: 0 0 0 4px rgba(43, 43, 43, 0.2);
    }
}

/* Mobile Safe Area Support */
@supports (padding: max(0px)) {
    .business-card-layout {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .back-to-top {
        bottom: max(100px, env(safe-area-inset-bottom) + 90px); /* Above mobile nav */
        right: max(20px, env(safe-area-inset-right) + 10px);
    }

    /* Specific safe area handling for landscape orientation */
    @media (orientation: landscape) and (max-width: 1024px) {
        .business-card-layout {
            /* Full bleed even in landscape - only apply safe area insets */
            padding-left: env(safe-area-inset-left);
            padding-right: env(safe-area-inset-right);
            padding-top: env(safe-area-inset-top);
            padding-bottom: env(safe-area-inset-bottom);
        }

        .mobile-nav {
            padding-left: max(8px, env(safe-area-inset-left));
            padding-right: max(8px, env(safe-area-inset-right));
            padding-bottom: max(8px, env(safe-area-inset-bottom));
        }

        /* Adjust back-to-top for landscape safe areas */
        .back-to-top {
            bottom: max(110px, env(safe-area-inset-bottom) + 100px); /* Above mobile nav */
            right: max(15px, env(safe-area-inset-right) + 5px);
        }
    }

    /* Very short landscape screens (iPhone notch consideration) */
    @media (orientation: landscape) and (max-height: 500px) and (max-width: 767px) {
        .business-card-layout {
            /* Full bleed even on very short landscape screens */
            padding-left: env(safe-area-inset-left);
            padding-right: env(safe-area-inset-right);
            padding-top: env(safe-area-inset-top);
            padding-bottom: env(safe-area-inset-bottom);
        }
    }
}

/* Orientation change handling for smooth transitions */
@media (max-width: 1024px) {
    .business-card-layout {
        transition: padding 0.3s ease, font-size 0.3s ease;
    }

    .card-content {
        transition: margin 0.3s ease, padding 0.3s ease, font-size 0.3s ease;
    }

    .mobile-nav {
        transition: padding 0.3s ease, font-size 0.3s ease;
    }
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
    .business-card-layout {
        will-change: transform;
        transform: translateZ(0); /* Hardware acceleration */
    }

    .card-content {
        will-change: scroll-position;
    }

    /* Simplify transitions for better mobile performance */
    .nav-row a,
    .contact-email a,
    .footer-links a,
    .breadcrumbs a {
        transition: all 0.15s ease;
    }

    .nav-row a:after,
    .contact-email a:after,
    .footer-links a:after {
        transition: width 0.15s ease;
    }

    button,
    .copy-btn,
    .read-more,
    .cta-button-elegant {
        transition: all 0.15s ease;
    }
}

/* Mobile Accessibility Improvements */
@media (max-width: 768px) {
    .nav-row a,
    .contact-email a,
    .footer-links a,
    .breadcrumbs a {
        -webkit-tap-highlight-color: rgba(43, 43, 43, 0.1);
        tap-highlight-color: rgba(43, 43, 43, 0.1);
    }
    
    button,
    .copy-btn,
    .read-more,
    .cta-button-elegant {
        -webkit-tap-highlight-color: rgba(43, 43, 43, 0.1);
        tap-highlight-color: rgba(43, 43, 43, 0.1);
    }
}

/* Mobile text wrapping improvements */
@media (max-width: 768px) {
    .contact-link {
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .nav-row a,
    .footer-links a,
    .breadcrumbs a {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
}

/* Mobile button and interactive element improvements */
@media (max-width: 768px) {
    .copy-btn,
    .read-more,
    .cta-button-elegant {
        position: relative;
        z-index: 10;
    }
    
    .copy-btn::before {
        pointer-events: none;
    }
    
    /* Ensure buttons don't get cut off on small screens */
    .copy-btn {
        max-width: calc(100% - 1rem);
        right: 0.5rem;
    }
}

/* Mobile performance and battery optimizations */
@media (max-width: 768px) {
    .business-card-layout {
        contain: layout style paint;
    }
    
    .card-content {
        contain: layout style;
    }
    
    /* Reduce animations on mobile for better performance */
    .nav-row a:after,
    .contact-email a:after,
    .footer-links a:after {
        transition: width 0.2s ease;
    }
    
    button,
    .copy-btn,
    .read-more,
    .cta-button-elegant {
        transition: all 0.15s ease;
    }
}

/* Mobile safe area improvements for notched devices */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .business-card-layout {
            /* Full bleed with safe area support */
            padding-left: env(safe-area-inset-left);
            padding-right: env(safe-area-inset-right);
            padding-top: env(safe-area-inset-top);
            padding-bottom: env(safe-area-inset-bottom);
        }

        .back-to-top {
            bottom: max(100px, env(safe-area-inset-bottom) + 90px); /* Above mobile nav */
            right: max(15px, env(safe-area-inset-right) + 5px);
        }
    }

    /* iOS Safari bottom bar theming */
    @supports (-webkit-touch-callout: none) {
        html {
            /* Extend background to cover bottom safe area */
            background-attachment: fixed;
            background-size: cover;
            background-repeat: no-repeat;
            /* Ensure background covers entire viewport including safe areas */
            min-height: 100vh;
            min-height: 100dvh;
        }

        body {
            /* Extend body background to cover safe areas */
            background-attachment: fixed;
            background-size: cover;
            background-repeat: no-repeat;
            /* Add padding to account for safe areas */
            padding-left: env(safe-area-inset-left);
            padding-right: env(safe-area-inset-right);
            padding-top: env(safe-area-inset-top);
            padding-bottom: env(safe-area-inset-bottom);
        }

        .business-card-layout {
            /* Override body padding for layout container */
            padding-left: env(safe-area-inset-left);
            padding-right: env(safe-area-inset-right);
            padding-top: env(safe-area-inset-top);
            padding-bottom: env(safe-area-inset-bottom);
        }
    }
}

/* Final Mobile Optimizations */


/* Mobile touch and interaction improvements */
@media (max-width: 768px) {
    /* Improve touch feedback */
    .nav-row a:active,
    .contact-email a:active,
    .footer-links a:active,
    .breadcrumbs a:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Better button touch states */
    button:active,
    .copy-btn:active,
    .read-more:active,
    .cta-button-elegant:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    /* Improve scroll performance */
    .card-content {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        overscroll-behavior: contain;
        scroll-padding-top: 20px;
        scroll-padding-bottom: 20px;
    }
    
    /* Optimize for mobile battery life */
    .business-card-layout {
        contain: layout style paint;
        will-change: auto;
    }
    
    .card-content {
        contain: layout style;
        will-change: auto;
    }
}

/* Mobile accessibility enhancements */
@media (max-width: 768px) {
    /* Better focus indicators for mobile */
    .nav-row a:focus-visible,
    .contact-email a:focus-visible,
    .footer-links a:focus-visible,
    .breadcrumbs a:focus-visible {
        outline: 3px solid #2b2b2b;
        outline-offset: 3px;
        background-color: rgba(43, 43, 43, 0.15);
        border-radius: 6px;
    }
    
    button:focus-visible,
    .copy-btn:focus-visible,
    .read-more:focus-visible,
    .cta-button-elegant:focus-visible {
        outline: 3px solid #2b2b2b;
        outline-offset: 3px;
        box-shadow: 0 0 0 6px rgba(43, 43, 43, 0.2);
    }
    
    /* Improve text readability on small screens */
    .card-content {
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Better contrast for mobile */
    .nav-row a,
    .contact-email a,
    .footer-links a,
    .breadcrumbs a {
        color: #2b2b2b;
        text-shadow: 0px 1px 1px rgba(255,255,255,0.9);
    }
}

/* Mobile orientation change handling - updated for new layout */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 767px) {
    .business-card-layout {
        min-height: 100vh;
    }

    .card-content {
        flex-shrink: 1;
        min-height: 0; /* Firefox compatible alternative to auto */
    }

    /* Ensure content fits properly in landscape */
    .homepage .card-content {
        justify-content: center;
        align-items: center;
        gap: 1rem;
    }

    .card-content h1 {
        margin-bottom: 0.5rem;
        font-size: 1.2em;
    }

    /* Maintain proper heading hierarchy on about and services pages */
    .about-hero h1,
    .services-hero h1 {
        font-size: 2em;
    }

    .tagline {
        font-size: 0.8em;
        margin-top: -1.25rem; /* Bring tagline even closer to title */
    }
}

/* Mobile performance optimizations */
@media (max-width: 768px) {
    /* Reduce motion for users who prefer it */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }

    /* Optimize for mobile networks */
    .business-card-layout {
        background-attachment: scroll;
    }

    /* Improve mobile rendering */
    .card-content {
        backface-visibility: hidden;
        transform: translateZ(0);
    }
}

/* Copyright styling */
.content-copyright {
    font-size: 0.4em; /* Even smaller for mobile - 20% reduction */
    color: #6b6b6b; /* Lighter gray */
    opacity: 0.6; /* Faded */
    text-align: center; /* Centered above nav */
    margin: 0; /* Remove margins */
    padding: 0.25rem 1rem 0.5rem; /* Minimal padding */
    border-top: none; /* Remove border */
    white-space: nowrap;
    position: fixed; /* Position fixed at bottom of page */
    bottom: calc(60px + env(safe-area-inset-bottom)); /* Just above mobile nav height + safe area */
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999; /* Above content but below mobile nav */
    background-color: rgba(234, 231, 220, 0.95); /* Match page background with slight opacity */
    -webkit-backdrop-filter: blur(1px); /* Safari support */
    backdrop-filter: blur(1px); /* Subtle blur effect */
}

/* Hide on landscape tablets and desktop, but show on portrait tablets (iPads) */
@media (min-width: 768px) and (orientation: landscape) {
    .content-copyright {
        display: none;
    }
}

/* Hide footer copyright on portrait devices where mobile copyright is shown instead */
@media (max-width: 1023px) and (orientation: portrait) {
    .footer-copyright {
        display: none;
    }
}

.footer-copyright {
    font-size: 0.36em; /* 20% bigger than 0.3em */
    color: #6b6b6b; /* Lighter gray for subtlety */
    opacity: 0.7; /* Slightly transparent */
    text-align: center; /* Centered on page */
    white-space: nowrap; /* Prevent wrapping */
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Fixes for mobile landscape: center horizontally, align to top vertically, consistent across all pages */
@media (orientation: landscape) and (max-height: 600px) {
    /* Ensure parent container is symmetric and centered */
    .business-card-layout {
        padding-left: max(0.5rem, env(safe-area-inset-left));
        padding-right: max(0.5rem, env(safe-area-inset-right));
        padding-top: max(0.5rem, env(safe-area-inset-top));
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
        box-sizing: border-box;
    }
    
    .card-content {
        justify-content: flex-start;
        padding-left: 2rem; /* Explicitly set symmetric padding */
        padding-right: 2rem; /* Explicitly set symmetric padding */
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        align-items: center;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    .homepage .card-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        justify-content: center;
        padding: 0 !important;
        margin: 0 !important;
    }

    .breadcrumbs {
        justify-content: center;
    }

    .privacy-content,
    .about-content,
    .services-consolidated,
    .contact-simplified {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    /* Hide regular footer links in mobile landscape to show desktop footer nav */
    .footer-links {
        display: none;
    }

    /* Desktop footer nav flows naturally */
    .desktop-footer-nav {
        font-size: 0.8em;
    }

    .desktop-footer-nav a {
        font-size: 1em;
        padding: 6px 8px;
        min-height: 32px;
    }
}


