/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --primary: #ff0000;
  --secondary: #e53e3e;
  --accent: #38b2ac;
  --light: #f7fafc;
  --dark: #272c35;
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--light);
}

/* Layout helpers to make footer behave correctly on short pages */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 15px;
}

.section-title p {
  font-size: 1.1rem;
  color: var(--dark);
  max-width: 1200px;
  margin: 0 auto;
}

.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--secondary);
  margin: 15px auto 0;
  border-radius: 2px;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(135deg, #ffd200, #fe0b00);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  box-shadow: 0 2px 10px #ffd00054;
}

.btn:hover {
  background: #fe0b00;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(193, 40, 40, 0.1);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* Header Styles - FIXED */
header {
  background: linear-gradient(135deg, #ffd200, #fe0b00);
  color: white;
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container.container {
  max-width: 100% !important;
  width: 100% !important;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 20px;
  gap: 15px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  color: white;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

.logo img {
  height: 3rem;
  width: 3rem;
  margin-right: 8px;
}

/* Search Bar - FIXED */
.search-container {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0 50px;
}

.search-form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 25px;
  padding: 4px;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 180px;
}

.search-form:focus-within {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: white;
  padding: 6px 12px;
  font-size: 0.85rem;
  width: 120px;
  border-radius: 20px;
  flex: 1;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-btn {
  background: transparent;
  border: none;
  color: white;
  padding: 6px 10px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Navigation - FIXED */
.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 12px;
  justify-content: flex-end;
  flex: 1;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  padding: 6px 10px;
  white-space: nowrap;
  display: block;
  font-size: 1rem;
}

.nav-links a:hover {
  color: rgb(0, 0, 255);
}

.nav-links a.active {
  color: rgb(0, 0, 255);
  border-bottom: 2px solid rgb(0, 0, 255);
}

.mobile-menu {
  display: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: white;
  margin: 0;
  flex-shrink: 0;
}
/* Footer */
footer {
  background: var(--dark  );
  color: white;
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--primary);
}

.footer-column p,
.footer-column a {
  color: #ccc;
  margin-bottom: 10px;
  display: block;
  text-decoration: none;
  transition: var(--transition);
}

.footer-column a:hover {
  color: white;
  padding-left: 5px;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-5px);
}

#newsletter-form {
  padding: 10px;
  width: 100%;
  margin-bottom: 10px;
  border: none;
  border-radius: 5px;
}
.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: #999;
}

/* Responsive Styles*/
/* Improved Responsive Styles */
@media (max-width: 1200px) {
  .nav-links {
    gap: 10px;
  }
  
  .nav-links a {
    padding: 6px 8px;
    font-size: 0.9rem;
  }
  
  .search-input {
    width: 120px;
  }
}

@media (max-width: 992px) {
  .header-container {
    padding: 0 15px;
    gap: 10px;
  }
  
  .logo {
    font-size: 1.3rem;
  }
  
  .logo img {
    height: 2.5rem;
    width: 2.5rem;
  }
  
  .search-container {
    margin: 0 20px;
  }
  
  .search-form {
    min-width: 160px;
  }
  
  .search-input {
    width: 100px;
    font-size: 0.85rem;
  }
  
  .nav-links a {
    font-size: 0.85rem;
    padding: 5px 8px;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
}

/* Tablet and Mobile Fixes */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    flex-wrap: nowrap;
    gap: 15px;
  }
  
  .logo {
    font-size: 1.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
  }
  
  .logo img {
    height: 2rem;
    width: 2rem;
    margin-right: 5px;
  }
  
  .nav-links {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #ffd200, #fe0b00);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    gap: 0;
    z-index: 1001;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-links li {
    width: 100%;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .nav-links li:last-child {
    border-bottom: none;
  }
  
  .nav-links a {
    font-size: 1.1rem;
    padding: 15px 20px;
    text-align: left;
    width: 100%;
    display: block;
  }
  
  .mobile-menu {
    display: block;
    font-size: 1.5rem;
    padding: 5px;
  }
  
  .hero {
    margin-top: 70px;
    height: 60vh;
    min-height: 400px;
  }
  
  .hero h1 {
    font-size: 2rem;
    margin-bottom: 15px;
  }
  
  .hero p {
    font-size: 1rem;
    margin-bottom: 20px;
  }
  
  .hero-btns {
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    align-items: center;
  }
  
  .btn {
    padding: 12px 25px;
    font-size: 0.95rem;
    width: 200px;
    text-align: center;
  }
}

/* PDF Gallery Section */
.pdf-gallery-section {
    padding: 80px 0 40px;
    background: #f8f9fa;
    margin-top: 80px; /* Added margin to account for fixed navbar */
}

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

.section-title {
    text-align: center;
    color: #ff0000;
    margin-bottom: 40px;
    font-size: clamp(1.8rem, 4vw, 2.5rem); /* Responsive font size */
    font-weight: 700;
    line-height: 1.2;
    padding: 0 15px;
}

.pdf-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* PDF Card Styles */
.pdf-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
}

.pdf-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255, 0, 0, 0.15);
    border-color: #ff0000;
}

.pdf-icon {
    background: linear-gradient(135deg, #ff0000, #e60000);
    color: white;
    padding: 25px;
    text-align: center;
    font-size: 3rem;
}

.pdf-content {
    padding: 20px;
}

.pdf-title {
    color: #333;
    font-size: clamp(1rem, 2vw, 1.2rem); /* Responsive font size */
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
    min-height: 2.8em; /* Ensures consistent height */
}

.pdf-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

.pdf-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdf-meta i {
    color: #ff0000;
    width: 16px;
}

.download-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #ff0000;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.3s ease;
}

.download-btn:hover {
    background: #e60000;
}

.download-btn i {
    margin-right: 8px;
}

/* PDF Embed Section */
.pdf-embed {
    padding: 40px 0;
    background: white;
    text-align: center;
}

.pdf-embed embed {
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

/* Responsive Design */
@media (max-width: 992px) {
    .pdf-gallery-section {
        margin-top: 70px; /* Adjust for smaller navbar */
        padding: 60px 0 30px;
    }
    
    .pdf-gallery {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
    
    .pdf-embed embed {
        width: 90%;
        height: 600px;
    }
}

@media (max-width: 768px) {
    .pdf-gallery-section {
        margin-top: 60px;
        padding: 50px 0 25px;
    }
    
    .section-title {
        margin-bottom: 30px;
        padding: 0 10px;
    }
    
    .pdf-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .pdf-embed embed {
        width: 95%;
        height: 500px;
    }
    
    .pdf-content {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .pdf-gallery-section {
        margin-top: 50px;
        padding: 40px 0 20px;
    }
    
    .container {
        padding: 0 15px;
        width: 100%;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    
    .pdf-gallery {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .pdf-icon {
        padding: 20px;
        font-size: 2.5rem;
    }
    
    .pdf-embed embed {
        height: 400px;
    }
    
    .pdf-title {
        min-height: auto; /* Remove fixed height on mobile */
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    .pdf-gallery-section {
        margin-top: 45px;
        padding: 30px 0 15px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .pdf-embed embed {
        height: 350px;
    }
}

/* Landscape mode for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .pdf-gallery-section {
        margin-top: 50px;
        padding: 30px 0 20px;
    }
    
    .pdf-embed embed {
        height: 300px;
    }
}

/* Fix for devices with notches (iPhone X, etc.) */
@supports (padding: max(0px)) {
    .pdf-gallery-section {
        padding-top: max(80px, env(safe-area-inset-top));
        margin-top: max(80px, env(safe-area-inset-top));
    }
}