/*! 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;
}

/* ==========================================================================
   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;
}

/*
 * 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;
  }
}

/* ==========================================================================
   Melomar-IT Professional Design System
   ========================================================================== */

/* Global Variables */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1e293b;
  --secondary-color: #0d9488;
  --accent-color: #3b82f6;
  --text-primary: #ffffff;
  --text-secondary: #e5e7eb;
  --text-light: #d1d5db;
  --bg-dark: #0f172a;
  --bg-gradient-start: #0f172a;
  --bg-gradient-mid: #1e293b;
  --bg-gradient-end: #0f172a;
  --white: #ffffff;
  --border-radius: 8px;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  line-height: 1.6;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.navbar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  padding: 1rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--white);
  text-decoration: none;
}

.navbar-brand img {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.navbar-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 0 4rem;
  text-align: center;
}

.hero-section h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.hero-section .lead {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  margin-bottom: 2.5rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-btns .btn {
  padding: 1rem 2.5rem;
  font-weight: 600;
  border-radius: 12px;
  font-size: 1rem;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}

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

.hero-btns .btn-primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
}

.hero-btns .btn-outline-light {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

.hero-btns .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Fade In Animation
   ========================================================================== */

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

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

/* ==========================================================================
   Background Canvas
   ========================================================================== */

.background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2.5rem;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Glow Card */
.glow-card {
  position: relative;
  overflow: hidden;
}

.glow-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, transparent, rgba(37, 99, 235, 0.1), transparent);
  z-index: -1;
  transition: var(--transition);
}

.glow-card:hover::before {
  opacity: 1;
  background: linear-gradient(45deg, rgba(37, 99, 235, 0.1), transparent, rgba(37, 99, 235, 0.1));
}

/* Feature Icons */
.feature-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.feature-icon.green {
  color: var(--secondary-color);
}

.feature-icon.blue {
  color: var(--accent-color);
}

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

/* Video Section Container - to get 50% of page width */
.video-section-container {
  max-width: 50%;
  margin: 0 auto;
}

/* Video Container */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: var(--card-shadow-hover);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   Personalization Info Section
   ========================================================================== */

.personalization-info {
  margin-top: 2rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.info-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  padding: 2.5rem;
  border-radius: 16px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.05);
}

.info-card i {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
}

.info-card h4 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   Dynamic Hero Content
   ========================================================================== */

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

/* ==========================================================================
   Recommendation Grid
   ========================================================================== */

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

.recommendation-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 2rem;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.recommendation-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
}

.recommendation-card i {
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.recommendation-card h4 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(16px);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

footer a {
  text-decoration: none;
  transition: var(--transition);
}

footer a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Footer centering */
footer {
  text-align: center;
}

footer .container {
  max-width: 1200px;
  margin-left: auto !important;
  margin-right: auto !important;
}

footer p,
footer div {
  text-align: center;
  margin-left: auto !important;
  margin-right: auto !important;
}

footer .mt-3 {
  display: flex;
  justify-content: center;
  align-items: center;
}

footer a {
  display: inline-block;
}

/* ==========================================================================
   Animated Background Particles
   ========================================================================== */

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

/* ==========================================================================
   Float Animation
   ========================================================================== */

.float-animation {
  transition: var(--transition);
}

.float-animation:hover {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ==========================================================================
   Gradient Text
   ========================================================================== */

.gradient-text {
  background: linear-gradient(135deg, var(--white) 0%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s ease-in-out infinite;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
  .navbar-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .navbar-nav .nav-link {
    width: 100%;
    padding: 0.75rem 1rem;
  }

  .hero-section {
    padding-top: 6rem;
    min-height: 60vh;
  }

  .hero-btns {
    flex-direction: column;
  }

  h2 {
    font-size: 2rem;
  }

  .video-container {
    max-width: 100%;
  }
}

/* ==========================================================================
   Dark Mode Enhancements
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
  }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .navbar,
  footer,
  .feature-icon,
  .video-container iframe {
    display: none;
  }

  .card {
    break-inside: avoid;
  }
}
