/* =============================================
   Rafael Costa English — Stylesheet
   Paleta: Azul profissional
   Fonte: Lora (display) + DM Sans (corpo)
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:        #2563EB;
  --blue-dark:   #1d4ed8;
  --blue-deeper: #1e3a5f;
  --blue-light:  #EFF6FF;
  --blue-mid:    #DBEAFE;
  --text:        #1e293b;
  --text-muted:  #64748b;
  --border:      #e2e8f0;
  --bg:          #f8fafc;
  --white:       #ffffff;
  --radius:      12px;
  --radius-sm:   8px;
}

html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; color: var(--text); background: var(--bg); font-size: 16px; line-height: 1.6; }

/* ---- NAVBAR ---- */
.navbar { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nav-logo { font-family: 'Lora', serif; font-size: 18px; font-weight: 600; color: var(--blue-deeper); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo-icon { color: var(--blue); font-size: 20px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link { text-decoration: none; font-size: 14px; color: var(--text-muted); padding: 6px 12px; border-radius: var(--radius-sm); transition: color 0.15s, background 0.15s; }
.nav-link:hover, .nav-link.active { color: var(--blue-dark); background: var(--blue-light); }
.nav-btn-outline { font-size: 14px; padding: 7px 16px; border: 1px solid var(--blue); border-radius: var(--radius-sm); color: var(--blue); background: none; cursor: pointer; text-decoration: none; display: inline-block; transition: background 0.15s; }
.nav-btn-outline:hover { background: var(--blue-light); }

/* ---- HERO ---- */
.hero { max-width: 1080px; margin: 0 auto; padding: 5rem 1.5rem 4rem; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero-inner { }
.hero-tag { display: inline-block; background: var(--blue-light); color: var(--blue-dark); font-size: 13px; padding: 4px 12px; border-radius: 20px; margin-bottom: 1.25rem; font-weight: 500; }
.hero-title { font-family: 'Lora', serif; font-size: 3rem; font-weight: 600; line-height: 1.15; margin-bottom: 1.25rem; color: var(--blue-deeper); }
.hero-title em { color: var(--blue); font-style: italic; }
.hero-sub { font-size: 17px; color: var(--text-muted); line-height: 1.7; margin-bottom: 2rem; max-width: 440px; }
.btn-primary { display: inline-block; background: var(--blue); color: #fff; padding: 12px 24px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 500; text-decoration: none; border: none; cursor: pointer; transition: background 0.15s; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary.full { width: 100%; text-align: center; }

/* ---- HERO PHOTO ---- */
.hero-visual { display: flex; justify-content: center; align-items: flex-end; }
.hero-photo-wrap { position: relative; }
.hero-photo { width: 340px; height: 400px; object-fit: cover; object-position: top center; border-radius: var(--radius) var(--radius) 0 0; display: block; }
.hero-photo-badge { position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%); background: var(--blue); color: #fff; padding: 8px 20px; border-radius: 20px; font-size: 13px; font-weight: 500; white-space: nowrap; box-shadow: 0 4px 12px rgba(37,99,235,0.3); }

/* ---- FEATURES (faixa azul escura) ---- */
.features { background: var(--blue-deeper); padding: 4rem 1.5rem; }
.features-inner { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.feat-card { padding: 1.5rem; border-radius: var(--radius); background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); }
.feat-icon { font-size: 28px; margin-bottom: 1rem; }
.feat-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: #fff; }
.feat-card p { font-size: 14px; color: #94a3b8; line-height: 1.6; }

/* ---- TIPS SECTION ---- */
.tips-preview { max-width: 1080px; margin: 0 auto; padding: 4rem 1.5rem; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.5rem; }
.section-header h2 { font-family: 'Lora', serif; font-size: 1.75rem; font-weight: 600; color: var(--blue-deeper); }
.link-more { font-size: 14px; color: var(--blue); text-decoration: none; }
.link-more:hover { text-decoration: underline; }

.tips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.tip-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.tip-tag { display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue-dark); background: var(--blue-light); padding: 2px 9px; border-radius: 20px; margin-bottom: 10px; }
.tip-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--blue-deeper); }
.tip-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.tip-example { margin-top: 10px; font-family: 'Lora', serif; font-style: italic; font-size: 14px; color: var(--blue-dark); background: var(--blue-light); padding: 8px 12px; border-radius: var(--radius-sm); }

/* ---- PAGE INNER ---- */
.page-inner { max-width: 1080px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.page-inner.narrow { max-width: 420px; }
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-family: 'Lora', serif; font-size: 2rem; font-weight: 600; color: var(--blue-deeper); margin-bottom: 6px; }
.page-header p { color: var(--text-muted); font-size: 16px; }

/* ---- FILTER ---- */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filter-btn { padding: 6px 16px; border-radius: 20px; border: 1px solid var(--border); background: var(--white); font-size: 13px; cursor: pointer; color: var(--text-muted); font-family: 'DM Sans', sans-serif; transition: all 0.15s; }
.filter-btn:hover { border-color: var(--blue); color: var(--blue); }
.filter-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---- AUTH CARD ---- */
.auth-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem; margin-top: 2rem; }
.auth-logo { font-size: 2rem; text-align: center; margin-bottom: 1rem; color: var(--blue); }
.auth-card h2 { font-family: 'Lora', serif; font-size: 1.5rem; text-align: center; margin-bottom: 4px; color: var(--blue-deeper); }
.auth-sub { font-size: 14px; color: var(--text-muted); text-align: center; margin-bottom: 1.75rem; }

/* ---- FORM ---- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 5px; }
.field input, .field select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; font-family: 'DM Sans', sans-serif; background: var(--white); color: var(--text); transition: border-color 0.15s; }
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); }
.field input[type="file"] { padding: 8px; }
.field-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.error-msg { font-size: 13px; color: #dc2626; min-height: 18px; margin-bottom: 8px; }
.success-msg { font-size: 13px; color: var(--blue-dark); min-height: 18px; margin-bottom: 8px; }

/* ---- MEMBER AREA ---- */
.member-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.75rem; }
.member-welcome { display: flex; align-items: center; gap: 14px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--blue-light); color: var(--blue-dark); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 16px; flex-shrink: 0; }
.m-name { font-size: 17px; font-weight: 600; color: var(--blue-deeper); }
.m-detail { font-size: 13px; color: var(--text-muted); }
.btn-logout { font-size: 13px; color: var(--text-muted); background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 14px; cursor: pointer; }
.btn-logout:hover { background: #f9fafb; }

.materials-list { display: flex; flex-direction: column; gap: 10px; }
.material-row { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; display: flex; align-items: center; gap: 14px; }
.mat-icon { width: 42px; height: 42px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.mat-icon.pdf { background: #FEF3EE; }
.mat-icon.link { background: var(--blue-light); }
.mat-body { flex: 1; }
.mat-title { font-size: 15px; font-weight: 500; margin-bottom: 2px; color: var(--blue-deeper); }
.mat-desc { font-size: 13px; color: var(--text-muted); }
.mat-action { font-size: 13px; color: var(--blue); text-decoration: none; white-space: nowrap; font-weight: 500; }
.mat-action:hover { text-decoration: underline; }

/* ---- ADMIN ---- */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 2rem; border-bottom: 1px solid var(--border); }
.admin-tab { padding: 10px 20px; border: none; background: none; font-size: 15px; cursor: pointer; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: 'DM Sans', sans-serif; transition: color 0.15s; }
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--blue-dark); border-bottom-color: var(--blue); font-weight: 500; }

.admin-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.admin-section-header h3 { font-size: 16px; font-weight: 600; color: var(--blue-deeper); }
.btn-add { padding: 7px 16px; background: var(--blue); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 14px; cursor: pointer; font-family: 'DM Sans', sans-serif; }
.btn-add:hover { background: var(--blue-dark); }

.student-row { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.s-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--blue-light); color: var(--blue-dark); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.s-info { flex: 1; }
.s-name { font-size: 15px; font-weight: 500; color: var(--blue-deeper); }
.s-detail { font-size: 13px; color: var(--text-muted); }
.btn-view-mats { font-size: 13px; color: var(--blue-dark); background: var(--blue-light); border: none; border-radius: var(--radius-sm); padding: 6px 14px; cursor: pointer; }
.btn-view-mats:hover { background: var(--blue-mid); }

.admin-form-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; max-width: 560px; }

/* ---- MODAL ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 1rem; }
.modal-box { background: var(--white); border-radius: var(--radius); padding: 2rem; width: 100%; max-width: 440px; }
.modal-box h3 { font-size: 17px; font-weight: 600; margin-bottom: 1.25rem; color: var(--blue-deeper); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 1.25rem; }
.btn-sec { padding: 8px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: none; font-size: 14px; cursor: pointer; font-family: 'DM Sans', sans-serif; }
.btn-sec:hover { background: #f9fafb; }

/* ---- EMPTY STATE ---- */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); font-size: 15px; }

/* ---- FOOTER ---- */
.footer { border-top: 1px solid var(--border); padding: 1.5rem; text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 4rem; background: var(--white); }

/* ---- CONTENT CARDS ---- */
.texto-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; }
.texto-card h4 { font-size: 16px; font-weight: 600; margin: 8px 0; color: var(--blue-deeper); }
.texto-card p { font-size: 15px; color: var(--text-muted); line-height: 1.7; }
.video-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; }
.video-card h4 { font-size: 16px; font-weight: 600; margin: 8px 0; color: var(--blue-deeper); }
.video-card p { font-size: 15px; color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius-sm); }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* ---- CONTENT ADMIN ---- */
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 800px) { .content-grid { grid-template-columns: 1fr; } }
.content-row { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 8px; }
.content-row-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.content-row-title { font-size: 14px; font-weight: 500; margin-bottom: 8px; color: var(--blue-deeper); }
.content-row-actions { display: flex; gap: 8px; }
.btn-delete { font-size: 13px; color: #dc2626; background: #FEF2F2; border: none; border-radius: var(--radius-sm); padding: 6px 14px; cursor: pointer; }
.btn-delete:hover { background: #FEE2E2; }
.badge-destaque { font-size: 11px; background: #FEF9C3; color: #854D0E; padding: 2px 8px; border-radius: 20px; }

/* ---- TEXTAREA ---- */
textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; font-family: 'DM Sans', sans-serif; resize: vertical; background: var(--white); color: var(--text); transition: border-color 0.15s; }
textarea:focus { outline: none; border-color: var(--blue); }

/* ---- RESPONSIVE ---- */
@media (max-width: 700px) {
  .hero { grid-template-columns: 1fr; padding: 3rem 1.25rem 2rem; }
  .hero-visual { display: none; }
  .hero-title { font-size: 2.2rem; }
  .nav-links .nav-link { display: none; }
  .hero-photo { width: 100%; height: 280px; border-radius: var(--radius); }
}
