/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #ff4500; /* Safety Orange */
  --primary-hover: #e03e00;
  --dark-bg: #0f0f0f;
  --card-bg: #1a1a1a;
  --text-light: #f4f4f4;
  --text-gray: #a0a0a0;
  --font-heading: "Oswald", sans-serif;
  --font-body: "Roboto", sans-serif;
}

body {
  font-family: var(--font-body);
  background-color: var(--dark-bg);
  color: var(--text-light);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  text-transform: uppercase;
}

.highlight {
  color: red;
}

.text-outline {
  -webkit-text-stroke: 1px #fff;
  color: transparent;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  font-family: var(--font-heading);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
  border: 2px solid var(--primary-color);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--primary-color);
}

.btn-outline {
  background-color: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.btn-outline:hover {
  background-color: #fff;
  color: #000;
}

.btn-small {
  font-size: 0.9rem;
  color: var(--primary-color);
  font-weight: bold;
  border-bottom: 2px solid transparent;
}

.btn-small:hover {
  border-bottom: 2px solid var(--primary-color);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(15, 15, 15, 0.95);
  padding: 20px 0;
  z-index: 1000;
  border-bottom: 1px solid #333;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 16px;
}

.logo {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  color: #fff;
  margin-top: 6px;
  letter-spacing: 1px;
  padding: 0;
  text-transform: none;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  color: #fff;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.btn-nav {
  border: 1px solid var(--primary-color);
  padding: 8px 20px;
  border-radius: 4px;
  color: var(--primary-color) !important;
}

.btn-nav:hover {
  background-color: var(--primary-color);
  color: #fff !important;
}

.hamburger {
  display: none;
  cursor: pointer;
}

/* Hero Section */
.hero {
  height: 100vh;
  background-image: url("images/fondo.jpeg");
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center; /* Center horizontally */
  text-align: center;
  margin-top: 80px; /* Offset for fixed navbar */
}

/* Carousel Styles */
.carousel-container {
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
  border-radius: 8px;
  width: 100%;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.carousel-slide {
  min-width: 100%;
  flex: 0 0 100%;
}

.carousel-slide img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.prev-btn,
.next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 15px;
  cursor: pointer;
  z-index: 10;
  font-size: 1.2rem;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.prev-btn:hover,
.next-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

.course-hero {
  min-height: 60vh;
  height: auto;
  padding-top: 150px;
  padding-bottom: 50px;
  /* background-image: url("images/fondo02a.jpg"); */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(15, 15, 15, 0.7),
    rgba(15, 15, 15, 0.9)
  );
}

.hero-content {
  position: center;
  align-items: center;
  z-index: 1;
  max-width: 1200px;
}

.hero h1 {
  font-size: 4.5rem;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: 2px;
  flex-direction: row;
}
.hero-title {
  color: #d8d6d6;
}

.hero p {
  font-size: 1.2rem;
  color: #ccc;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btns {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* Sections General */
.section {
  padding: 100px 0;
}

.bg-darker {
  background-color: #0a0a0a;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.line {
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  margin: 0 auto;
}

/* About / Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.feature-card {
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s;
  border: 1px solid #333;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
}

.feature-card .icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.feature-card p {
  color: var(--text-gray);
}

/* Courses */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.course-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #333;
  transition: 0.3s;
}

.course-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-color: #444;
}

.course-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: #000;
}
.overview-text {
  text-align: justify;
}
.check-list {
  margin-bottom: 20px;
}

.course-content {
  padding: 30px;
}

.course-content h3 {
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.course-content p {
  color: var(--text-gray);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.course-details {
  margin-bottom: 20px;
  border-top: 1px solid #333;
  border-bottom: 1px solid #333;
  padding: 15px 0;
}

.course-details li {
  color: #ccc;
  font-size: 0.9rem;
  margin-bottom: 5px;
}
.video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(rgba(255, 69, 0, 0.1), rgba(15, 15, 15, 1)),
    url("https://images.unsplash.com/photo-1595590424283-b8f17842773f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 120px 0;
  text-align: center;
}

.cta-section h2 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.cta-section p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
footer {
  background-color: #000;
  padding: 80px 0 20px;
  border-top: 1px solid #333;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 50px;
  margin-bottom: 60px;
}

.footer-col h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.footer-col h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #fff;
}

.footer-col p {
  color: var(--text-gray);
  margin-bottom: 10px;
}

.social-links a {
  display: block;
  color: var(--text-gray);
  margin-bottom: 10px;
}

.social-links a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #222;
  color: #555;
  font-size: 0.9rem;
}

/* --- NEW STYLES FOR COURSE DETAILS PAGE --- */

/* Course Overview */
.course-overview {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 50px;
  align-items: start;
}

.overview-text h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #fff;
}

.overview-text p {
  color: var(--text-gray);
  margin-bottom: 20px;
}

.check-list li {
  margin-bottom: 10px;
  font-size: 1.1rem;
  color: #ddd;
}

.overview-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stat-box {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #333;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary-color);
  font-family: var(--font-heading);
}

.stat-label {
  color: #aaa;
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* Carousel */
.carousel-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 20px;
  padding-bottom: 20px;
  scrollbar-width: none; /* Firefox */
}

.carousel-track::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.carousel-slide {
  flex: 0 0 200px;
  min-width: 0;
  height: 200px;
  scroll-snap-align: center;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #333;
}

.carousel-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.carousel-slide:hover img {
  transform: scale(1.1);
}

.carousel-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.carousel-nav button {
  background-color: var(--card-bg);
  border: 1px solid #333;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: 0.3s;
}

.carousel-nav button:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.testimonial-card {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 8px;
  border: 1px solid #333;
  position: relative;
}

.quote {
  font-size: 4rem;
  color: rgba(255, 69, 0, 0.2);
  position: absolute;
  top: 10px;
  left: 20px;
  font-family: serif;
}

.testimonial-card p {
  color: #ccc;
  font-style: italic;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.author {
  display: flex;
  align-items: center;
  gap: 15px;
}

.avatar {
  width: 50px;
  height: 50px;
  background-color: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.author-info h4 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.author-info span {
  font-size: 0.85rem;
  color: var(--text-gray);
}

/* FAQ */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background-color: var(--card-bg);
  margin-bottom: 15px;
  border-radius: 4px;
  border: 1px solid #333;
  overflow: hidden;
}

.faq-item summary {
  padding: 20px;
  cursor: pointer;
  font-weight: bold;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--primary-color);
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-item p {
  padding: 0 20px 20px;
  color: var(--text-gray);
  border-top: 1px solid #333;
  margin-top: 10px;
  padding-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .container {
    padding: 0 15px;
    width: 100%;
    overflow-x: hidden;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #0f0f0f;
    flex-direction: column;
    padding: 20px;
    text-align: center;
  }

  .nav-links.active {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  .hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
  }

  .hero h1 {
    font-size: 2.5rem; /* Reduced further */
    word-wrap: break-word;
  }

  .hero-btns {
    flex-direction: column;
  }

  .section {
    padding: 50px 0;
  }

  .course-overview {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .overview-text {
    width: 100%;
    word-wrap: break-word; /* Prevent long words from breaking layout */
  }

  .overview-text h3 {
    font-size: 1.4rem;
    word-wrap: break-word;
  }

  .overview-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .stat-box {
    padding: 15px;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  /* Carousel Mobile Fix */
  .carousel-slide {
    flex: 0 0 85%; /* Show part of next slide */
    height: 180px;
  }

  .blog-img-container {
    height: 150px;
  }
}

/* Director Profile Styles */
.director-profile {
  display: flex;
  align-items: center;
  gap: 50px;
  flex-wrap: wrap;
  justify-content: center;
}

.director-image-container {
  flex: 0 0 250px;
  height: 250px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary-color);
  box-shadow: 0 0 20px rgba(255, 69, 0, 0.3);
}

.director-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.director-info {
  flex: 1;
  min-width: 300px;
}

.director-info h3 {
  font-size: 2.5rem;
  margin-bottom: 5px;
  color: #fff;
}

.director-info h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bio-text {
  color: var(--text-gray);
  text-align: justify;
  margin-bottom: 20px;
  font-size: 1.1rem;
  line-height: 1.8;
}

.text-justify {
  text-align: justify;
  max-width: 800px;
  margin: 0 auto 20px;
  font-size: 1.1rem;
  color: #ccc;
}

@media (max-width: 768px) {
  .director-profile {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .director-info {
    min-width: 100%;
  }

  .check-list {
    text-align: left;
    display: inline-block;
  }
}

/* Visitor Counter */
.visit-counter {
  /* Removed border and margin since it's now a column */
  color: var(--text-gray);
  font-size: 1rem;
}

.visit-counter p {
  margin-bottom: 10px;
}

.visit-counter span {
  color: var(--primary-color);
  font-weight: bold;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  display: block; /* Make number stand out on new line or block */
  margin-top: 5px;
}

/* Blog Styles */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.blog-card {
  background-color: var(--card-bg);
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
}

.blog-img-container {
  height: 200px;
  overflow: hidden;
}

.blog-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.blog-card:hover .blog-img-container img {
  transform: scale(1.1);
}

.blog-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-date {
  font-size: 0.8rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  display: block;
}

.blog-content h3 {
  margin-bottom: 10px;
  font-size: 1.4rem;
  color: #fff;
}

.blog-content p {
  color: var(--text-gray);
  font-size: 0.95rem;
  margin-bottom: 15px;
  flex: 1;
}

.btn-text {
  color: var(--primary-color);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9rem;
  align-self: flex-start;
}

.btn-text:hover {
  text-decoration: underline;
}

/* Blog Post Layout */
.blog-post-container {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 40px;
  align-items: start;
}

.blog-sidebar {
  position: sticky;
  top: 130px; /* Adjust based on navbar height */
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #333;
}

.blog-sidebar h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #fff;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 5px;
  display: inline-block;
}

.video-blog {
  width: 50%;
  display: block;
  margin: 0 auto;
}

.recent-posts-list {
  list-style: none;
  padding: 0;
}

.recent-posts-list li {
  margin-bottom: 15px;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
}

.recent-posts-list li:last-child {
  border-bottom: none;
}

.recent-posts-list a {
  font-weight: bold;
  color: #fff;
  display: block;
  margin-bottom: 5px;
}

.recent-posts-list a:hover {
  color: var(--primary-color);
}

.pagination-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.pagination-btn {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.8rem;
  border-radius: 4px;
}

.pagination-btn:disabled {
  border-color: #555;
  color: #555;
  cursor: not-allowed;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--primary-color);
  color: #fff;
}

@media (max-width: 900px) {
  .blog-post-container {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
    margin-top: 40px;
  }
}

.article-content {
  grid-column: 1;
  grid-row: 1;
}

.blog-sidebar {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.all-posts-section {
  grid-column: 1;
  grid-row: 2;
  background-color: var(--card-bg);
  padding: 40px 20px;
  border-radius: 8px;
  border: 1px solid #333;
}

.all-posts-header {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.2rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 5px;
  display: inline-block;
}

@media (max-width: 900px) {
  .article-content,
  .blog-sidebar,
  .all-posts-section {
    grid-column: auto;
    grid-row: auto;
  }
}
