/*
  Custom Training Templates (Landing + Detail)
  - Scoped under #aces-ct-root. Avoids conflicts with theme styles.
*/

#aces-ct-root { font-family: Arial, sans-serif; line-height: 1.6; color: #333; }
#aces-ct-root h1, #aces-ct-root h2, #aces-ct-root h3, #aces-ct-root h4, #aces-ct-root h5, #aces-ct-root h6 { font-family: 'Segoe UI', Tahoma, sans-serif; margin: 0 0 0.5em; }
#aces-ct-root p { margin: 0 0 1em; }
#aces-ct-root ul { padding-left: 1.2em; margin: 0 0 1em; }
#aces-ct-root li { margin-bottom: 0.5em; }
#aces-ct-root a { color: #0057b7; text-decoration: none; transition: color 0.15s ease, background-color 0.15s ease; }
#aces-ct-root a:hover, #aces-ct-root a:focus { text-decoration: underline; color: #003e86; }

/* Utility containers */
#aces-ct-root .container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Buttons */
#aces-ct-root .btn { display: inline-block; background: #28a745; color: #fff; padding: 12px 16px; margin-top: 12px; font-size: 1em; font-weight: bold; border: none; border-radius: 4px; cursor: pointer; text-decoration: none; transition: background 0.15s ease, transform 0.05s ease; }
#aces-ct-root .btn:hover, #aces-ct-root .btn:focus { background: #218838; text-decoration: none; }
#aces-ct-root .btn:active { transform: translateY(1px); }

/* Landing Template */
.aces-ct-landing .hero { position: relative; background: linear-gradient(rgba(0, 34, 76, 0.55), rgba(0, 34, 76, 0.55)), url('https://examprep.org/wp-content/uploads/2018/03/american-contractors-exam-services-state-page-header.jpg') center/cover no-repeat, #00224c; color: #fff; }
.aces-ct-landing .hero .wrap { max-width: 1200px; margin: 0 auto; padding: 40px 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.aces-ct-landing .hero .content { max-width: 700px; }
.aces-ct-landing .hero h1 { color: #fff; font-size: 2.2em; margin: 0 0 10px; }
.aces-ct-landing .hero p { font-size: 1.05em; color: #e8eef6; }

.aces-ct-landing .intro { text-align: center; margin-bottom: 2em; }
.aces-ct-landing .intro p { font-size: 1.1em; }
.aces-ct-landing .highlight { color: #28a745; font-weight: bold; }

.aces-ct-landing .search-section { margin: 2em 0; text-align: center; }
.aces-ct-landing .search-section select, .aces-ct-landing .search-section input[type="text"] { padding: 10px; font-size: 1em; margin: 5px; width: 200px; }
.aces-ct-landing .search-section button { padding: 10px 15px; font-size: 1em; background: #28a745; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.aces-ct-landing .search-section button:hover { background: #218838; }
.aces-ct-landing .courses-list { margin-top: 1em; text-align: left; max-width: 600px; margin-left: auto; margin-right: auto; }
.aces-ct-landing .courses-list ul { list-style-type: none; padding: 0; }
.aces-ct-landing .courses-list li { padding: 0; border: 1px solid #e5e9f2; margin-bottom: 6px; border-radius: 6px; overflow: hidden; background: #fff; }
.aces-ct-landing .courses-list li a { color: #003366; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; }
.aces-ct-landing .courses-list li a::after { content: "\2192"; color: #789; transition: transform 0.15s ease; }
.aces-ct-landing .courses-list li a:hover { background: #f0f6ff; text-decoration: none; }
.aces-ct-landing .courses-list li a:hover::after { transform: translateX(3px); color: #003366; }

.aces-ct-landing .benefits { display: flex; flex-wrap: wrap; justify-content: space-around; margin: 2em 0; }
.aces-ct-landing .benefit { flex: 1 1 250px; margin: 10px; padding: 15px; border: 1px solid #e0e0e0; border-radius: 4px; background: #f9f9f9; }
.aces-ct-landing .benefit h3 { font-size: 1.1em; margin-top: 0; color: #003366; }
.aces-ct-landing .benefit p { font-size: 0.95em; }

.aces-ct-landing .contact-form { background: #f7f7f7; padding: 20px; border-radius: 4px; max-width: 600px; margin: 2em auto; }
.aces-ct-landing .contact-form h2 { text-align: center; }
.aces-ct-landing .contact-form label { display: block; font-weight: bold; margin: 0.5em 0 0.2em; }
.aces-ct-landing .contact-form input, .aces-ct-landing .contact-form textarea { width: 100%; padding: 8px; margin-bottom: 1em; border: 1px solid #ccc; border-radius: 4px; }
.aces-ct-landing .contact-form textarea { resize: vertical; height: 80px; }
.aces-ct-landing .contact-form button { display: block; width: 100%; background: #003366; color: #fff; border: none; padding: 12px; font-size: 1em; border-radius: 4px; cursor: pointer; }
.aces-ct-landing .contact-form button:hover { background: #002850; }
.aces-ct-landing .contact-form .note { font-size: 0.9em; color: #555; text-align: center; }

.aces-ct-landing .cta-panel { max-width: 900px; margin: 24px auto; padding: 16px; border: 1px solid #e5e7eb; border-radius: 8px; background: #f9fafb; }
.aces-ct-landing .cta-panel h3 { margin: 0 0 8px; color: #003366; }
.aces-ct-landing .cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.aces-ct-landing .cta-actions .btn-secondary { display: inline-block; background: #003366; color: #fff; padding: 10px 14px; border-radius: 6px; text-decoration: none; font-weight: bold; }
.aces-ct-landing .cta-actions .btn-secondary:hover { background: #002850; }

/* Detail Template */
.aces-ct-detail .hero { position: relative; background: linear-gradient(rgba(0, 34, 76, 0.55), rgba(0, 34, 76, 0.55)), url('https://examprep.org/wp-content/uploads/2018/03/american-contractors-exam-services-state-page-header.jpg') center/cover no-repeat, url('https://examprep.org/wp-content/uploads/2017/12/american-contractors-exam-services-logo-small.jpg') center/contain no-repeat, #00224c; color: #fff; }
.aces-ct-detail .hero .wrap { max-width: 1200px; margin: 0 auto; padding: 40px 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.aces-ct-detail .hero .content { max-width: 760px; }
.aces-ct-detail .hero h1 { color: #fff; font-size: 2.0em; margin: 0 0 10px; }
.aces-ct-detail .hero p { font-size: 1.05em; color: #e8eef6; }

.aces-ct-detail .course-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.aces-ct-detail .course-header h1 { font-size: 1.8em; color: #003366; }
.aces-ct-detail .course-header .subtitle { font-size: 1em; color: #333; margin-top: 0.2em; }
.aces-ct-detail .course-info { margin-top: 15px; font-size: 0.95em; color: #555; }
.aces-ct-detail .course-info span { display: inline-block; margin-right: 15px; }
.aces-ct-detail .cta-button { display: inline-block; background: #28a745; color: #fff; padding: 10px 15px; margin: 15px 0; font-size: 1em; font-weight: bold; border: none; border-radius: 4px; cursor: pointer; text-decoration: none; }
.aces-ct-detail .cta-button:hover { background: #218838; }

.aces-ct-detail .accordion-section { border-top: 1px solid #ccc; }
.aces-ct-detail .accordion-section:last-of-type { border-bottom: 1px solid #ccc; }
.aces-ct-detail .accordion-header { background: #f7f7f7; cursor: pointer; padding: 10px; font-size: 1.1em; font-weight: bold; display: flex; align-items: center; justify-content: space-between; }
.aces-ct-detail .accordion-header:hover { background: #eaeaea; }
.aces-ct-detail .accordion-header::after { content: "＋"; font-size: 1.2em; }
.aces-ct-detail .accordion-header.active::after { content: "−"; }
.aces-ct-detail .accordion-content { display: none; padding: 10px 15px; background: #fcfcfc; }
.aces-ct-detail .accordion-content p, .aces-ct-detail .accordion-content ul { margin-top: 0; }
.aces-ct-detail .book-list li { margin-bottom: 0.3em; }

.aces-ct-detail .contact-form { background: #f7f7f7; padding: 15px; border-radius: 4px; }
.aces-ct-detail .accordion-section + .contact-form { margin-top: 24px; }
.aces-ct-detail .contact-form h3 { margin-top: 0; }
.aces-ct-detail .contact-form label { display: block; font-weight: bold; margin: 0.5em 0 0.2em; }
.aces-ct-detail .contact-form input, .aces-ct-detail .contact-form textarea { width: 100%; padding: 8px; box-sizing: border-box; margin-bottom: 1em; border: 1px solid #ccc; border-radius: 4px; }
.aces-ct-detail .contact-form textarea { resize: vertical; height: 100px; }
.aces-ct-detail .contact-form button { background: #003366; color: #fff; border: none; padding: 10px 20px; font-size: 1em; border-radius: 4px; cursor: pointer; }
.aces-ct-detail .contact-form button:hover { background: #002850; }
.aces-ct-detail .contact-form .note { font-size: 0.9em; color: #555; }

/* FAQ shared styles */
.aces-ct-landing .aces-faq, .aces-ct-detail .aces-faq { --brand:#003366; --ink:#333; --muted:#666; --line:#e5e7eb; --bg:#f9fafb; --accent:#28a745; font-family: Arial, sans-serif; color:var(--ink); }
.aces-ct-landing .aces-faq * , .aces-ct-detail .aces-faq * { box-sizing: border-box; }
.aces-ct-landing .aces-faq .faq-wrap, .aces-ct-detail .aces-faq .faq-wrap { max-width:900px;margin:32px auto;padding:0 16px; }
.aces-ct-landing .aces-faq h2#aces-faq-title, .aces-ct-detail .aces-faq h2#aces-faq-title { font-size:1.75rem;line-height:1.2;margin:0 0 12px;color:var(--brand); }
.aces-ct-landing .aces-faq .sub, .aces-ct-detail .aces-faq .sub { color:var(--muted);margin:0 0 20px;font-size:0.98rem; }
.aces-ct-landing .aces-faq .faq-list, .aces-ct-detail .aces-faq .faq-list { border:1px solid var(--line);border-radius:8px;background:#fff }
.aces-ct-landing .aces-faq .faq-item, .aces-ct-detail .aces-faq .faq-item { padding:14px 16px;border-top:1px solid var(--line) }
.aces-ct-landing .aces-faq .faq-item:first-child, .aces-ct-detail .aces-faq .faq-item:first-child { border-top:0 }
.aces-ct-landing .aces-faq .q, .aces-ct-detail .aces-faq .q { font-weight:700;color:var(--brand);margin:0 0 6px }
.aces-ct-landing .aces-faq .a, .aces-ct-detail .aces-faq .a { font-size:0.98rem;line-height:1.6 }
.aces-ct-landing .aces-faq .a p, .aces-ct-detail .aces-faq .a p { margin:0 0 10px }
.aces-ct-landing .aces-faq .a ul, .aces-ct-detail .aces-faq .a ul { margin:8px 0 12px 18px }

/* Responsive */
@media(max-width: 768px) {
  .aces-ct-detail .course-header { flex-direction: column; align-items: flex-start; }
  .aces-ct-detail .course-header h1 { font-size: 1.5em; }
  .aces-ct-detail .course-info span { display: block; margin: 5px 0; }
}
@media(max-width: 600px) {
  .aces-ct-landing .hero .wrap, .aces-ct-detail .hero .wrap { padding: 28px 16px; }
  .aces-ct-landing .hero h1 { font-size: 1.7em; }
  .aces-ct-detail .hero h1 { font-size: 1.6em; }
  .aces-ct-landing .benefits { flex-direction: column; }
  .aces-ct-landing .benefit { margin: 10px 0; }
  .aces-ct-landing .search-section select, .aces-ct-landing .search-section input[type="text"] { width: 100%; max-width: none; }
  .aces-ct-landing .search-section button { width: 100%; margin-top: 10px; }
}


