/* ==========================================================================
   Google Material-inspired theme — mobile-first
   ========================================================================== */

   :root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-hover: #1765cc;
    --primary-tint: #e8f0fe;
    --accent-red: #ea4335;
    --accent-yellow: #fbbc04;
    --accent-green: #34a853;
  
    --surface: #ffffff;
    --bg: #ffffff;
    --bg-gray: #f8f9fa;
    --border: #dadce0;
    --border-light: #e8eaed;
  
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-hint: #80868b;
  
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
  
    --shadow-1: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    --shadow-2: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
    --shadow-3: 0 2px 6px 2px rgba(60, 64, 67, 0.15), 0 1px 2px 0 rgba(60, 64, 67, 0.3);
  
    --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  * {
    box-sizing: border-box;
  }
  
  html {
    -webkit-text-size-adjust: 100%;
  }
  
  body {
    font-family: 'Google Sans', 'Roboto', Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  
  a {
    text-decoration: none;
    color: var(--primary);
  }
  
  a:hover {
    color: var(--primary-dark);
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-family: 'Google Sans', 'Roboto', Arial, sans-serif;
    color: var(--text-primary);
    letter-spacing: -0.2px;
  }
  
  /* Buttons get Google's pill shape */
  .btn {
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1.5rem;
    transition: box-shadow var(--transition), background-color var(--transition), border-color var(--transition);
    text-transform: none;
  }
  
  /* ---------- Navbar ---------- */
  .navbar-brand-custom {
    font-weight: 600;
    font-size: 1.35rem;
    color: var(--text-primary) !important;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
  }
  
  .navbar-brand-custom i {
    color: var(--primary);
  }
  
  .navbar-custom {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border-light);
    box-shadow: none;
    padding: 0.5rem 0;
  }
  
  .navbar-custom .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.6rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition), color var(--transition);
  }
  
  .navbar-custom .nav-link:hover {
    color: var(--primary);
    background-color: var(--primary-tint);
  }
  
  .navbar-custom .nav-link.text-primary-custom {
    color: var(--primary) !important;
    background-color: var(--primary-tint);
  }
  
  .btn-primary-custom {
    background-color: var(--primary);
    border: 1px solid var(--primary);
    color: #fff;
    font-weight: 500;
  }
  
  .btn-primary-custom:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
    box-shadow: var(--shadow-1);
  }
  
  .btn-outline-primary-custom {
    border: 1px solid var(--border);
    color: var(--primary);
    background-color: transparent;
    font-weight: 500;
  }
  
  .btn-outline-primary-custom:hover {
    background-color: var(--primary-tint);
    border-color: var(--primary);
    color: var(--primary);
  }
  
  /* ==========================================================================
     Hero
     ========================================================================== */
  
  .hero-section {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    padding: 3rem 0 2.5rem;
    isolation: isolate;
  }
  
  /* Soft animated color blobs — Google's four brand colors, heavily blurred */
  .hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
    z-index: -1;
    pointer-events: none;
    animation: heroFloat 14s ease-in-out infinite;
  }
  
  .hero-blob-1 {
    width: 340px;
    height: 340px;
    top: -120px;
    left: -100px;
    background: var(--primary);
    animation-delay: 0s;
  }
  
  .hero-blob-2 {
    width: 300px;
    height: 300px;
    top: 40px;
    right: -120px;
    background: var(--accent-red);
    opacity: 0.22;
    animation-delay: -5s;
  }
  
  .hero-blob-3 {
    width: 260px;
    height: 260px;
    bottom: -140px;
    left: 35%;
    background: var(--accent-yellow);
    opacity: 0.25;
    animation-delay: -9s;
  }
  
  @keyframes heroFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(24px, -20px) scale(1.06); }
    66%      { transform: translate(-18px, 16px) scale(0.96); }
  }
  
  /* Eyebrow badge */
  .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: var(--primary-tint);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
    animation: heroFadeUp 0.6s ease both;
  }
  
  .hero-badge i {
    color: var(--accent-yellow);
  }
  
  .hero-title {
    font-weight: 700;
    font-size: 2.1rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 1.1rem;
    color: var(--text-primary);
    animation: heroFadeUp 0.6s ease 0.05s both;
  }
  
  .hero-title-gradient {
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent-red) 45%, var(--accent-yellow) 75%, var(--accent-green) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary);
  }
  
  .hero-lead {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    max-width: 42rem;
    animation: heroFadeUp 0.6s ease 0.1s both;
  }
  
  .hero-cta {
    animation: heroFadeUp 0.6s ease 0.15s both;
  }
  
  .btn-hero-primary {
    display: inline-flex;
    align-items: center;
    background-color: var(--primary);
    border: 1px solid var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.6rem;
    border-radius: 28px;
    box-shadow: var(--shadow-1);
    transition: box-shadow var(--transition), transform var(--transition), background-color var(--transition);
  }
  
  .btn-hero-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
    box-shadow: var(--shadow-2);
    transform: translateY(-2px);
  }
  
  .btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.6rem;
    border-radius: 28px;
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  }
  
  .btn-hero-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-1);
    transform: translateY(-2px);
  }
  
  /* Stats row */
  .hero-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-light);
    animation: heroFadeUp 0.6s ease 0.2s both;
  }
  
  .hero-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  
  .hero-stat-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
  }
  
  .hero-stat .stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
  }
  
  .hero-stat .stat-caption {
    color: var(--text-secondary);
    font-size: 0.8rem;
  }
  
  /* Visual mockup card */
  .hero-visual {
    position: relative;
    padding: 2rem 1rem;
  }
  
  .hero-card {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-3);
  }
  
  .hero-card-main {
    animation: heroFadeUp 0.7s ease 0.15s both;
  }
  
  .hero-card-header {
    display: flex;
    gap: 0.4rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--border-light);
  }
  
  .hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
  }
  
  .hero-card-body {
    padding: 2rem 1.5rem 2.25rem;
    text-align: center;
  }
  
  .hero-card-icon {
    font-size: 2.75rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
  }
  
  .hero-progress {
    height: 8px;
    border-radius: 4px;
    background-color: var(--border-light);
    overflow: hidden;
    margin-bottom: 0.75rem;
  }
  
  .hero-progress-bar {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent-green));
    animation: heroProgressGrow 1.4s ease 0.4s both;
  }
  
  @keyframes heroProgressGrow {
    from { width: 0; }
  }
  
  .hero-card-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
  }
  
  .hero-card-float {
    position: absolute;
    display: flex;
    align-items: center;
    padding: 0.65rem 1.1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    animation: heroFloatCard 5s ease-in-out infinite, heroFadeUp 0.7s ease both;
  }
  
  .hero-card-float-1 {
    top: 8%;
    right: -4%;
    animation-delay: 0.3s, 0.3s;
  }
  
  .hero-card-float-2 {
    bottom: 6%;
    left: -8%;
    animation-delay: -2.5s, 0.45s;
  }
  
  @keyframes heroFloatCard {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
  }
  
  @keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  
  @media (prefers-reduced-motion: reduce) {
    .hero-blob,
    .hero-progress-bar,
    .hero-card-float,
    .hero-badge,
    .hero-title,
    .hero-lead,
    .hero-cta,
    .hero-stats-row,
    .hero-card-main {
      animation: none !important;
    }
  }
  
  /* ---------- Section titles ---------- */
  .section-title {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
  }
  
  .section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
  }
  
  /* ---------- Cards ---------- */
  .card-custom {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: box-shadow var(--transition), transform var(--transition);
    height: 100%;
    overflow: hidden;
    background-color: var(--surface);
  }
  
  .card-custom:hover {
    box-shadow: var(--shadow-2);
    transform: translateY(-2px);
    border-color: transparent;
  }
  
  .card-img-top-custom {
    height: 160px;
    object-fit: cover;
    background-color: var(--bg-gray);
  }
  
  .badge-category {
    background-color: var(--primary-tint);
    color: var(--primary-dark);
    font-weight: 500;
    font-size: 0.72rem;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-lg);
  }
  
  .card-body .card-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
  }
  
  .video-play-overlay {
    position: relative;
  }
  
  .video-play-overlay::after {
    content: '\f04b';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.4rem;
    background: rgba(32, 33, 36, 0.65);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
  }
  
  /* ---------- Auth pages ---------- */
  .auth-card {
    max-width: 420px;
    margin: 2rem auto;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 2rem 1.75rem;
    box-shadow: var(--shadow-1);
    background-color: var(--surface);
  }
  
  .auth-card h2 {
    font-weight: 600;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-primary);
  }
  
  .form-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
  }
  
  .form-control {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    font-size: 0.95rem;
  }
  
  .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
  }
  
  /* ---------- Footer ---------- */
  .footer-custom {
    background-color: var(--bg-gray);
    color: var(--text-secondary);
    padding: 2.5rem 0 1.25rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border-light);
  }
  
  .footer-custom h5 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }
  
  .footer-custom a {
    color: var(--text-secondary);
    font-size: 0.9rem;
  }
  
  .footer-custom a:hover {
    color: var(--primary);
  }
  
  .footer-bottom {
    border-top: 1px solid var(--border);
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    font-size: 0.8rem;
    color: var(--text-hint);
  }
  
  /* ---------- Dashboard ---------- */
  .stat-card {
    border-radius: var(--radius-md);
    padding: 1.25rem;
    background-color: var(--surface);
    border: 1px solid var(--border-light);
    transition: box-shadow var(--transition);
  }
  
  .stat-card:hover {
    box-shadow: var(--shadow-1);
  }
  
  .stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
  }
  
  .stat-card .stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }
  
  /* ---------- Blog post ---------- */
  .blog-content {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-primary);
    white-space: pre-wrap;
  }
  
  .comment-box {
    background-color: var(--bg-gray);
    border-radius: var(--radius-sm);
    padding: 1rem 1.15rem;
    margin-bottom: 0.85rem;
  }
  
  /* ---------- Video watch page ---------- */
  video.video-player {
    width: 100%;
    border-radius: var(--radius-md);
    background: #000;
  }
  
  /* ---------- Misc ---------- */
  .section-divider {
    padding: 2.5rem 0;
  }
  
  .section-divider.bg-light-gray {
    background-color: var(--bg-gray);
  }
  
  .text-primary-custom {
    color: var(--primary) !important;
  }
  
  .badge-admin {
    background-color: var(--accent-yellow);
    color: #202124;
    font-weight: 600;
    border-radius: var(--radius-lg);
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
  }
  
  /* Alerts, softened to Material look */
  .alert {
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
  }
  
  .alert-success { background-color: #e6f4ea; color: #1e4620; }
  .alert-danger  { background-color: #fce8e6; color: #a50e0e; }
  .alert-warning { background-color: #fef7e0; color: #7c4a03; }
  .alert-info    { background-color: var(--primary-tint); color: var(--primary-dark); }
  
  /* Pagination, Material-ish */
  .pagination .page-link {
    border: none;
    color: var(--text-secondary);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
    font-size: 0.9rem;
  }
  
  .pagination .page-item.active .page-link {
    background-color: var(--primary-tint);
    color: var(--primary);
    font-weight: 600;
  }
  
  .pagination .page-item.disabled .page-link {
    color: var(--text-hint);
    background-color: transparent;
  }
  
  /* ==========================================================================
     Mobile-first responsive breakpoints
     ========================================================================== */
  
  /* Small phones and up: base styles above already target mobile.
     The rules below progressively enhance for larger screens. */
  
  @media (min-width: 576px) {
    .card-img-top-custom {
      height: 170px;
    }
  }
  
  @media (min-width: 768px) {
    body {
      font-size: 16px;
    }
  
    .hero-section {
      padding: 5rem 0 4rem;
    }
  
    .hero-title {
      font-size: 2.75rem;
    }
  
    .hero-lead {
      font-size: 1.15rem;
    }
  
    .hero-stat .stat-number {
      font-size: 1.6rem;
    }
  
    .hero-visual {
      padding: 2rem 2.5rem;
    }
  
    .hero-card-float {
      font-size: 0.88rem;
    }
  
    .section-title {
      font-size: 1.85rem;
    }
  
    .section-subtitle {
      font-size: 1rem;
    }
  
    .card-img-top-custom {
      height: 180px;
    }
  
    .section-divider {
      padding: 4rem 0;
    }
  
    .auth-card {
      margin: 3rem auto;
      padding: 2.5rem;
    }
  }
  
  @media (min-width: 992px) {
    .hero-title {
      font-size: 3rem;
    }
  
    .hero-card-float {
      font-size: 0.9rem;
    }
  }
  
  /* Below lg: the visual mockup drops out of the flow, so keep floating
     cards from overflowing and give the section breathing room */
  @media (max-width: 991.98px) {
    .hero-visual {
      max-width: 460px;
      margin: 0 auto;
      padding: 1.5rem 2rem 2rem;
    }
  
    .hero-card-icon {
      font-size: 3.1rem;
    }
  
    .hero-card-float-1 {
      right: 2%;
    }
  
    .hero-card-float-2 {
      left: 2%;
    }
  }
  
  @media (max-width: 767.98px) {
    .hero-section {
      padding-top: 2rem;
    }
  
    .hero-title {
      text-align: center;
    }
  
    .hero-lead {
      text-align: center;
    }
  
    .hero-badge {
      display: flex;
      width: fit-content;
      margin-left: auto;
      margin-right: auto;
    }
  
    .hero-cta {
      justify-content: center;
    }
  }
  
  /* Small phones: tighten spacing further */
  @media (max-width: 400px) {
    .hero-title {
      font-size: 1.65rem;
    }
  
    .hero-cta .btn {
      width: 100%;
    }
  
    .hero-stats-row {
      gap: 1rem 1.5rem;
    }
  
    .hero-card-float {
      position: static;
      display: inline-flex;
      margin-top: 0.6rem;
      animation: heroFadeUp 0.7s ease both;
    }
  
    .hero-card-float-2 {
      margin-left: 0.4rem;
    }
  
    .auth-card {
      padding: 1.5rem 1.25rem;
      margin: 1rem auto;
      border-radius: var(--radius-sm);
    }
  }
  
  /* Prevent horizontal scroll on narrow viewports */
  .container {
    overflow-x: hidden;
  }
  
  img, video {
    max-width: 100%;
    height: auto;
  }