/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

:root {
  --primary-color: #00b894;
  --secondary-color: #0984e3;
  --bg-dark: #1e272e;
  --bg-darker: #12181b;
  --text-light: #f5f6fa;
  --text-muted: #dcdde1;
  --accent-color: #fdcb6e;
  --card-bg: #2d3436;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-darker);
  color: var(--text-light);
  margin: 0;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

h1, h2, h3 {
  font-weight: 800;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
  padding: 0;
}

/* Header & Nav */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
}

.logo {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -1px;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
  margin-left: auto;
  margin-right: 2rem;
}

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

.lang-switch {
  display: flex;
  align-items: center;
}

.btn-lang {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-light);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.btn-lang:hover {
  border-color: var(--primary-color);
  background: rgba(0, 184, 148, 0.1);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
  min-height: 80vh;
  display: flex;
  flex-direction: column;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 4rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 3rem;
  min-height: calc(80vh - 80px);
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 50px rgba(0,0,0,0.5));
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.hero h1 span {
  color: var(--primary-color);
  position: relative;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.hero-btns {
  display: flex;
  gap: 1rem;
}

.btn {
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

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

.btn-primary:hover {
  background-color: #00a884;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Sections */
.section {
  padding: 6rem 0;
}

.section-alt {
  background-color: var(--bg-dark);
}

.section h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
}

.section-intro {
  text-align: center;
  max-width: 800px;
  margin: -1.5rem auto 4rem;
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
}

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

.card {
  background-color: var(--card-bg);
  padding: 2.5rem;
  border-radius: 16px;
  transition: transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
}

.icon-large {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 3rem;
}

.feature-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.feature-icon {
  background-color: rgba(9, 132, 227, 0.1);
  color: var(--secondary-color);
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.feature-text h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.feature-text p {
  color: var(--text-muted);
  line-height: 1.5;
}

/* Contact */
.contact-container {
  text-align: center;
}

.contact-container p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 3rem;
}

.contact-methods {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-card {
  background-color: var(--card-bg);
  padding: 1.5rem 2rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  min-width: 200px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-card i {
  font-size: 2rem;
  color: var(--accent-color);
}

.contact-card:hover {
  background-color: var(--bg-dark);
  border-color: var(--accent-color);
  transform: scale(1.05);
}

/* Footer */
footer {
  padding: 4rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background-color: var(--bg-darker);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.footer-logo {
  height: 50px;
  width: auto;
  background-color: white;
  padding: 8px 12px;
  border-radius: 6px;
  opacity: 0.9;
  transition: all 0.3s ease;
}

.footer-logo:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: white;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content {
  animation: fadeInUp 1s ease-out;
}

.card {
  animation: fadeInUp 1s ease-out;
  animation-fill-mode: both;
}

.card:nth-child(1) { animation-delay: 0.2s; }
.card:nth-child(2) { animation-delay: 0.4s; }

.feature-item {
  animation: fadeInUp 1s ease-out;
  animation-fill-mode: both;
}

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

.course-grid .card {
  animation: fadeInUp 1s ease-out both;
}

.course-grid .card:nth-child(1) { animation-delay: 0.1s; }
.course-grid .card:nth-child(2) { animation-delay: 0.2s; }
.course-grid .card:nth-child(3) { animation-delay: 0.3s; }
.course-grid .card:nth-child(4) { animation-delay: 0.4s; }
.course-grid .card:nth-child(5) { animation-delay: 0.5s; }
.course-grid .card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0;
    padding-bottom: 4rem;
  }

  .hero-content {
    align-items: center;
    padding-top: 2rem;
  }

  .hero-image {
    order: -1;
    margin-top: 2rem;
  }

  .hero-image img {
    max-width: 200px;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .nav-links {
    display: none; /* Keep it simple for now or add a burger menu */
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero-btns {
    flex-direction: column;
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-brand {
    align-items: center;
  }

  .btn {
    justify-content: center;
  }
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

