/* Base */
body {
    font-family: "Inter", sans-serif;
    margin: 0;
    background: #f7f7f8;
    color: #222;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Make main content grow to fill space */
main, .content {
    flex: 1 0 auto; /* grow and take remaining space */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container.narrow {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1rem;
}

.navbar {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between; /* logo left, menu right */
    align-items: center;
    padding: 1rem 2rem;
}

nav a {
    position: relative;
    text-decoration: none;
    color: #333;
    padding: 0.25em 0; /* some vertical spacing */
    transition: color 0.2s ease;
}

nav a:hover {
    color: #e87000; /* optional hover color */
}

/* Active link underscore */
nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;  /* adjust distance from text */
    width: 100%;
    height: 2px;
    background-color: #e87000;  /* underline color */
    border-radius: 1px; /* smooth edges */
}

/* Optional: animated underscore on hover for all links */
nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background-color: #e87000;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

.logo {
    font-weight: 700;
    font-size: 1.4rem;
    color: #e87000;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.navbar nav {
    display: flex;
    gap: 1.5rem; /* spacing between menu items */
}

.navbar nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.2s, transform 0.15s;
}

.navbar nav a:hover {
    color: #e87000;
    transform: translateY(-1px);
}

/* Hero Section */
.hero-subtle {
    background: linear-gradient(135deg, #ffffff, #f5f5f5);
    border-bottom: 1px solid #e1e1e1;
    text-align: center;
    padding: 5rem 1rem;
}

.hero-subtle h2 {
    font-size: 2.4rem;
    color: #222;
    margin-bottom: 0.5rem;
}

.hero-subtle p {
    color: #555;
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.highlight {
    color: #e87000;
    font-weight: 600;
}

/* About Section */
.about-content {
    padding: 4rem 1rem 2rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    align-items: start;
}

.about-text {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border-top: 4px solid #e87000;
}

.about-text h3 {
    margin-top: 0;
    color: #e87000;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.about-text p {
    margin-bottom: 1rem;
    color: #333;
}

.about-photo img {
    width: 100%;
    max-width: 320px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* About Founder Section */
.about-founder {
     background: #fff;
     padding: 4rem 1rem;
     border-top: 1px solid #ddd;
     box-shadow: 0 -1px 8px rgba(0,0,0,0.04);
     margin-top: 3rem; /* separates from content above */
     border-radius: 16px; /* soft edges */
     border-top: 4px solid #f97316; /* subtle orange stripe */
 }

.about-founder-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
}

.founder-photo img {
    width: 100%;
    border-radius: 16px;
    border: 3px solid #f1f1f1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    object-fit: cover;
}

.founder-text h3 {
    color: #e87000;
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.founder-text p {
    color: #2c2c2c;
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* Optional subtle accent for key phrases */
.founder-text strong {
    color: #e87000;
}

/* Responsive */
@media (max-width: 768px) {
    .about-founder-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .founder-photo img {
        max-width: 240px;
        margin: 0 auto 1.5rem;
    }

    .founder-text h3 {
        font-size: 1.5rem;
    }
}

/* Footer */
.footer {
    background-color: #333;          /* a bit richer than darkgray, more modern */
    color: #fff;                     /* keeps text legible */
    padding: 1.5rem 1rem;            /* slightly more horizontal padding for breathing room */
    text-align: center;
    font-size: 0.9rem;
    border-top: 4px solid #e87000;   /* brand accent */
    margin-top: 2rem;                /* slightly more space above footer */
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1); /* subtle separation from content */
    flex-shrink: 0;
}

.footer p {
    margin: 0.5rem 0;
}

.footer a {
    color: #e87000;
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: #ff9220;
}

/* Buttons and links */
a.button, button {
    display: inline-block;
    background: #e87000;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

a.button:hover, button:hover {
    background: #ff9220;
}

/* Responsive */
@media (max-width: 768px) {
    .about-grid,
    .about-founder-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-photo img,
    .founder-photo img {
        margin: 0 auto 1.5rem;
    }

    .about-text {
        padding: 1.75rem;
    }
}

/* Services Section */
.services {
    padding: 5rem 1rem;
    text-align: center;
}

.services h2 {
    color: #e87000;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.services .intro {
    color: #555;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border-top: 4px solid #e87000;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.service-card h3 {
    color: #e87000;
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.service-card p {
    color: #333;
    margin: 0;
    line-height: 1.6;
}

.standards ul {
    list-style-position: inside;
    padding-left: 0;
}

/* Contact Section */
.contact {
    padding: 5rem 1rem;
    text-align: center;
}

.contact h2 {
    color: #e87000;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.contact .intro {
    color: #555;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Form Layout */
.contact-form {
    background: #fff;
    max-width: 700px;
    margin: 0 auto;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border-top: 4px solid #e87000;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group.full {
    grid-column: 1 / -1;
}

label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

input,
textarea {
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 0.75rem;
    font-size: 1rem;
    transition: border 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #e87000;
    box-shadow: 0 0 0 3px rgba(232,112,0,0.15);
}

button.button {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    font-size: 1rem;
    border-radius: 10px;
    font-weight: 600;
}

button.button:hover {
    background: #ff9220;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 600px) {
    .contact-form {
        padding: 1.75rem;
    }
}

@media (max-width: 768px) {
    .service-card {
        text-align: center;
    }
}

/* WCAG */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid #e87000;
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .service-card {
        transition: none;
    }
}

.blog-grid .service-card .button {
    margin-top: 10px;
}

.blog-post code {
    background-color: yellow;
    padding: 2px 4px;
    border-radius: 4px;
}

input:focus,
textarea:focus,
button:focus {
    outline: 3px solid #e87000; /* orange accent */
    outline-offset: 2px;
}

/* Error message styling */
.contact-form .form-group {
    position: relative;
    margin-bottom: 1rem;
}

.contact-form .error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
    min-height: 1.25rem;
    line-height: 1.25;
    font-weight: 500;
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* Make sure error messages are visible when they have content */
.contact-form .error-message:not(:empty) {
    display: block !important;
    opacity: 1 !important;
    height: auto !important;
    visibility: visible !important;
}

/* Style for invalid inputs */
input:invalid,
textarea:invalid {
    border-color: #dc2626; /* red-600 */
}

/* Focus state for invalid inputs */
input:invalid:focus,
textarea:invalid:focus {
    border-color: #dc2626; /* red-600 */
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.service-card .material-icons {
    font-size: 44px; /* change size */
    color: #1a73e8;  /* change color */
    display: block;
    margin-bottom: 12px;
    transition: transform 0.2s ease, color 0.2s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.service-card:hover .material-icons {
    transform: scale(1.1);
    color: #ff9220; /* complementary hover color */
}

.service-card h3 {
    margin-top: 0;
}

.page-header p {
    letter-spacing: 0.5px;
    text-transform: none;  /* keep normal case for readability */
    font-size: 1.25rem;      /* slightly larger */
    font-weight: 600;         /* semi-bold */
    line-height: 1.4;
    margin-top: 0.5rem;
    color: #4a4a4a;  /* softer than black for elegance */
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.notfound-page {
    flex: 1 1 auto;       /* allow to grow fully */
    display: flex;
    flex-direction: column; /* stack content vertically */
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.notfound-content {
    max-width: 500px;
}

.notfound-page h1 {
    font-size: 4rem;
    color: #e87000;
    margin-bottom: 0.5rem;
}

.notfound-page h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.notfound-page p {
    color: #555;
    margin-bottom: 1.5rem;
}

.notfound-page a.button {
    padding: 0.75rem 1.5rem;
}

@media (max-width: 768px) {
    .service-card {
        text-align: center;
    }
    .service-card .material-icons {
        margin-left: auto;
        margin-right: auto;
    }
}

/* =========================
   Mobile Navbar Fix
   ========================= */

.nav-toggle {
    display: none;
    font-size: 1.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    color: inherit;
}

.logo img {
    display: block;
}

.tight-list-intro {
    margin-bottom: 0.25rem;
}

.tight-list {
    margin-top: 0;
}

/* Mobile behavior */
@media (max-width: 768px) {
    .navbar {
        position: relative;
    }

    .nav-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    .nav-toggle {
        display: block;
        font-size: 1.75rem;
        background: none;
        border: none;
        cursor: pointer;
    }

    .navbar nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1rem 0;
        z-index: 1000;
        /*overflow-y: auto;*/
        /*border-top: 1px solid #e5e7eb;*/
    }

    .navbar nav a {
        padding: 0.75rem 1.25rem;
    }

    .navbar nav.open {
        display: flex;
    }
}
