* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  text-transform: uppercase;
}

h2 {
  font-size: 2rem;
  text-transform: uppercase;
  color: #1a1a1a;
}

h3 {
  font-size: 1.5rem;
  color: #1a1a1a;
}

p {
  margin-bottom: 1rem;
}

ul {
  margin-bottom: 1rem;
}

a, a:visited {
  color: blue;
}

header {
  background-color: #1a1a1a;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5rem;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 0;
}

nav li, nav li a, nav li a:visited {
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.3s ease;
  letter-spacing: 0.5px;
}

nav li.call a, nav li.call a:visited {
  color: #ff8c00;
}
nav li.call a:hover {
  color: #ffffff;
}

#top-logo {
  top: 5px;
  left: 1rem;
  position: absolute;
  height: 5rem;
  width: auto;
}
nav li a:hover {
  color: #00bcd4;
}

/* Hero Section - Default compact layout for all pages */
#page-top {
  background: linear-gradient(rgba(26, 26, 26, 0.7), rgba(26, 26, 26, 0.7)), url('../images/muicelas-roofing-on-the-roof.jpg');
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  color: #fff;
  padding: 2.5rem max(2rem, calc((100% - 1200px) / 2));
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 1rem 2rem;
}

#page-top img {
  max-width: 120px;
  height: auto;
  position: relative;
  z-index: 1;
  grid-row: 1 / 3;
  grid-column: 1;
}

#page-top h1 {
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  margin-bottom: 0;
  font-size: 1.6rem;
  text-align: left;
  grid-row: 1;
  grid-column: 2;
}

#page-top h3 {
  position: relative;
  z-index: 1;
  color: #00bcd4;
  font-weight: 400;
  font-size: 0.95rem;
  text-transform: none;
  text-align: left;
  margin-bottom: 0;
  grid-row: 2;
  grid-column: 2;
}

/* Full hero layout for home page only */
body.home #page-top {
  padding: 6rem max(2rem, calc((100% - 1200px) / 2));
  text-align: center;
  display: block;
}

body.home #page-top img {
  max-width: 300px;
  margin: 0 auto 2rem;
  display: block;
}

body.home #page-top h1 {
  max-width: 1000px;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
  text-align: center;
}

body.home #page-top h3 {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.3rem;
  text-align: center;
}

/* Main Article Section */
#main-article {
  background-color: #f7f9fb;
  padding: 4rem 2rem;
}

#main-article h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #1a1a1a;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

#main-article ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  list-style: none;
  margin: 3rem auto;
  max-width: 1000px;
}

#main-article li {
  background-color: #fff;
  padding: 1.5rem;
  border-left: 4px solid #00bcd4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  font-weight: 600;
  color: #1a1a1a;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

#main-article li:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,188,212,0.2);
}

#main-article li .icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

#main-article p {
  text-align: center;
  font-size: 1.1rem;
  color: #555;
  max-width: 900px;
  margin: 2rem auto;
}

/* Services Section */
#services {
  padding: 4rem 2rem;
  background: url('../images/bright-orange-roof-of-metal-roofing-against-blue-sky.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

#services h2 {
  text-align: center;
  margin-bottom: 3rem;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  padding: 1rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.services-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
}

.service-area {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(5px);
  padding: 2rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border-top: 4px solid #ff8c00;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.service-area:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  background-color: rgba(255, 255, 255, 0.95);
}

.service-area h3 {
  color: #333;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.service-area p {
  color: #555;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.service-area ul {
  list-style: none;
  margin: 1rem 0;
}

.service-area li {
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: #333;
  font-size: 0.9rem;
}

.service-area li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #333;
  font-weight: bold;
  font-size: 1.1rem;
}

/* Insurance Section */
#insurance {
  background-color: #f7f9fb;
  padding: 4rem 2rem;
}

#insurance h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #1a1a1a;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

#insurance > p {
  color: #555;
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 1.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

#insurance ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 3rem auto;
}

#insurance li {
  background-color: #fff;
  padding: 1.5rem;
  border-left: 4px solid #00bcd4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  font-weight: 600;
  color: #1a1a1a;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  flex: 0 1 calc(33.333% - 1rem);
  min-width: 280px;
}

#insurance li:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,188,212,0.2);
}

#insurance li .icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

/* Service Areas Section */
#service-areas {
  padding: 4rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
}

#service-areas h2 {
  margin-bottom: 2rem;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

#service-areas > p {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

#service-areas ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  list-style: none;
  max-width: 900px;
  margin: 2rem auto;
}

#service-areas li {
  background-color: #fff;
  color: #333;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #ff8c00;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#service-areas li:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}




article.resources-article .wrapper {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
  
article.resources-article li {
  margin-left: 20px;
}
  
  
/* Footer */
footer {
  background-color: #1a1a1a;
  color: #fff;
  padding: 3rem 2rem;
  text-align: center;
  font-size: 0.8rem;
}

footer a, footer a:visited {
  color: #fff;
  text-decoration: none;
}
footer a:hover {
  color: #00bcd4;
}

/* Tablet and smaller desktop - 2x2 grid */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    gap: 1rem;
  }

  /* Compact layout adjustments */
  #page-top {
    padding: 2rem 1.5rem;
    gap: 0.75rem 1.5rem;
  }

  #page-top img {
    max-width: 100px;
  }

  #page-top h1 {
    font-size: 1.3rem;
  }

  #page-top h3 {
    font-size: 0.85rem;
  }

  /* Home page hero adjustments */
  body.home #page-top {
    padding: 4rem 1.5rem;
  }

  body.home #page-top img {
    max-width: 200px;
  }

  body.home #page-top h1 {
    font-size: 1.8rem;
  }

  body.home #page-top h3 {
    font-size: 1.1rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  #main-article ul {
    grid-template-columns: repeat(2, 1fr);
  }

  #main-article li .icon,
  #insurance li .icon {
    width: 56px;
    height: 56px;
  }

  #insurance li {
    flex: 0 1 calc(50% - 1rem);
  }

  /* Mobile - single column */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .service-area {
    padding: 1.5rem;
  }

  #service-areas ul {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  /* Compact layout - even smaller on very small screens */
  #page-top {
    padding: 1.5rem 1rem;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    text-align: center;
  }

  #page-top img {
    max-width: 80px;
    grid-row: 1;
    grid-column: 1;
    margin: 0 auto;
  }

  #page-top h1 {
    font-size: 1.1rem;
    text-align: center;
    grid-row: 2;
    grid-column: 1;
  }

  #page-top h3 {
    font-size: 0.8rem;
    text-align: center;
    grid-row: 3;
    grid-column: 1;
  }

  /* Home page hero - stack vertically but larger */
  body.home #page-top {
    padding: 3rem 1rem;
    grid-template-columns: 1fr;
  }

  body.home #page-top img {
    max-width: 150px;
    margin: 0 auto;
  }

  body.home #page-top h1 {
    font-size: 1.5rem;
    text-align: center;
  }

  body.home #page-top h3 {
    text-align: center;
  }

  nav li {
    font-size: 0.85rem;
  }

  #main-article ul {
    grid-template-columns: 1fr;
  }

  #insurance li {
    flex: 0 1 100%;
  }
}
