/* INfoY Cursos - Main Stylesheet */
:root {
  --orange: #ff8c42;
  --gray: #8d8d8d;
  --green: #6b9080;
  --white: #ffffff;
  --light-gray: #f5f5f5;
  --dark-gray: #333333;
  
  /* Dark mode variables */
  --bg-color: var(--light-gray);
  --text-color: var(--dark-gray);
  --card-bg: var(--white);
  --border-color: #e0e0e0;
  --heading-color: #222222;
  
  /* Mobile-specific variables */
  --header-height: 70px;
  --nav-transition: all 0.3s ease;
  --tap-target-size: 44px;
  --button-height: 46px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: all 0.3s ease;
}

/* Dark mode styles */
body.dark-mode {
  --bg-color: #1a1a1a;
  --text-color: #f5f5f5;
  --card-bg: #2a2a2a;
  --border-color: #444444;
  --heading-color: #ffffff;
}

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

/* Safari bottom bar fix */
@supports (-webkit-touch-callout: none) {
  .hero, body, html {
    height: -webkit-fill-available;
  }
}

/* Header Styles */
header {
  background-color: var(--card-bg);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s ease;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

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

.logo a {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--orange);
  text-decoration: none;
}

.logo span {
  color: var(--green);
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-menu li {
  padding: 0 1rem;
}

.nav-menu a {
  color: var(--dark-gray);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-menu a:hover {
  color: var(--orange);
}

.nav-menu a i {
  margin-right: 5px;
}

.nav-btn {
  background-color: var(--orange);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.nav-btn:hover {
  background-color: #e67e22;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  height: 80vh;
  display: flex;
  align-items: center;
  color: var(--white);
}

.hero-content {
  max-width: 650px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
}

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

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

.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  margin-left: 1rem;
}

.btn-secondary:hover {
  background-color: var(--white);
  color: var(--dark-gray);
}

/* Features Section */
.features {
  padding: 5rem 0;
  background-color: var(--white);
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
}

.section-title p {
  color: var(--gray);
  max-width: 700px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, background-color 0.3s ease;
}

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

.feature-card i {
  font-size: 2.5rem;
  color: var(--orange);
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Courses Section */
.courses {
  padding: 5rem 0;
  background-color: var(--light-gray);
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.course-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

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

.course-img {
  height: 200px;
  overflow: hidden;
}

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

.course-card:hover .course-img img {
  transform: scale(1.1);
}

.course-content {
  padding: 1.5rem;
}

.course-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.course-content p {
  color: var(--gray);
  margin-bottom: 1rem;
}

.course-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.course-info span {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: var(--gray);
}

.course-info i {
  margin-right: 0.5rem;
  color: var(--orange);
}

/* Call to Action */
.cta {
  padding: 5rem 0;
  background-color: var(--green);
  color: var(--white);
  text-align: center;
}

.cta h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta p {
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
footer {
  background-color: var(--dark-gray);
  color: var(--white);
  padding: 4rem 0 2rem;
}

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

.footer-column h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.footer-column h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 50px;
  height: 2px;
  background-color: var(--orange);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--light-gray);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--orange);
}

.social-icons {
  display: flex;
  margin-top: 1rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  margin-right: 0.8rem;
  color: var(--white);
  transition: all 0.3s;
}

.social-icons a:hover {
  background-color: var(--orange);
  transform: translateY(-3px);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-legal-links {
  margin-top: 1rem;
  display: flex;
  gap: 1.5rem;
}

.footer-legal-links a {
  color: var(--light-gray);
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.footer-legal-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Login/Register Form */
.auth-container {
  width: 90%;
  max-width: 400px;
  margin: 3rem auto;
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.auth-container h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--heading-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  min-height: var(--tap-target-size);
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  -webkit-appearance: none; /* Remove iOS default styling */
}

.form-control:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(255, 140, 66, 0.2);
}

.auth-btn {
  display: block;
  width: 100%;
  min-height: var(--button-height);
  padding: 0.8rem;
  background-color: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
}

.auth-btn:hover {
  background-color: #e67e22;
}

@media (max-width: 576px) {
  .auth-container {
    width: 95%;
    padding: 1.5rem;
    margin: 2rem auto;
  }
  
  .form-control, .auth-btn {
    font-size: 16px; /* Prevent iOS zoom on focus */
  }
}

.auth-links {
  margin-top: 1.5rem;
  text-align: center;
}

.auth-links a {
  color: var(--orange);
  text-decoration: none;
}

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

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.8rem;
  background-color: var(--white);
  color: var(--dark-gray);
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 1rem;
}

.google-btn img {
  margin-right: 0.8rem;
  width: 20px;
}

.google-btn:hover {
  background-color: #f5f5f5;
}

/* Course Detail Page */
.course-detail {
  padding: 5rem 0;
}

.course-header {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.course-header h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.instructor {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.instructor img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 1rem;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.course-meta span {
  display: flex;
  align-items: center;
}

.course-meta i {
  color: var(--orange);
  margin-right: 0.5rem;
}

.course-content-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .course-content-wrapper {
    grid-template-columns: 1fr;
  }
  
  .course-sidebar {
    order: -1;
    position: relative;
    top: 0;
    margin-bottom: 2rem;
  }
  
  .course-header {
    padding: 1.5rem;
  }
  
  .course-meta {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .course-meta span {
    width: 100%;
  }
  
  .instructor {
    flex-wrap: wrap;
  }
}

.course-description {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.course-description h2 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.course-sidebar {
  position: sticky;
  top: 100px;
}

.course-widget {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.course-widget h3 {
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.curriculum-list {
  list-style: none;
}

.curriculum-item {
  border-bottom: 1px solid #eee;
  padding: 1rem 0;
}

.curriculum-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.curriculum-header i {
  color: var(--orange);
  transition: transform 0.3s;
}

.curriculum-content {
  padding-top: 1rem;
  display: none;
}

.curriculum-content.active {
  display: block;
}

.curriculum-item.active .curriculum-header i {
  transform: rotate(180deg);
}

.lesson-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
}

.lesson-item i {
  margin-right: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray);
}

.progress-container {
  width: 100%;
  height: 8px;
  background-color: #eee;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-bar {
  height: 100%;
  background-color: var(--green);
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s;
}

.course-price {
  font-size: 2rem;
  color: var(--orange);
  margin-bottom: 1rem;
}

.price-info {
  display: flex;
  margin-bottom: 1rem;
}

.original-price {
  text-decoration: line-through;
  color: var(--gray);
  margin-right: 1rem;
}

.discount {
  background-color: var(--green);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.enroll-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  background-color: var(--orange);
  color: white;
  text-align: center;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-bottom: 1rem;
  text-decoration: none;
}

.enroll-btn:hover {
  background-color: #e67e22;
}

/* Dashboard */
.dashboard {
  padding: 5rem 0;
}

.dashboard-header {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-header h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.dashboard-content {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .dashboard-content {
    grid-template-columns: 1fr;
  }
  
  .dashboard-header h1 {
    font-size: 1.8rem;
  }
  
  .dashboard-main {
    padding: 1.5rem;
    overflow-x: auto;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dashboard-menu a {
    padding: 1rem;
    display: flex;
    align-items: center;
    min-height: var(--tap-target-size);
  }
  
  .dashboard {
    padding: 3rem 0;
  }
}

.dashboard-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.dashboard-menu {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-menu ul {
  list-style: none;
}

.dashboard-menu a {
  display: block;
  padding: 1rem;
  color: var(--dark-gray);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.3s;
}

.dashboard-menu a:hover, .dashboard-menu a.active {
  background-color: #f5f5f5;
  border-left-color: var(--orange);
  color: var(--orange);
}

.dashboard-menu i {
  margin-right: 0.8rem;
}

.dashboard-main {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-card h3 {
  font-size: 1rem;
  color: var(--gray);
  margin-bottom: 0.5rem;
}

.stat-card p {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark-gray);
}

/* Animations & Transitions */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.animated {
  animation-duration: 0.6s;
  animation-fill-mode: both;
}

.fadeIn {
  animation-name: fadeIn;
}

.slideUp {
  animation-name: slideUp;
}

.feature-card, .course-card, .hero-content h1, .hero-content p, .section-title, .btn {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards, slideUp 0.6s ease forwards;
}

.feature-card:nth-child(1), .course-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2), .course-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3), .course-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4), .course-card:nth-child(4) { animation-delay: 0.4s; }

.hero-content h1 { animation-delay: 0.1s; }
.hero-content p { animation-delay: 0.2s; }
.hero-content .btn-primary { animation-delay: 0.3s; }
.hero-content .btn-secondary { animation-delay: 0.4s; }

/* Responsive Styles */
@media (max-width: 1200px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .hero {
    height: 60vh;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .menu-toggle {
    display: block;
    color: var(--dark-gray);
    font-size: 1.5rem;
    padding: 0.5rem;
    height: var(--tap-target-size);
    width: var(--tap-target-size);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: var(--card-bg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: var(--nav-transition);
    z-index: 1000;
  }
  
  .nav-menu.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  
  .nav-menu li {
    width: 100%;
    text-align: center;
  }
  
  .nav-menu a {
    display: block;
    padding: 0.8rem 1rem;
    margin: 0.2rem 0;
    height: var(--tap-target-size);
    line-height: calc(var(--tap-target-size) - 1.6rem);
  }
  
  .navbar {
    padding: 0.5rem 0;
    flex-wrap: wrap;
  }
  
  .navbar > div:last-child {
    display: flex;
    align-items: center;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
    height: var(--button-height);
    line-height: calc(var(--button-height) - 1.6rem);
    font-size: 1rem;
    text-align: center;
  }
  
  .btn-secondary {
    margin-left: 0;
  }
  
  .hero-content {
    text-align: center;
    padding: 1rem 0;
  }
  
  .nav-btn {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    margin-bottom: 0;
    min-height: var(--tap-target-size);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .features-grid,
  .courses-grid {
    grid-template-columns: 1fr;
  }
  
  .feature-card,
  .course-card {
    margin-bottom: 1.5rem;
  }
  
  .footer-column {
    margin-bottom: 2rem;
    padding: 0 1rem;
  }
  
  .social-icons {
    justify-content: center;
  }
}

/* Admin styles */
.admin-form {
  max-width: 800px;
  margin: 0 auto;
}

.admin-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.admin-form textarea {
  min-height: 200px;
  resize: vertical;
}

.admin-form .form-row {
  display: flex;
  gap: 1rem;
}

.admin-form .form-row > div {
  flex: 1;
}

.job-card {
  background-color: var(--white);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.job-card h3 {
  margin-bottom: 0.5rem;
}

.job-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--gray);
}

.apply-btn {
  background-color: var(--green);
  color: var(--white);
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.apply-btn:hover {
  background-color: #5a7a6d;
}