/* Styles for About.html: shared header/footer plus the company and services sections. */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Site-wide colors and typography tokens */
:root {
    --color-1: #23513AFF;
    --color-2: #740C00FF;
    --color-3: #FDCD00FF;
    --color-4: #F0eFF4FF;
    --color-5: #212529FF;
    --font-1: 'Roboto Mono', monospace;
    --font-2: 'Inter', sans-serif;
    font-size: 16px;
}

/* Page background, default text color, and inherited typeface. */
body {
    background-color: var(--color-4);
    font-family: var(--font-1);
    color: var(--color-5);
}

/* Header and brand layout */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-4);
    padding: 10px 20px;
}

#logo {
    height: 75px;
    width: auto;
    padding: 5;
    margin: 0;
}

/* Brand name and slogan */
.brand {
    display: flex;
    flex-direction: column;
}

.brand h1 {
    color: var(--color-1);
}

.brand p  {
    color: var(--color-2);
}

.brand a {
    text-decoration: none;
}

/* Main navigation links */
.nav {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-item a {
    color: var(--color-1);
    text-decoration: none;
    padding: 14px 16px;
    font-size: 1rem;
    display: block;
}

.nav-item a:hover {
    background-color: var(--color-2);
    color: var(--color-3);
}

/* Portfolio dropdown menu */
.dropdown {
    position: relative;
}

.dropdown-item {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    list-style: none;
    background-color: var(--color-4);
    z-index: 100;
}

.dropdown:hover .dropdown-item,
.dropdown:focus-within .dropdown-item {
    display: block;
}

/* Company introduction: text and image in a two-column layout. */
.About-information {
    --about-content-padding: clamp(1.25rem, 2vw, 2rem);
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
    gap: 2rem;
    margin: 3rem;
    padding: var(--about-content-padding);
    border: 2px solid var(--color-2);
    border-radius: 1rem;
}

.about-text-content {
    padding: var(--about-content-padding);
}

.about-text h2 {
    padding-bottom: 1rem;
    font-size: 1.5rem;
    line-height: 1.2;
}

.About-visual {
    padding-top: calc(var(--about-content-padding) + 1.8rem + 1rem);
}

.About-visual img {
    display: block;
    width: 100%;
    max-width: 25rem;
    height: auto;
    border-radius: 1rem;
}

/* Service heading and responsive service-card grid. */
.Service-title {
    margin: 3rem;
}

.Service-title h2 {
    background-color: var(--color-1);
    color: var(--color-4);
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 1rem;
    padding: 1rem 0;
}

.Service-Blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2rem;
    padding: 0 3rem;
}

.Service-Blocks h3 {
    text-align: center;
    padding-bottom: 1rem;
    color: var(--color-2);
}

.Service-Blocks h1 {
    color: var(--color-2);
    text-align: center;
    padding-bottom: 1rem;
}

.service-1, .service-2, .service-3, 
.service-4, .service-5, .service-6 {
    border: 2px solid var(--color-2);
    border-radius: 1rem;
    padding: 1rem;
}

@media (max-width: 800px) {
    /* Put the profile image below the introduction on narrower screens. */
    .About-information {
        grid-template-columns: 1fr;
        margin: 3rem 1.5rem;
    }

    .About-visual {
        padding-top: 0;
    }

    .About-visual img {
        margin: 0 auto;
    }
}

/*Footer*/

.site-footer { 
    background: var(--color-5); 
    color: var(--color-4); 
}
 
/* Four columns on desktop, fewer on smaller screens (see bottom) */
.site-footer__inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    margin-bottom: 0.5rem;
    padding-top: 2rem;
}

.site-footer h2 { 
    margin: 0 0 1rem; 
    font-size: 1rem; 
    font-weight: 700; 
    color: var(--color-3); 
}

.site-footer p  { 
    margin: 0;
}

.site-footer ul {
    margin: 0;
    padding: 0; 
    list-style: none; 
}

.site-footer li { 
    margin-bottom: .625rem;
    line-height: 1;
    font-size: 0.75rem; 
}
 
.site-footer__logo { 
    margin-bottom: .75rem !important; 
    font-size: 1.75rem; 
    font-weight: 700;
    color: var(--color-3); 
}

#site-footer__slogan {
    font-size: 0.75rem;
    color: var(--color-4);
}
 
/* Links */
.site-footer a { 
    color: var(--color-4);
    text-decoration: none; 
    border-bottom: 1px solid transparent;
}

.site-footer a:hover { 
    color: var(--color-3);
    border-bottom-color: var(--color-3); 
}

.site-footer a:focus-visible { 
    outline: 3px solid var(--color-3); 
    outline-offset: 3px; 
}
 
/* Bottom bar */
.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    border-top: 2px solid var(--color-1);
    font-size: .8125rem;
}
.site-footer__bottom ul { 
    display: flex; 
    gap: 1.5rem; 
}

.site-footer__bottom li { 
    margin: 0; 
}

/* Shared button style */
.button {
    display: block;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0.25em 0.5em;
    border-radius: 1rem;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    text-align: center;
    text-decoration: none;
}

/* About button fills the visual column */
.about-button .button {
    width: 100%;
    color: var(--color-5);
    box-shadow: 1px 1px 0px 0px var(--color-2), 2px 2px 0px 0px var(--color-2), 3px 3px 0px 0px var(--color-2), 4px 4px 0px 0px var(--color-2), 5px 5px 0px 0px var(--color-2);
    border: 3px solid var(--color-2);
    
}

/* Pressed button state */
.button:active {
    box-shadow: 0px 0px 0px 0px;
    top: 5px;
    left: 5px;
}

/* Service heading and responsive service-card grid.
   Replaces everything from "Service heading" down to and including the
   ".service-1, .service-2, ... .service-6" rule in the About stylesheet. */
.Service-title {
    margin: 3rem;
}

.Service-title h2 {
    background-color: var(--color-1);
    color: var(--color-4);
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 1rem;
    padding: 1rem 0;
}

.Service-Blocks {
    display: grid;
    gap: 2rem;
    padding: 0 3rem;
    margin-top: 3rem;
}

/* Scoped under .Services so these win over the older .Service-Blocks column rules in the media queries below.
   Three cards sit in one row, then stack into one column on tablets and phones. */
.Services .Service-Blocks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
}

.Service-Blocks h3 {
    text-align: center;
    padding-bottom: 1rem;
    color: var(--color-2);
}

/* Card: picture on top, text below, button pinned to the bottom */
.service-card {
    display: flex;
    flex-direction: column;
    border: 2px solid var(--color-2);
    border-radius: 1rem;
    overflow: hidden;
}

/* Grid background shows behind the picture until the image file exists */
.service-image {
    aspect-ratio: 4 / 3;
    border: 2px solid var(--color-2);
    background-color: var(--color-1);
    background-image:
        linear-gradient(var(--color-5) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-5) 1px, transparent 1px);
    background-size: 1.5rem 1.5rem;
}

.service-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1rem;
}

.service-body p {
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* The existing .about-button .button rules style the button; this only pushes it to the bottom of the card */
.service-body .about-button {
    margin-top: auto;
}

@media (max-width: 800px) {
    .Services .Service-Blocks {
        grid-template-columns: 1fr;
    }
}

/* Tablet: two columns, brand block on its own row */
@media (max-width: 900px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}
 
/* Phone: one column */
@media (max-width: 500px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}

/* Wrap the shared header navigation instead of forcing it into one row. */
@media (max-width: 800px) {
  header {
    flex-wrap: wrap;
    gap: .75rem 1rem;
  }

  header > .nav {
    flex-basis: 100%;
    justify-content: center;
  }

  header > .nav > .nav {
    justify-content: center;
    flex-wrap: wrap;
  }

  .Service-Blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Use compact page margins and single-column service cards on phones. */
@media (max-width: 600px) {
  header { padding: .75rem 1rem; }
  .nav-item a { padding: .6rem .75rem; }
  .site-footer__inner { padding-left: 1.5rem; padding-right: 1.5rem; }
  .About-information { margin: 2rem 1rem; padding: 1rem; }
  .about-text-content { padding: .5rem; }
  .Service-title { margin: 2rem 1rem; }
  .Service-Blocks { grid-template-columns: 1fr; padding: 0 1rem; gap: 1rem; }
  .site-footer__bottom { justify-content: center; text-align: center; padding: 1rem; }
}