/* Global Styles */
html,
body {
  overflow-x: hidden;
  width: 100%;
}

:root {
  --primary-color: #b22222; /* Firebrick Red */
  --secondary-color: #ffffff;
  --text-color: #333333;
  --light-bg: #f5f5f5;
  --dark-footer: #111111;
  --transition: all 0.3s ease;
}

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

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  overflow-x: hidden; /* Prevent horizontal scroll from off-canvas menu */
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

img,
iframe {
  max-width: 100%;
  height: auto;
}

/* Header */
header {
  background-color: var(--secondary-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  height: 95px;
  width: auto;
}

.college-name h1 {
  font-size: 1.2rem;
  color: var(--primary-color);
  font-weight: 700;
  margin: 0;
}

nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links li a {
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition);
  position: relative;
  color: #333;
}

.nav-links li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-links li a:hover::after {
  width: 100%;
}

.nav-links li a:hover {
  color: var(--primary-color);
}

/* Mobile Nav */
.burger {
  display: none;
  cursor: pointer;
}

.burger div {
  width: 25px;
  height: 3px;
  background-color: #333;
  margin: 5px;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  height: 80vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: black;
  overflow: hidden;
  width: 100%;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("bg.jpeg") no-repeat center center/cover;
  filter: blur(2px);
  z-index: 0;
  transform: scale(1.1); /* Prevent blurred edges */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  padding: 0 20px;
  transform: translateY(-50px);
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: #000000;
  color: #f5f5f5;
  font-weight: 600;
  border-radius: 5px;
  transition: var(--transition);
}
/* .btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: white;
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 5px;
    transition: var(--transition);
    border: 2px solid white;
} */

.btn:hover {
  background-color: grey;
  color: white;
}

.btn-white {
  background-color: var(--primary-color);
  color: white;
  border: none;
}

.btn-white:hover {
  background-color: #8b1a1a;
}

/* Sections */
.section-padding {
  padding: 80px 0;
}

.bg-light {
  background-color: var(--light-bg);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

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

.line {
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  margin: 0 auto;
  border-radius: 2px;
}

/* Vision Mission */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.card {
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  text-align: left;
  transition: var(--transition);
  border-top: 5px solid var(--primary-color);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.card h3 {
  margin-bottom: 15px;
  font-size: 1.5rem;
}

/* Founder */
.founder-content {
  display: flex;
  align-items: center;
  gap: 50px;
  flex-wrap: wrap;
  width: 100%;
}

.founder-image {
  flex: 1;
  min-width: 250px;
}

.img-placeholder {
  width: 100%;
  height: 350px;
  background-color: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #999;
  font-size: 5rem;
  border: 10px solid white;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.founder-text {
  flex: 1;
  min-width: 250px;
}

.founder-text h3 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #333;
}

.founder-text p {
  margin-bottom: 20px;
  color: #555;
}

/* Courses */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.course-card {
  background: var(--light-bg);
  padding: 30px;
  border-radius: 8px;
  transition: var(--transition);
  border-left: 4px solid var(--primary-color);
}

.course-card:hover {
  background: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.course-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.course-card h3 {
  margin-bottom: 10px;
}

/* Contact */
#contact.section-padding {
  padding: 40px 0;
}

.bg-dark {
  background-color: #222;
}

.text-white {
  color: white;
}

.contact-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info {
  flex: 1;
  min-width: 280px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}

.info-item i {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.contact-form {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 5px;
  font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Footer */
footer {
  background-color: var(--dark-footer);
  color: rgba(255, 255, 255, 0.7);
  padding: 30px 0;
  text-align: center;
}

footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

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

.social-links a {
  color: white;
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--primary-color);
}

/* Media Queries */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    right: 0;
    height: 92vh;
    top: 100%; /* Position directly below the header */
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100vw;
    transform: translateX(100%);
    transition: transform 0.5s ease-in;
    padding-top: 50px;
    box-shadow: -2px 5px 10px rgba(0, 0, 0, 0.1);
  }

  .nav-links.nav-active {
    transform: translateX(0%);
  }

  .burger {
    display: block;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .header-content {
    padding: 15px 20px;
  }

  .logo {
    height: 65px;
  }

  .college-name h1 {
    font-size: 1rem;
    white-space: normal;
  }

  .section-padding {
    padding: 40px 0;
  }

  .card {
    padding: 20px;
  }

  .founder-content {
    gap: 20px;
  }

  .founder-image,
  .founder-text {
    min-width: 100% !important;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  /* Vision and Mission */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .card {
    padding: 24px;
  }

  .card h3 {
    font-size: 1.25rem;
  }

  /* Our Courses and Our Facilities */
  #courses .grid-3,
  #facilities .grid-3 {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .course-card,
  .facility-content {
    padding: 20px;
  }

  .facility-img {
    height: 190px;
  }

  /* Contact */
  .contact-wrapper {
    flex-direction: column;
    gap: 20px;
  }

  .info-item {
    align-items: flex-start;
    gap: 12px;
  }

  .info-item i {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    flex-shrink: 0;
  }

  .contact-info,
  .contact-form {
    min-width: 100%;
  }

  .contact-info p,
  .contact-form input,
  .contact-form textarea {
    word-break: break-word;
  }

  .contact-form textarea {
    min-height: 120px;
  }

  .contact-form .btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section-header h2 {
    font-size: 1.8rem;
  }

  .card,
  .course-card,
  .facility-content {
    padding: 16px;
  }

  .facility-img {
    height: 170px;
  }

  #contact.section-padding {
    padding: 30px 0;
  }

  .info-item {
    margin-bottom: 18px;
  }
}

/* Gallery Styles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-item {
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  height: 250px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* Facilities Styles */
.facility-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  height: 100%;
}

.facility-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.facility-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.facility-content {
  padding: 20px;
}

.facility-content h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.facility-content p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 10px;
}

.facility-content ul {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 10px;
  color: #555;
  font-size: 0.9rem;
}

/* See More Button */
.see-more-container {
  text-align: center;
  margin-top: 40px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #8b1a1a;
}

/* Placement Form Styles */
.form-container {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  border-top: 5px solid var(--primary-color);
}

.placement-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.form-group label {
  font-weight: 500;
  color: #333;
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(178, 34, 34, 0.1);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-container {
    padding: 20px;
  }
}

/* Map Section */
#map.section-padding {
  padding-top: 40px;
}

.map-container {
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
  width: 100%;
  height: 400px;
  display: block;
}

@media (max-width: 768px) {
  .map-container iframe {
    height: 300px;
  }
}
