/*
Theme Name: Aperit FM
Theme URI: https://aperitfm.co.ke
Author: Your Name
Author URI: https://yourwebsite.com
Description: Custom WordPress theme for Aperit FM Radio
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: aperitfm-wp
*/

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
  background-color: #e0e0e0; /* Background for the empty space */
  display: flex;
  flex-direction: column;
  margin: 0;
}

main {
  flex: 1; /* Makes the content grow and push the footer to the bottom */
}

.live-audio{
  display: flex;
  flex-wrap:wrap;
  background:#fff;
  border-radius: 10px;
  padding: clamp(10px, 3vw, 20px);
  margin-bottom: clamp(15px, 3vw, 25px);
  align-items: center;
  gap: clamp(2px, 1vw, 8px);
  column-gap: clamp(2px, 1.5vw, 2px); /* controls horizontal space */

}

.dj-image{
  width: clamp(80px, 15vw, 180px); /* scales with viewport */
  height: auto;
  border-radius: 10px;
  margin-right: clamp(10px, 3vw, 20px);
  flex-shrink:0;
}

.audio-info{
  flex: 1;
  display: flex;
  justify-content: space-between; /* controls on right on desktop */
  align-items: center;
  flex-wrap: wrap; /* ensures flexibility */
  margin: 0 auto;
  padding-left: clamp(10px, 5vw, 30px);
  padding-right: clamp(10px, 5vw, 30px);
  box-sizing: border-box;
}

.audio-info h2 {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
}

.audio-controls{
  display: flex;
  align-items: center;
  margin-top: 0;
  gap: 10px; /* space between button & slider */
}

.play-button{
  background: red;
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  color: #fff;
  border: none;
  padding: clamp(6px, 1vw, 10px) clamp(12px, 2vw, 20px);
  margin-right: clamp(6px, 2vw, 12px);
  cursor: pointer;
  border-radius: clamp(3px, 1vw, 5px);

}

#volumeSlider{
  width: clamp(80px, 20vw, 200px); 
}

.audio-titles {
  display: flex;
  flex-direction: column;
  row-gap: clamp(3px, 1.5vw, 5px); 
}


.sub-heading {
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  color: red;
  font-weight: bold;   
  font-style: italic;
  
  
}

/* News Cards */
.articles .line {
  width: 100%;
  box-sizing: border-box;
  width: 100%;
  height: 3px;
  background-color: red;
  margin: clamp(5px, 1vw, 10px) 0 clamp(15px, 2vw, 25px);
  border-radius: 2px;
 
}

.articles h4 {
  font-size: clamp(1rem, 2.5vw, 1.2rem); /* scales between 1rem and 2rem */
  margin-bottom: 0; /* or any desired spacing */
}

.cards-container{
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  border-radius: 10px;
  
}

.cards {
  border-radius: 10px;
  gap: clamp(10px, 3vw, 20px);
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(220px, 40vw, 400px), 1fr));
  grid-auto-rows: auto; /* automatic row height */
  gap: clamp(10px, 2vw, 20px);
  width:100%;
  

}

.card{
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: #000;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover{
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: clamp(120px, 20vw, 250px); /* scales with viewport width */
  object-fit:cover;
}

.category{
  background: red;
  color: #fff;
  font-size: clamp(0.6rem, 1vw, 0.9rem);
  display: inline-block;
  padding: clamp(2px, 0.5vw, 4px) clamp(6px, 1.5vw, 10px);
  margin: clamp(6px, 2vw, 12px);
  border-radius: 3px;
  font-weight: bold;

}


.category.news {
  background: #8F1A01;
}

.category.business {
  background: #111;
}

.category.entertainment {
  background: #8F1A01;
}

.category.sports {
  background: #111;
  
}

.category.programs {
  background: #111;
}

.card h4 {
  font-size: clamp(0.9rem, 2vw, 1.2rem); /* scales with screen */
  margin: clamp(6px, 1vw, 12px);
}

.date {
  font-size: clamp(0.7rem, 1vw, 0.9rem); /* scales too */
  color: gray;
  display: inline-block;
  padding: clamp(2px, 0.5vw, 4px) clamp(6px, 1vw, 10px);
  margin: clamp(6px, 1vw, 12px);
}

/* Hide hamburger by default */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: clamp(1.5rem, 10vw, 3rem);
  color: white;
  cursor: pointer;
}

.hamburger:hover {
  color: red;
}

/* Centered container: dynamically adjusts width */
.container {
  width: 100%;
  margin: 0 auto;
}

.navbar {
  width: clamp(70%, 70vw, 95%);
  display: flex;
  overflow-x: auto; /* handles overflow if nav items are too many */
  flex-grow: 1; /* allow navbar to stretch */
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  background-color: #111;
  color: #fff;
  margin: 0 auto;
  padding-left: clamp(10px, 5vw, 30px);
  padding-right: clamp(10px, 5vw, 30px);
  box-sizing: border-box;
  height: clamp(60px, 10vw, 70px);
  overflow: visible;
  position: relative;
}

.logo {
  height: 100%;
  display: flex;
  align-items: center;
}

.logo img {
  width: auto;
  height: clamp(60px, 12vw, 100px);
  margin-top: clamp(-10px, -2vw, -20px); 
}

.nav-wrapper {
  flex: 1;
  display: flex;
  justify-content: flex-end; /* Align nav-links to the right */
  overflow: hidden;
  
  
}

/* Desktop Nav */
.nav-links {
  display: flex;
  gap: clamp(10px, 2vw, 25px);
  transition: all 0.3s ease-in-out;
  overflow: hidden;
  
  
}

.nav-links a {
  flex: 1 1 auto;
  min-width: fit-content;
  color: #fff;
  text-decoration: none;
  margin-left: clamp(10px, 2vw, 20px);
  font-size: clamp(0.8rem, 1.5vw, 1.2rem);
  overflow: hidden;
  
}

.nav-links a:hover {
  text-decoration: underline;
}

.nav-links a:last-child {
  margin-right: clamp(10px, 2vw, 20px); 
}

/* Search Box inside navbar */
.search-box {
  position: relative;
  display: inline-block;
  margin-left: clamp(10px, 2vw, 20px);   /* keeps left gap fluid */
  margin-right: clamp(8px, 2vw, 24px);   /* 👈 responsive right gap before hamburger */
  flex-shrink: 0;                        /* prevent it from collapsing */
}

.search-box input {
  padding: clamp(4px, 0.8vw, 6px) clamp(8px, 1.5vw, 12px);
  border-radius: 4px;
  border: 1px solid #ccc;
  outline: none;
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  width: clamp(120px, 20vw, 220px);      /* 👈 width scales with screen */
}

/* Search results dropdown */
.search-results {
  position: absolute;
  display: none;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  max-height: clamp(150px, 40vh, 250px); /* dynamic max height */
  overflow-y: auto;
  overflow-x: auto;
  white-space: nowrap;
  z-index: 1000;
}

.search-results .result-item {
  display: block;
  padding: clamp(6px, 1.2vw, 10px) clamp(10px, 2vw, 14px);
  border-bottom: 1px solid #eee;
  font-size: clamp(0.85rem, 1.6vw, 1rem);
}

.search-results .result-item:last-child {
  border-bottom: none;
}

.search-results .result-item a {
  text-decoration: none;
  color: #111;
  display: block;
}

.search-results .result-item:hover {
  background: #f0f0f0;
}



.background {
  width: clamp(70%, 70vw, 95%);
  min-height: calc(100vh - clamp(60px, 10vw, 70px)); /* dynamic header height */
  background-color: #f4f4f4;
  padding: clamp(10px, 3vw, 30px);
  margin: 0 auto;
  box-sizing: border-box;
}

.card-title {
  font-size: clamp(0.9rem, 2.5vw, 1.3rem);
  font-weight: normal;
  display: inline-block;
  padding: clamp(2px, 0.5vw, 4px) clamp(6px, 1vw, 10px);
  margin: clamp(6px, 1vw, 12px);
}

.footer {
  background-color: #111;
  color: #fff;
  text-align: center;
  padding: clamp(10px, 3vw, 20px) 0;
  width: 100%; /*clamp(90%, 70%, 70%);*/ /* auto-scales between 90% and 70% */
  margin: 0 auto;
  transition: width 0.3s ease;
  font-size: clamp(0.8rem, 2vw, 1rem); /* dynamic text sizing */
  box-sizing: border-box;
  gap: clamp(50px, 5vw, 80px); 
  flex-wrap: wrap;
  margin-top: clamp(40px, 5vw, 80px);
}

.footer-inner {
  display: flex;
  gap: clamp(150px, 80vw, 200px); 
  flex-wrap: wrap; /* stack on smaller screens */
  justify-content: center;
}

.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* aligns content to left */
  text-align: left; /* ensures text inside is left-aligned */
}

.footer-column h4 {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem); /* slightly larger font */
  font-weight: 700; /* bold */
  margin-bottom: clamp(10px, 1.5vw, 14px); /* a little more spacing */
  color: #fff;
  
}

.footer-column p,
.footer-column li {
  margin-bottom: clamp(6px, 1vw, 10px);
}

.footer-column a {
  color: #fff;
  text-decoration: none;
}

.footer-column a:hover {
  text-decoration: underline;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}


.contact-info .contact-grid {
  display: flex;
  gap: clamp(30px, 4vw, 50px); /* space between two sub-columns */
  flex-wrap: wrap; /* stack on smaller screens */
}

.contact-info .contact-subcolumn {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vw, 10px);
}

/* Keep About Us left-aligned, Contact Info left-aligned */
.footer-column.about-us {
  align-items: flex-start;
}
.footer-column.contact-info {
  align-items: flex-start;
}


.social-icons {
  margin-bottom: clamp(10px, 2vw, 20px);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 20px);
}

.social-icons a {
  color: #ccc;
  font-size: clamp(1rem, 2.5vw, 1.5rem); /* Responsive sizing */
  text-decoration: none;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: #fff;
}


/* Hero Section for Advertise With Us Form*/
.hero-section_contact {
  min-height: 90vh;               /* take most of viewport */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #f5f5f5;            /* light background */
  text-align: center;
}
.hero-section_contact h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #222;
}

/* Contact Form Section */
.contact-form-section {
  width: 70%;
  max-width: 800px;
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);

  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contact-form-section h2 {
  margin-bottom: 1rem;
}

/* Inputs full width */
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}
.contact-form input[type="submit"] {
  background: #0077cc;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 1rem;
  padding: 12px;
}
.contact-form input[type="submit"]:hover {
  background: #005fa3;
}

.live-stream-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 30px auto;
  position: relative;
  text-align: center;
}

.live-badge {
  position: absolute;
  top: 10px;
  left: 15px;
  background-color: red;
  color: white;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  z-index: 10;
}

.no-stream-box {
  text-align: center;
  padding: 20px;
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 5px; 
}


/* Responsive */
@media (max-width: 1200px) {

  .container {
    width: 100%;
  }

  .background {
    width: clamp(90%, 90vw, 95%);
  }

  .cards {
    grid-template-columns: 1fr; /* Stack one column at a time on smaller screens */
  }

  .card img {
    height: clamp(100px, 25vw, 180px);
  }

  .live-audio{
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .dj-image{
    margin-right:0;
    margin-bottom: 15px;
    width: 100px;
  }

  .audio-info {
    flex-direction: column; /* stack titles and controls */
    align-items: center;
  }

  .audio-controls {
    margin-top: 15px;
    justify-content: center;
    flex-direction: row; /* still row, but below titles */
  }

  #volumeSlider {
    width: 100%;
    max-width: 250px;
  }

  .nav-links {
    display: none; /* Hide nav links initially */
    flex-direction: column;
    background-color: #111;
    position: absolute;
    top: clamp(60px, 10vw, 80px);
    left: 0;
    right: 0;
    padding: clamp(8px, 2vw, 16px);
    width: 100%;
    height: 50vh;
    overflow-y: auto; 
    
  }

  .nav-links.active {
    display: flex; /* Show nav when active */
  }

  .hamburger {
    display: block; /* Show hamburger on small screens */
  }

  .navbar {
    width: clamp(90%, 90vw, 95%);
    position: relative;
  }


  .footer-inner {
    flex-direction: column;
    align-items: center; /* center all footer columns */
    gap: clamp(15px, 3vw, 30px);
  }

  /* About Us: center content */
  .footer-column.about-us {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  /* Contact Info: stack sub-columns and center everything */
  .footer-column.contact-info {
    width: 100%; /* full width */
    align-items: center;
    text-align: center;
  }

  .contact-info .contact-grid {
    flex-direction: column; /* stack sub-columns */
    gap: clamp(15px, 3vw, 25px); /* spacing between sub-columns */
    align-items: center; /* center sub-columns horizontally */
  }

  .contact-info .contact-subcolumn {
    width: 100%; /* full width for each sub-column */
    flex: none;  /* prevent flex sizing from messing layout */
    align-items: center; /* center the content */
  }

  /* Center the CONTACT INFO title above sub-columns */
  .footer-column.contact-info h4 {
    text-align: center;
    width: 100%;
    margin-bottom: clamp(15px, 3vw, 20px);
  }

  /* Social icons: center below everything */
  .social-icons {
    justify-content: center;
    gap: clamp(10px, 2vw, 20px);
    margin-top: clamp(15px, 3vw, 25px);
  }

  
}

/* Responsive Design for Advertise With Us form */

/* Tablets */
@media (max-width: 1024px) {
  .contact-form-section {
    width: 85%;
    padding: 1.5rem;
  }
  .hero-section_contact h1 {
    font-size: 2rem;
  }
}

/* Mobile Phones */
@media (max-width: 600px) {
  .contact-form-section {
    width: 95%;
    padding: 1rem;
  }
  .hero-section_contact h1 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
  }
  .contact-form input,
  .contact-form textarea {
    font-size: 0.9rem;
    padding: 10px;
  }
  .contact-form input[type="submit"] {
    font-size: 0.95rem;
    padding: 10px;
  }
}
