html {
    font-family: 'Inter';
}

html, body {
    height: 100%;
}


main{
    padding-left: 2%;
    padding-right: 2%;
    flex: 1;
}

.maincover{
    display: flex;
    align-items: center;
    gap: 2rem;
}

#welcometext {
    flex: 1 1 28rem;
    min-width: 0;
}

aside {
    flex: 0 1 24rem;
}

figure {
    margin: 0;
}

.hero-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
}
.hamburger { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #000; padding: 0.25rem 0.5rem; border-radius: 6px; }



@media (max-width: 800px) {
    .maincover { flex-direction: column; align-items: stretch; }
    aside { flex-basis: auto; }
    #map { flex-basis: auto; }
    .flexby2{ flex-direction: column; align-items: stretch; }
    header { flex-direction: column; align-items: flex-start; padding-left: 1%; padding-right: 1%; margin-bottom: 1%; position: sticky; }
    #textlogo { font-size: 110%; margin-bottom: 0.5rem; text-align: center; width: 100%; }

    /* center the hamburger in the header */
    .hamburger{ display: block; position: absolute; left: 1.5rem; top: 50%; transform: translate(-50%, -50%); color: #000; background: #f8f8f8; border: 1px solid #ddd; z-index: 1101; }

    /* hide nav by default on mobile; only show when .open present */
    header nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; flex-direction: column; background: white; border-top: 1px solid #000; gap: 0; z-index: 1000; }
    header nav.open { display: flex; }
    header nav a { padding: 1rem; border-bottom: 1px solid #eee; text-align: center; }
}

@media (max-width: 520px) {
    header {
        padding-top: 0.75%;
        padding-bottom: 0.75%;
    }
    
    #textlogo {
        font-size: 100%;
    }
    
    nav {
        flex-direction: column;
        width: 100%;
        gap: 0.25rem;
    }
    
    nav a {
        padding: 0.5rem 0;
        font-size: 85%;
        flex: auto;
    }
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
}

#textlogo{
    font-weight: bold;
    color: white;
    font-size: 130%;
    flex: 1;
}

header {
    color: white;
    display: flex;
    align-items: center;
    padding-top: 1%;
    padding-bottom: 1%;
    font-family: 'Lora';
    padding-left: 2%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: white;
    border-bottom: 1px solid #000;
    margin-bottom: 2%;
}

nav{
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
    font-family: 'Inter';
    padding-right: 2%;
    gap: 1rem;
}

nav a {
    padding-left: 0;
    gap: 1rem;
    white-space: nowrap;
    color: #000;
    text-decoration: none;
}

nav a:visited {
    color: #000;
}

header p {
    margin: 0;
    padding-top: 0.5%;
    padding-bottom: 0.2%;
}

.mainpagemargin {
    margin-top: 2%;
}

  .tile {
    flex: 1;             /* Makes both tiles equal width */
    height: 200px;
    background:  #6e6b6b;
    color: white;
    border: 2px solid red;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
  }

  .tile p{
    margin: 0;
  }

  .tile .serviceTitle {
    font-size: 150%;
    font-weight: bold;
  }

  #services {
    display: flex;       /* Aligns items side-by-side */
    gap: 20px;           /* Adds space between tiles */
  }

  footer {
    padding: 2%;
    background-color: #000000;
    justify-content: space-between;
    color: white;
    display: flex;
    gap: 20px;
    align-items: flex-start;
  }
  
  footer a:link, footer a:visited {
    color: white;
    text-decoration: none;
  }
  
  header a:link, header a:visited {
    text-decoration: none;
    color: black;
    flex: 1;
  }
  
  main {
    margin-bottom: 2%;
  }

  button{
    background-color: black;
    border: none;
    color: white;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 100%;
    font-family: 'Inter';
    border-radius: 8px;
    padding: 1%;
  }

  #cofecmainpglogo {
    width: 40%;
    height: auto;
  }

  .flexby2 {
    display: flex;
  }

  aside #map{
    flex: 1;
  }

  #locationDetails {
    flex: 2;
  }

  .contentTitle{
    font-size: 150%;
    font-weight: bold;
  }

  .gallery{
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 1rem;
    align-items: stretch;
  }

  #userpanel{
    text-align: center;
  }

  .user-row{
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
  }

  #userPhoto {
    width:40px;
    height:40px;
    border-radius:50%;
    object-fit:cover; 
  }

  #newsForm {
  max-width: 720px;
  margin: 0.75rem auto;
  box-sizing: border-box;
}

#newsForm label {
  display: block;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

#newsForm input[type="text"],
#newsForm textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
  background: #fff;
}

#newsForm textarea { min-height: 140px; resize: vertical; }

#newsForm button {
  display: block;
  margin: 0.75rem auto 0;
  padding: 8px 14px;
  border-radius: 8px;
  background: #2b6cb0;
  color: #fff;
  border: none;
  cursor: pointer;
}

@media (max-width: 520px) {
  #newsForm { padding: 0 12px; }
  #newsForm button { width: 100%; }
}

button {
  cursor: pointer;
}

.news-item{
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1rem;
  overflow: hidden;
}

@media (max-width: 1100px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}



/* YouTube placeholder */
#ytContainer{max-width:100%;margin:0 auto;text-align:left;}
#ytContainer iframe{display: block, width:100%;height:315px;max-width:560px;}
@media (max-width:560px){#ytContainer iframe{height:200px}}
