/* ============================================================
   style.css — aCloudShalla Global Styles
   Author  : aCloudShalla
   Purpose : Base variables, resets, shared components
   ============================================================ */


/* ── 1. CSS VARIABLES (Design Tokens) ────────────────────── */
:root {
  /* Colors */
  --clr-bg:           #0a0e1a;   /* page background          */
  --clr-surface:      #111827;   /* card / section surface   */
  --clr-surface2:     #1a2235;   /* slightly lighter surface */
  --clr-border:       rgba(255, 255, 255, 0.07);
  --clr-border-blue:  rgba(79, 142, 247, 0.30);

  /* Accent */
  --clr-accent:       #4f8ef7;   /* primary blue             */
  --clr-accent-light: #6ba3ff;   /* hover blue               */
  --clr-accent2:      #a78bfa;   /* purple accent            */

  /* Text */
  --clr-text:         #f0f4ff;   /* primary text             */
  --clr-text-muted:   #8a94b0;   /* secondary / muted text   */
  --clr-text-dim:     #4a5568;   /* disabled / dim text      */

  /* Utility */
  --glow-blue:        rgba(79, 142, 247, 0.15);
  --nav-height:       72px;
  --radius:           14px;
  --radius-sm:        8px;
  --transition:       0.25s ease;

  /* Legacy vars kept for Bootstrap overrides */
  --nav-bg:           #111827;
  --nav-text:         #ffffff;
  --button-bg:        #4f8ef7;
  --button-text:      #ffffff;
  --hero-text:        #f0f4ff;
  --hero-overlay-dark:rgba(0, 0, 0, 0.55);
  --footer-bg:        #111827;
  --footer-text:      #8a94b0;
}


/* ── 2. RESET & BASE ──────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.7;
  overflow-x: hidden;
  /* space for fixed navbar */
  padding-top: var(--nav-height);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

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

/* Custom scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--clr-bg); }
::-webkit-scrollbar-thumb { background: var(--clr-accent); border-radius: 3px; }


/* ── 3. TYPOGRAPHY HELPERS ────────────────────────────────── */
.section-title {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  color: var(--clr-text);
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 1rem;
  color: var(--clr-text-muted);
  max-width: 520px;
  line-height: 1.7;
}

/* ── 4. SHARED BUTTON STYLES ──────────────────────────────── */
.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--clr-accent);
  color: #fff !important;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-accent:hover {
  background: var(--clr-accent-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(79, 142, 247, 0.35);
}

.btn-outline-accent {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--clr-text) !important;
  padding: 11px 26px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1.5px solid var(--clr-border-blue);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.btn-outline-accent:hover {
  background: var(--glow-blue);
  border-color: var(--clr-accent);
}


/* ── 5. SECTION WRAPPER ───────────────────────────────────── */
.section-dark {
  background: var(--clr-bg);
  padding: 80px 0;
}

.section-surface {
  background: var(--clr-surface);
  padding: 80px 0;
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}


/* ── 6. TUTORIALS / COURSE CARDS ─────────────────────────── */

/* Section anchor offset (so navbar doesn't cover heading) */
#tutorial {
  scroll-margin-top: var(--nav-height);
  background: var(--clr-bg);
  padding: 80px 0;
}

/* Tutorials heading */
#tutorial .section-title {
  color: var(--clr-text);
  text-align: center;
  margin-bottom: 12px;
}

#tutorial .section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent2));
  border-radius: 2px;
  margin: 0 auto 48px;
}

/* Wrapper link */
.course-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

/* Card base */
.course-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--clr-border);
  background: var(--clr-surface);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

/* Hover lift */
.course-card:hover {
  transform: translateY(-8px);
  border-color: var(--clr-border-blue);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px var(--clr-border-blue);
}

/* Shine overlay on hover */
.course-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(79,142,247,0.07), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.course-card:hover::before {
  opacity: 1;
}

/* Image area — fixed height for consistent cards */
.course-card-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--clr-surface2);
  flex-shrink: 0;
}

.course-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

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

/* Category badge on image */
.course-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(79, 142, 247, 0.92);
  color: #fff;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  z-index: 1;
}

/* Card body */
.course-card .card-body {
  flex: 1;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--clr-surface);
  position: relative;
  z-index: 1;
}

.course-card .card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.course-card .card-text {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  line-height: 1.65;
  margin-bottom: 12px;
}

/* Bullet meta list */
.course-meta {
  margin-bottom: 14px;
}

.course-meta li {
  font-size: 0.82rem;
  color: var(--clr-text-dim);
  padding: 2px 0;
}

/* Bottom row */
.course-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--clr-border);
}

.course-duration {
  font-size: 0.82rem;
  color: var(--clr-text-muted);
}

.course-cta {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--clr-accent);
  transition: color var(--transition);
}

.course-card:hover .course-cta {
  color: var(--clr-accent-light);
}


/* ── 7. SHARED HERO STYLE (used by blog, notes, aws pages) ── */
.page-hero {
  padding: 70px 0 56px;
  background: radial-gradient(ellipse at top left, #1a2a4a 0%, var(--clr-surface) 50%, var(--clr-bg) 100%);
  position: relative;
  overflow: hidden;
}

/* Decorative glow blobs */
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 30%, rgba(79,142,247,0.18) 0, transparent 50%),
    radial-gradient(circle at 85% 70%, rgba(167,139,250,0.12) 0, transparent 50%);
  pointer-events: none;
}

.page-hero .container { position: relative; z-index: 1; }

.page-hero-pill {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 50px;
  background: rgba(79, 142, 247, 0.12);
  border: 1px solid var(--clr-border-blue);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 16px;
}

.page-hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--clr-text);
  letter-spacing: -0.025em;
  margin-bottom: 14px;
  line-height: 1.1;
}

.page-hero-sub {
  font-size: 1rem;
  color: var(--clr-text-muted);
  max-width: 520px;
  line-height: 1.7;
}


/* ── 8. BLOG / NOTES CARDS ────────────────────────────────── */
.content-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 24px;
  height: 100%;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.content-card:hover {
  transform: translateY(-5px);
  border-color: var(--clr-border-blue);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

.content-card .badge-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Tag colors */
.badge-tag.aws        { background: rgba(255,153,0,0.15);  color: #ff9900; border: 1px solid rgba(255,153,0,0.3); }
.badge-tag.linux      { background: rgba(220,50,50,0.12);  color: #f87171; border: 1px solid rgba(220,50,50,0.25); }
.badge-tag.sql        { background: rgba(34,211,238,0.12); color: #22d3ee; border: 1px solid rgba(34,211,238,0.25); }
.badge-tag.career     { background: rgba(167,139,250,0.15);color: #a78bfa; border: 1px solid rgba(167,139,250,0.3); }
.badge-tag.devops     { background: rgba(79,142,247,0.15); color: #4f8ef7; border: 1px solid rgba(79,142,247,0.3); }
.badge-tag.python     { background: rgba(250,204,21,0.12); color: #facc15; border: 1px solid rgba(250,204,21,0.25); }

.content-card .card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.content-card .card-text {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.content-card .card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clr-accent);
  transition: color var(--transition);
}

.content-card .card-link:hover {
  color: var(--clr-accent-light);
}


/* ── 9. FOOTER ────────────────────────────────────────────── */
.site-footer {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  padding: 60px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand-desc {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
  margin: 12px 0 20px;
  max-width: 260px;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.footer-social-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  transition: var(--transition);
  cursor: pointer;
}

.footer-social-btn:hover {
  background: var(--glow-blue);
  border-color: var(--clr-border-blue);
  color: var(--clr-accent);
}

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-text);
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--clr-accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--clr-border);
  font-size: 0.82rem;
  color: var(--clr-text-dim);
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom a {
  color: var(--clr-accent);
}

/* Footer logo text */
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--clr-text);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.footer-logo img {
  height: 36px;
  width: auto;
}


/* ── 10. FADE-UP ANIMATION (scroll reveal) ────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ── 11. RESPONSIVE BREAKPOINTS ──────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand-desc { max-width: 100%; }
}

@media (max-width: 768px) {
  body { font-size: 15px; }

  #tutorial { padding: 56px 0; }

  .section-dark,
  .section-surface { padding: 56px 0; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

@media (max-width: 480px) {
  .course-card-image { height: 180px; }
}


/* ── 12. BOOTSTRAP OVERRIDES ──────────────────────────────── */
/* These fix Bootstrap's .card styles conflicting with ours   */

/* Remove Bootstrap's default white card background & border */
.course-card.card {
  background: var(--clr-surface) !important;
  border: 1px solid var(--clr-border) !important;
  border-radius: var(--radius) !important;
}

/* Remove Bootstrap padding from card-body inside course-card */
.course-card .card-body {
  background: var(--clr-surface) !important;
  padding: 20px 22px !important;
}

/* Force Bootstrap card title color */
.course-card .card-title {
  color: var(--clr-text) !important;
}

/* Force Bootstrap card text color */
.course-card .card-text {
  color: var(--clr-text-muted) !important;
}

/* Fix image — remove any Bootstrap padding/margin on img */
.course-card-image {
  position: relative !important;
  height: 220px !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.course-card-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  max-width: none !important;
}
