/* ===================================
   MILKY WAY WEB STUDIO
   Home Stylesheet - styles.css
   =================================== */

/* ===================================
   2. RESET & BASE STYLES
   =================================== */


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* Screen-reader only — visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
html {
  overscroll-behavior: none;
}

body {
  font-family: var(--font-family);
  line-height: var(--line-height);
}

h1, h2 {
  margin-bottom: 20px;
}

p {
  margin-bottom: 15px;
}

/* ===================================
   3. LAYOUT - PAGE WRAPPER
   =================================== */
.page-wrapper {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}
html, body { overflow-x: hidden; }
.main-content {
  flex: 1;
  margin-left: 280px;
  max-width: calc(100% - 280px);
}

@media (width <= 1024px) {
  .main-content {
    margin-left: 0;
    max-width: 100%;
  }
}


/* ===================================
   SIDEBAR STYLES
   =================================== */

.sidebar {
  width: 280px;
  background: linear-gradient(180deg, var(--bg-clr-sidebar) 0%, var(--bg-clr-sidebar-2) 100%);
  color: var(--clr-sidebar);
  padding: 20px;
  padding-top: 170px;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 2px 0 10px var(--shadow-light);
}

.sidebar h2 {
  color: var(--clr-sidebar-h);
  border-bottom: 2px solid var(--clr-sidebar-h);
  margin-bottom: 20px;
  font-size: 1.5rem;
  padding-bottom: 1.5rem;
}

.portfolio-category {
  margin-bottom: 25px;
}

.portfolio-category h3 {
  color: var(--text-light-gray);
  font-size: 1.1rem;
  margin-bottom: 10px;
  padding-left: 5px;
}

.portfolio-category ul {
  list-style: none;
}

.portfolio-category li {
  margin-bottom: 8px;
}

.portfolio-category a {
  color: var(--text-medium-gray);
  text-decoration: none;
  display: block;
  padding: 8px 10px;
  border-radius: 5px;
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

.portfolio-category a:hover {
  background-color: var(--primary-blue);
  color: var(--clr-main-content);
  transform: translateX(5px);
}

.portfolio-menu-btn {
  display: none;
  position: fixed;
  top: 70px;
  left: 15px;
  z-index: 1001;
  background-color: var(--clr-prm-700);
  color: var(--clr-main-content);
  border: 2px solid var(--primary-blue);
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: 0 2px 10px var(--shadow-dark);
  transition: opacity 0.5s ease;
}


.portfolio-menu-btn:hover {
  background-color: var(--sidebar-blue);
}
.coming-soon {
  color: var(--primary-blue);
  font-size: 0.60em;
  margin-left:  1rem;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--overlay-dark);
  z-index: 999;
}

.sidebar-overlay.active {
  display: block;
}

/* ===================================
   GRID SYSTEM
   =================================== */
  .grid {
  display: grid;
  gap: 1.5rem;
  margin: 0px 0.7rem;
  grid-template-columns: 
  repeat(auto-fit, minmax(250px, 1fr));
  }

.grid-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.grid-row {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

.grid-row.two-col {
  grid-template-columns: 1fr 1fr;
}

.grid-row.three-col {
  grid-template-columns: 1fr 1fr 1fr;
}

.grid-row.gap-large {
  gap: 40px;
}

.grid-col {
  padding: 1rem;
   margin: 1rem 1rem;
  background-color: var(--bg-light-gray);
  border: 1px solid var(--border-gray);
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ===================================
HERO SECTION
   =================================== */
#hero-section {
  position: relative;
  overflow: hidden;
  background-color: var(--bg-clr-hero);
  padding: 20px;
  text-align: center;
}
#hero-section canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
#hero-section .grid-container {
  position: relative;
  z-index: 1;
}
 .hero-title {
  color: var(--fire-orange-1);
  font-size: 3rem;
  font-weight: lighter;
  margin-bottom: 20px;
  text-shadow:
    0 0 5px var(--fire-red-1);
 }
 #hero-section h2 {
  font-weight: 500;
  font-size: 1.5rem;
 }
@media (width <= 1024px) {
  .hero-title {
    /* padding-left: 5rem; /* clears the hamburger button */
  padding-top: 1.5rem; 
  }
}
   

.hero-p {
  color: var(--fire-orange-1);
  font-size: 1.3rem;
  margin-bottom: 30px;
  text-shadow:
    1px 1px 30px var(--fire-red-1),
    2px 2px 4px var(--shadow-darker);
}


/*================================
   second-section -- INTRO SECTION
   =================================== */
#second-section {
  background-image: url('../images/second-section-bg-1.webp');
  background-size: cover;
  background-position: bottom -10px; /* shifts image down 10px, pushing the seam out of view */
  background-repeat: no-repeat;
  height: 80vh;
  width: auto;
  margin: auto;
  padding: 0;
  overflow-x: hidden;
}

#second-section .computer-graphic {
  display: none;
}

@media (width <= 1380px) {
  #second-section {
    position: relative;
    background-image: url('../images/second-section-bg-\(no-computer\).webp');
    height: auto;
    background-position: bottom;
  }
#second-section .computer-graphic {
    position: absolute;
    bottom: 1rem;
    right: 0.9rem;
    width: 40%;
  } 
}

.intro {
  display: grid;
  grid-template-columns: .4fr 1fr 1fr 1fr 1fr 2fr;
   grid-template-rows: 10vh 10vh 10vh auto auto auto auto auto 2vh;
  gap: .2rem;
  font-weight: 900;
}
.intro-title{
  color: var(--text-black);
  text-align: center;
}
.intro-p{
  color: var(--text-black);
  text-align: center;
  font-size:1rem;
}
.intro-btn-gold {
    grid-column: 2 / 5;
    grid-row: 1 / 2;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: .9;
    padding: .9rem 3rem;
    font-size: 1.4rem;
    font-weight: 900;
}

.intro-card-1{
  grid-column: 2 / 6;
  grid-row: 4 / 6; 
}
.intro-card-2{
  grid-column: 2 / 4;
  grid-row: 6 / 8; 
}
.intro-card-3{
  grid-column: 4 / 6;
  grid-row: 6 / 8;   
}

@media (min-width: 769px) and (max-width: 868px), (min-width: 1024px) and (max-width: 1148px) {

 
  .intro-card-1 {
    grid-row: 3 / 5;
  }
  .intro-card-2 {
    grid-row: 5 / 7;
  }
  .intro-card-3 {
    grid-row: 5 / 7;
  }
}

[class^="intro-card"] {
  text-align: center;
  color: var(--text-white);
  background: hsla(0, 0%, 100%, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid hsla(0, 0%, 100%, 0.3);
  border-radius: 8px;
  box-shadow: 0 4px 6px hsla(0, 0%, 0%, 0.1);
  padding: 1rem;
  opacity: 0;
}
#second-section.fade-in .intro-card-1,
#second-section.fade-in .intro-card-2,
#second-section.fade-in .intro-card-3 { 
  animation: cardFadeIn 1s ease 1.5s both; 
}
.btn-gold-fadein {
    transform: scaleX(0.1) scaleY(0.1);
    will-change: transform;
    animation: btnScaleX 1s ease 1s forwards, btnScaleY 1s ease 2s forwards;
}
.btn-gold-fadein-2 {
    transform: scaleX(0.1) scaleY(0.1);
    will-change: transform;
    /* No animation here — wait for the section to be observed */
}

#sixth-section.fade-in .btn-gold-fadein-2 {
    animation: btnScaleX 1.5s ease 0.3s forwards, btnScaleY 1.5s ease 1.8s forwards;
}

@keyframes btnScaleX {
  from { transform: scaleX(0.1) scaleY(0.1); }
  to   { transform: scaleX(1) scaleY(0.1); }
}

@keyframes btnScaleY {
  from { transform: scaleX(1) scaleY(0.1); }
  to   { transform: scaleX(1) scaleY(1); }
}

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

/* @keyframes cardFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
} */

/* ===================================
  SERVICES | THIRD SECTION
   =================================== */
   /* Background goes on the div */
/* SERVICES TITLE - Shadow Slide Animation */

.services-title {
  position: relative; 
  padding: 2rem .5rem 1.8rem;
  text-align: center;
}

.services-title::before {
  content: '';
  position: absolute;
  inset: 0;                
  background-image: url('../images/services-section-bg.webp');
  background-size: cover;
  background-position: bottom;
  background-repeat: no-repeat;
  opacity: 0.4;
  z-index: -1;       
}

main h2 {
  font-size: 3rem;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--text-black),var(--text-black-always);
  text-shadow:
     1px -1px 0 rgb(40, 218, 111),
     2px -2px 0 rgb(20, 243, 91),
     3px -3px 3px rgba(0, 0, 0, 0.25); 
}
  

 #third-section{
  
   padding-bottom: 1rem;
 }
#third-section .grid{
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  /* background-color: hsl(226, 71%, 93%); */
  padding: 40px 0 50px 0;
}
@media (width <= 1350px) {
  #third-section .grid {
    gap: .8rem
  }
}
@media (width <= 1200px) {
  #third-section .grid {
    gap: .2rem;
  }
}
@media (width <= 1120px) {
  #third-section .grid {
    display: grid;
    grid-template-rows: 1fr 1fr 1fr;
  }
}
#third-section-h {
  color: var(--clr-section-h);
  font-size: 1.6rem;
  text-align: center;
  margin: 3rem 1rem;
}
#third-section .grid-col{
  border-left: 5px solid navy;
}

#third-section .grid-col h3 {
  color: var(--forest-dark);
  margin-bottom: 15px;
}

#third-section .grid-col:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px var(--shadow-medium);
}

#third-section .additional-services {
  font-size: 1.1rem;
  color: var(--navy-blue);
  text-align: center;
  margin: 3rem 5rem 0rem;
  font-style: italic;
}
 @media (width<=768px) {
  #third-section .additional-services{
  margin: 1rem 2rem 0rem;
}
 }
.service-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.icon-wrapper {
    position: relative;
    display: inline-block;
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
     display: flex;              /* ← add this */
    justify-content: center; 
}

.icon-text {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: 800;
     /* text-shadow: 1px 1px 2px hsla(0, 97%, 28%, 0.5);  */
    color: hsla(0, 0%, 0%, 1);
}   
/* Third section cards start hidden */
#third-section .grid-col {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Fade in staggered left to right when section is visible */
#third-section.fade-in .grid-col:nth-child(1) {
  animation: cardFadeIn 0.5s ease 0.2s forwards;
}
#third-section.fade-in .grid-col:nth-child(2) {
  animation: cardFadeIn 0.5s ease 0.6s forwards;
}
#third-section.fade-in .grid-col:nth-child(3) {
  animation: cardFadeIn 0.5s ease 1s forwards;
}
  @media (width <= 1120px){
  #third-section .grid-col:nth-child(1) {
    grid-column: span 2;
  }
  #third-section .grid-col:nth-child(2) {
    grid-column: span 1;
  } 
   #third-section .grid-col:nth-child(3) {
    grid-column: span 1; 
  }
}
/* ===================================
   FLIP CARDS — SERVICES SECTION
   Add this block to styles.css
   in the SERVICES | THIRD SECTION area
   =================================== */

/* Override the existing hover lift —
   flip interaction replaces it */
#third-section .grid-col:hover {
  transform: none;
  box-shadow: none;
}

/* Card shell — keep your existing grid-col padding,
   just add flex column so dots/button sit at the bottom */
#third-section .grid-col.flip-card {
  display: flex;
  flex-direction: column;
}

/* The flip viewport contains ONLY the rotating content.
   It clips the backface and sets perspective.
   Height is driven naturally by whichever face is taller. */
.flip-viewport {
  position: relative;
  perspective: 1000px;
  overflow: hidden;
  flex: 1;
  /* Match the tallest face — both faces are stacked via
     position:absolute so we set a min-height here.
     The cert image at ~264px usable width is ~186px tall;
     the front face text is taller, so let it lead. */
  /* min-height: clamp(250px, 40vh, 800px); */
}

/* Inner wrapper rotates */
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
}

/* Both faces fill the viewport */


.flip-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.5rem 0;
  box-sizing: border-box;
  width: 100%;
}

.flip-front {
  position: relative; /* stays in flow, drives height */
  transform: rotateY(0deg);
}

.flip-back {
  position: absolute; /* hidden behind, doesn't affect height */
  inset: 0;
  transform: rotateY(180deg);
}


.flip-card-inner[data-face="1"] { transform: rotateY(0deg); }
.flip-card-inner[data-face="2"] { transform: rotateY(-180deg); }

/* ── CERTIFICATE BACK FACES ── */
.flip-cert-face {
  background-color: var(--bg-light-gray);
  border-left: 5px solid hsl(2, 29%, 54%);
  padding: 1rem 0.75rem;
  justify-content: center;
}

.cert-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

/* ── MAINTENANCE INFO BACK FACE ── */
.flip-info-face {
  background-color: var(--bg-light-gray);
  border-left: 5px solid hsl(2, 29%, 54%);
  padding: 1rem;
  align-items: flex-start;
  justify-content: center;
}

.flip-info-heading {
  font-size: 1rem;
  color: var(--forest-dark, navy);
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

.flip-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.flip-info-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.65rem;
  font-size: 0.9rem;
  color: var(--forest-dark, #333);
  line-height: 1.4;
}

.flip-info-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: hsl(2, 29%, 54%);
  font-size: 1.1rem;
  line-height: 1.3;
}

.flip-contact-link {
  color: var(--forest-dark, navy);
  text-decoration: underline;
  text-decoration-color: hsl(2, 29%, 54%);
  text-underline-offset: 3px;
}

.flip-contact-link:hover {
  color: hsl(2, 29%, 54%);
}

/* Dots — in normal flow, always visible below the viewport */
.flip-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 4px;
  flex-shrink: 0;
}

.flip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border-gray, #ccc);
  transition: background-color 0.2s ease;
  display: inline-block;
}

.flip-dot.active {
  background-color: navy;
}

/* Flip button — in normal flow, always at bottom */
.flip-btn {
  width: calc(100% - 2rem);
  margin: 0 1rem 0.5rem;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--border-gray, #ccc);
  background: transparent;
  color: var(--forest-dark, navy);
  cursor: pointer;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

/* ===================================
   CERTIFICATE LIGHTBOX
   =================================== */

.cert-lightbox-trigger {
  cursor: zoom-in;
}

#cert-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(10, 10, 15, 0.93);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
}

#cert-lightbox.active {
  display: flex;
}

#cert-lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}

#cert-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s ease;
}

#cert-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  color: #fff !important;
  transform: none;
  box-shadow: none;
}
/* Flip button responsive labels */
.flip-btn-mobile  { display: none; }
.flip-btn-desktop { display: inline; }

@media (width <= 768px) {
  .flip-btn-mobile  { display: inline; }
  .flip-btn-desktop { display: none; }
  .flip-btn {
    font-size: 0.85rem !important;
    padding: 0.45rem 1rem !important;
  }
  .flip-btn:hover {
    background-color: transparent !important;
    color: var(--forest-dark, navy) !important;
    transform: none !important;
    box-shadow: none !important;
  }
}
/* ======= END FLIP CARDS & LIGHTBOX ======= */

/* --- 1024px and below --- */
@media (width <= 1024px) {
  #third-section .grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
  #third-section .grid-col:nth-child(1),
  #third-section .grid-col:nth-child(2),
  #third-section .grid-col:nth-child(3) {
    grid-column: span 1;
  }
}

/* --- 858px and below --- */
@media (width <= 858px) {
  #third-section .grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
     margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  #third-section .grid-col:nth-child(1) {
    grid-column: 1 / 3;
  }

  #third-section .grid-col:nth-child(2),
  #third-section .grid-col:nth-child(3) {
    grid-column: span 1;
  }
}

@media (width <= 580px) {
  
  #third-section .grid {
    grid-template-columns: 1fr;
    gap: .5rem;
    margin-left: 0.2rem;
    margin-right: 0.2rem;
  }
  

  #third-section .grid-col:nth-child(1),
  #third-section .grid-col:nth-child(2),
  #third-section .grid-col:nth-child(3) {
    grid-column: span 1;
  }
}


/*==== #FOURTH SECTION in f-button.css{
  padding: 0 !important;
}*/
 .scroll-right-on-small-screen {
    display: none;
    font-size: 1.4rem;
    color: var(--clr-neutral-900);
    font-weight: 400;
    text-align: center;
  }
/* ===================================
   FIFTH-SECTION: TESTIMONIALS SECTION
   =================================== */

/* ===================================
   SIXTH SECTION: CALL TO ACTION SECTION
   =================================== */
#sixth-section {
  text-align: center;
  padding: 5% 1% 3% 5%;
}


#sixth-section p {
  font-size: 1.2rem;
  color: var(--clr-section-4);
  margin-bottom: 2.8rem;
}

/* .bg-gradient-forest {
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-dark) 100%);
  color: var(--clr-main-content);
} */



/* Individual anchor link — just strip the underline */
.cta-button {
  text-decoration: none;
}

.btn-gold {
  background-image: url('../images/gold-icon-bg.webp');
  background-size: cover;
  background-position: center;
  padding: .9rem 2.1rem;
  border: none;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #4a2c00;
  cursor: pointer;
}
.btn-gold:hover {
  color: hsl(126, 97%, 40%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px hsl(126, 97%, 40%);
}

button {
  transition: all 0.3s ease;
}

button:hover {
  background-color: var(--primary-blue) !important;
  color: var(--clr-main-content) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-blue);
}

button:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 8px var(--shadow-blue-dark);
  transition: all 0.1s ease;
}

/* ===================================
   INTERSECTION OBSERVER ANIMATIONS
   =================================== */

#third-section,
#fourth-section,
#fifth-section,
#sixth-section,
#seventh-section,
#eighth-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in {
  opacity: 1 !important;
  transform: translateY(0) !important;
}


/* ===================================
  RESPONSIVE DESIGN
   =================================== */


/* --- 1024px and below --- */
@media (width <= 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding-top: 20px;
    overflow-y: auto;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .portfolio-menu-btn {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }
}

/* --- 768px and below --- */
@media (width <= 768px) {
.intro {
    grid-template-columns: 1fr;
    grid-template-rows: 3vh auto auto auto 3vh;
    gap: 0.9rem;
  }

  .intro-btn-gold {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  .intro-card-1 {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
  }

  .intro-card-2 {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
  }

  .intro-card-3 {
    grid-column: 1 / 2;
    grid-row: 4 / 5;
  }

  h1 {
    font-size: 2rem !important;
  }

  h2 {
    font-size: 2rem !important;
  }

  a {
    padding: 5px;
    display: inline-block;
  }

  button {
    font-size: 1rem !important;
    padding: 0.75em 0.9375em !important;
  }

  .grid-row.three-col {
    grid-template-columns: 1fr 1fr;
  }

  .grid-col {
    padding: 0.9rem !important;
  }

  .logo .desktop-logo {
    display: block;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .btn-call,
  .btn-start,
  .btn-email {
    width: 100%;
    max-width: 300px;
  }

  #hero-section {
    padding-bottom: 0.8% !important;
  }

  #second-section {
    background-image: url('../images/intro-bg-3.webp');
    height: auto;
  }

  #third-section .grid-col {
    padding: 1rem !important;
  }
  .scroll-right-on-small-screen {
    display: flex;
  }

  #sixth-section {
    padding: 3% 1% 1% 1% !important;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: .1rem;
  }

  .footer-content .footer-col:nth-child(3) {
    grid-column: 1 / 3;
    display: flex;
    justify-content: center;
    padding-top: 10px;
  }

  .footer-content .footer-col:nth-child(3) .footer-logo {
    margin: 1px 25%;
    height: 100%;
  }

  .footer {
    padding: 30px 15px 15px;
  }

  .footer-content .footer-col h3 {
    min-height: 3.7rem;
  }
}


/* --- 480px and below --- */
@media (width <= 480px) {
  h1 {
    font-size: 1.75rem !important;
  }

  /* h2 {
    font-size: 1.5rem !important;
  } */
  p {
    font-size: 0.875rem !important;
  }
  
.intro {
  grid-template-rows: auto auto auto auto 3vh;
}
  
  .grid-row.two-col,
  .grid-row.three-col {
    grid-template-columns: 1fr;
  }
#second-section {
    background-image: url('../images/intro-bg-4.webp');
    background-size: cover;      /* or 'contain', '100%', etc. */
    background-repeat: no-repeat;
    background-position: center;
    width: 100%;
    height: auto;               
  }
 
  #f-card-module {
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 0;
  }
}

/* ===================================
   DARK MODE OVERRIDES - FLIP CARDS
=================================== */
@media (prefers-color-scheme: dark) {

    /* Keep card backgrounds light */
    #third-section .grid-col {
        background-color: hsl(0, 0%, 96%) !important;
    }

    .flip-front,
    .flip-info-face,
    .flip-cert-face {
        background-color: hsl(0, 0%, 96%) !important;
    }

    /* Keep all text dark */
    #third-section .grid-col h3,
    #third-section .grid-col p,
    .flip-info-heading,
    .flip-info-list li,
    .flip-contact-link,
    .flip-btn {
        color: hsl(0, 0%, 10%) !important;
    }
}

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


