/*
 Theme Name:   Astra Child - The Physics Teacher
 Theme URI:    https://thephysicsteacher.in
 Description:  Child theme of Astra with custom homepage design for The Physics Teacher
 Author:       Sandeep
 Template:     astra
 Version:      1.1.0
 Text Domain:  astra-child
*/

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root{
  --tpt-navy:#16233F;
  --tpt-navy-deep:#0E1830;
  --tpt-chalk:#F6F4EE;
  --tpt-gold:#E3A23D;
  --tpt-teal:#3C8079;
  --tpt-ink:#1C2027;
  --tpt-line: rgba(246,244,238,0.16);
}

/* Scope everything under .tpt-page so it never leaks into the rest of the Astra site */
.tpt-page{
  font-family:'Inter', sans-serif;
  color:var(--tpt-ink);
  background:var(--tpt-chalk);
  line-height:1.5;
}
.tpt-page h1, .tpt-page h2, .tpt-page h3{
  font-family:'Source Serif 4', serif; font-weight:600; letter-spacing:-0.01em;
}
.tpt-mono{font-family:'IBM Plex Mono', monospace;}
.tpt-page a{color:inherit; text-decoration:none;}
.tpt-wrap{max-width:1100px; margin:0 auto; padding:0 32px;}

/* NAV */
.tpt-nav{background:var(--tpt-navy-deep); color:var(--tpt-chalk); padding:18px 0; position:relative; z-index:100;}
.tpt-nav .tpt-wrap{display:flex; justify-content:space-between; align-items:center;}
.tpt-brand{font-family:'Source Serif 4', serif; font-size:20px; font-weight:700; letter-spacing:0.01em;}
.tpt-brand span{color:var(--tpt-gold);}
.tpt-navlinks{display:flex; gap:28px; font-size:14px; font-weight:500; list-style:none; margin:0; padding:0;}
.tpt-navlinks li{display:inline-block;}
.tpt-navlinks a{opacity:0.85;}
.tpt-navlinks a:hover{opacity:1; color:var(--tpt-gold);}
.tpt-navlinks a:focus-visible{outline:2px solid var(--tpt-gold); outline-offset:4px;}

/* HERO */
.tpt-hero{background:var(--tpt-navy); color:var(--tpt-chalk); padding:90px 0 110px; position:relative; overflow:hidden;}
.tpt-hero .tpt-wrap{position:relative; z-index:2; display:grid; grid-template-columns:1.1fr 0.9fr; gap:50px; align-items:center;}
.tpt-eyebrow{font-family:'IBM Plex Mono', monospace; font-size:12px; letter-spacing:0.14em; text-transform:uppercase; color:var(--tpt-gold); margin-bottom:18px; display:block;}
.tpt-hero h1{font-size:44px; line-height:1.12; margin-bottom:20px;}
.tpt-hero h1 em{font-style:normal; color:var(--tpt-gold);}

/* FIX: Astra's global heading color overrides our inherited chalk color
   on h1/h2 with higher specificity, making headlines on dark backgrounds
   nearly invisible. Force it back explicitly wherever a heading sits on
   a dark (navy) background. */
.tpt-hero h1,
.tpt-subhero h1,
.tpt-cta-band h2,
.tpt-nav .tpt-brand{
  color:var(--tpt-chalk) !important;
}
.tpt-hero h1 em{
  color:var(--tpt-gold) !important;
}
.tpt-hero p.tpt-lede{font-size:17px; opacity:0.82; max-width:46ch; margin-bottom:34px;}
.tpt-cta-row{display:flex; gap:16px; align-items:center; flex-wrap:wrap;}
.tpt-btn{display:inline-flex; align-items:center; gap:8px; padding:14px 26px; border-radius:3px; font-weight:600; font-size:15px; transition:transform .15s ease;}
.tpt-btn-primary{background:var(--tpt-gold); color:var(--tpt-navy-deep);}
.tpt-btn-primary:hover{transform:translateY(-2px);}
.tpt-btn-ghost{border:1px solid var(--tpt-line); color:var(--tpt-chalk);}
.tpt-btn-ghost:hover{border-color:var(--tpt-gold); color:var(--tpt-gold);}

.tpt-trajectory-box{position:relative;}
.tpt-trajectory-box svg{width:100%; height:auto; display:block;}
.tpt-stat-tag{
  display:inline-block; margin-bottom:16px; background:var(--tpt-navy-deep); border:1px solid var(--tpt-line);
  padding:10px 14px; border-radius:4px; font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--tpt-chalk);
}

/* RESULTS STRIP */
.tpt-results{background:var(--tpt-navy-deep); color:var(--tpt-chalk); padding:40px 0; border-top:1px solid var(--tpt-line); border-bottom:1px solid var(--tpt-line);}
.tpt-results .tpt-wrap{display:flex; justify-content:space-between; flex-wrap:wrap; gap:24px;}
.tpt-stat .tpt-num{font-family:'Source Serif 4', serif; font-size:36px; color:var(--tpt-gold); font-weight:700; line-height:1;}
.tpt-stat .tpt-label{font-size:13px; opacity:0.75; margin-top:6px; font-family:'IBM Plex Mono', monospace;}

/* SECTIONS */
.tpt-section{padding:90px 0;}
.tpt-section-head{max-width:60ch; margin-bottom:48px;}
.tpt-section-head .tpt-eyebrow{color:var(--tpt-teal);}
.tpt-section-head h2{font-size:32px; color:var(--tpt-navy);}
.tpt-section-head p{font-size:16px; color:#444; margin-top:14px;}

.tpt-course-grid{display:grid; grid-template-columns:repeat(3, 1fr); gap:24px;}
.tpt-course-grid-4{grid-template-columns:repeat(auto-fit, minmax(230px, 1fr));}
.tpt-course-grid-4 .tpt-course-card:nth-child(4){border-top-color:var(--tpt-teal);}
.tpt-course-card{background:#fff; border:1px solid rgba(22,35,63,0.1); border-radius:6px; padding:28px; position:relative; border-top:3px solid var(--tpt-teal);}
.tpt-course-card:nth-child(2){border-top-color:var(--tpt-gold);}
.tpt-course-card:nth-child(3){border-top-color:var(--tpt-navy);}
.tpt-course-card h3{font-size:19px; color:var(--tpt-navy); margin-bottom:10px;}
.tpt-course-card p{font-size:14px; color:#555; margin-bottom:18px;}
.tpt-course-card .tpt-tag{font-family:'IBM Plex Mono', monospace; font-size:11px; text-transform:uppercase; letter-spacing:0.08em; color:var(--tpt-teal); display:block; margin-bottom:12px;}
.tpt-course-card a{font-size:14px; font-weight:600; color:var(--tpt-navy); border-bottom:1px solid var(--tpt-gold);}

/* TESTIMONIALS */
.tpt-testimonials{background:#EFECE2;}
.tpt-test-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:24px;}
.tpt-test-card{background:var(--tpt-chalk); padding:26px; border-radius:6px;}
.tpt-test-card p{font-size:14.5px; color:#333; font-style:italic; margin-bottom:16px;}
.tpt-test-card .tpt-who{font-family:'IBM Plex Mono', monospace; font-size:12px; color:var(--tpt-teal); font-style:normal;}

/* CTA BAND + FOOTER */
.tpt-cta-band{background:var(--tpt-navy); color:var(--tpt-chalk); padding:70px 0; text-align:center;}
.tpt-cta-band h2{font-size:30px; margin-bottom:16px;}
.tpt-cta-band p{opacity:0.8; margin-bottom:30px;}

.tpt-footer{background:var(--tpt-navy-deep); color:var(--tpt-chalk); padding:32px 0; font-size:13px; opacity:0.7;}
.tpt-footer .tpt-wrap{display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px;}

/* SUB-PAGE HERO (Courses / Contact) - shorter than homepage hero */
.tpt-subhero{background:var(--tpt-navy); color:var(--tpt-chalk); padding:64px 0 60px;}
.tpt-subhero .tpt-wrap{max-width:70ch;}
.tpt-subhero h1{font-size:36px; line-height:1.15; margin-bottom:14px;}
.tpt-subhero p{font-size:16px; opacity:0.82;}

/* COURSE DETAIL SECTIONS (Courses page) */
.tpt-course-detail{
  background:#fff; border:1px solid rgba(22,35,63,0.1); border-radius:6px;
  padding:36px; margin-bottom:24px; border-left:4px solid var(--tpt-teal);
}
.tpt-course-detail:nth-of-type(2){border-left-color:var(--tpt-gold);}
.tpt-course-detail:nth-of-type(3){border-left-color:var(--tpt-navy);}
.tpt-course-detail:nth-of-type(4){border-left-color:var(--tpt-teal);}
.tpt-course-detail-head{display:flex; justify-content:space-between; align-items:flex-start; gap:20px; flex-wrap:wrap; margin-bottom:18px;}
.tpt-course-detail h3{font-size:22px; color:var(--tpt-navy);}
.tpt-course-detail .tpt-format-pill{
  font-family:'IBM Plex Mono', monospace; font-size:12px; background:var(--tpt-chalk);
  border:1px solid rgba(22,35,63,0.12); padding:6px 12px; border-radius:20px; white-space:nowrap;
}
.tpt-course-detail p.tpt-desc{color:#444; font-size:15px; margin-bottom:18px;}
.tpt-covered{display:grid; grid-template-columns:1fr 1fr; gap:8px 24px; margin-bottom:22px; padding:0; list-style:none;}
.tpt-covered li{font-size:14px; color:#333; padding-left:18px; position:relative;}
.tpt-covered li::before{content:"—"; position:absolute; left:0; color:var(--tpt-teal); font-family:'IBM Plex Mono', monospace;}

/* CONTACT PAGE */
.tpt-contact-grid{display:grid; grid-template-columns:0.9fr 1.1fr; gap:48px; align-items:start;}
.tpt-contact-info h3{font-size:19px; color:var(--tpt-navy); margin-bottom:16px;}
.tpt-contact-method{display:flex; gap:14px; align-items:flex-start; margin-bottom:20px;}
.tpt-contact-method .tpt-icon{
  width:38px; height:38px; border-radius:6px; background:var(--tpt-navy); color:var(--tpt-chalk);
  display:flex; align-items:center; justify-content:center; font-family:'IBM Plex Mono', monospace;
  font-size:13px; flex-shrink:0;
}
.tpt-contact-method .tpt-label{font-size:13px; text-transform:uppercase; letter-spacing:0.06em; color:#777; font-family:'IBM Plex Mono', monospace; margin-bottom:2px;}
.tpt-contact-method a, .tpt-contact-method span.tpt-value{font-size:15px; font-weight:600; color:var(--tpt-navy);}

.tpt-form-card{background:#fff; border:1px solid rgba(22,35,63,0.1); border-radius:6px; padding:32px;}
.tpt-form-card .tpt-form-note{font-size:13px; color:#888; margin-top:14px;}
.tpt-field{margin-bottom:18px;}
.tpt-field label{display:block; font-size:13px; font-weight:600; color:var(--tpt-navy); margin-bottom:6px;}
.tpt-field input, .tpt-field select, .tpt-field textarea{
  width:100%; padding:12px 14px; border:1px solid rgba(22,35,63,0.15); border-radius:4px;
  font-family:'Inter', sans-serif; font-size:14px; color:var(--tpt-ink); background:var(--tpt-chalk);
}
.tpt-field textarea{min-height:110px; resize:vertical;}
.tpt-field input:focus, .tpt-field select:focus, .tpt-field textarea:focus{outline:2px solid var(--tpt-teal); outline-offset:1px;}

/* CONTACT FORM 7 styling - CF7 renders its own markup (wpcf7-form, wpcf7-form-control,
   wpcf7-submit) which we restyle here to match the rest of the site instead of
   showing WordPress's unstyled defaults. */
.tpt-form-card .wpcf7-form p{margin-bottom:18px;}
.tpt-form-card .wpcf7-form label{display:block; font-size:13px; font-weight:600; color:var(--tpt-navy); margin-bottom:6px;}
.tpt-form-card .wpcf7-form-control{
  width:100%; padding:12px 14px; border:1px solid rgba(22,35,63,0.15); border-radius:4px;
  font-family:'Inter', sans-serif; font-size:14px; color:var(--tpt-ink); background:var(--tpt-chalk);
  box-sizing:border-box;
}
.tpt-form-card textarea.wpcf7-form-control{min-height:110px; resize:vertical;}
.tpt-form-card .wpcf7-form-control:focus{outline:2px solid var(--tpt-teal); outline-offset:1px;}
.tpt-form-card input[type="submit"].wpcf7-submit{
  width:auto; background:var(--tpt-gold); color:var(--tpt-navy-deep); border:none;
  padding:14px 26px; border-radius:3px; font-weight:600; font-size:15px; cursor:pointer;
}
.tpt-form-card input[type="submit"].wpcf7-submit:hover{opacity:0.92;}
.tpt-form-card .wpcf7-not-valid-tip{color:#c0392b; font-size:12px; margin-top:4px;}
.tpt-form-card .wpcf7-response-output{
  margin-top:16px; padding:12px 14px; border-radius:4px; font-size:13px;
  border:1px solid rgba(22,35,63,0.15);
}
.tpt-form-card .wpcf7-mail-sent-ok{border-color:var(--tpt-teal); color:var(--tpt-teal);}
.tpt-form-card .wpcf7-validation-errors,
.tpt-form-card .wpcf7-mail-sent-ng{border-color:#c0392b; color:#c0392b;}
.tpt-form-card .wpcf7-spinner{margin-left:10px;}

/* MOBILE NAV TOGGLE (hamburger) - hidden on desktop, shown on mobile */
.tpt-nav-toggle{
  display:none; flex-direction:column; justify-content:center; gap:5px;
  width:34px; height:34px; background:transparent; border:none; cursor:pointer; padding:0;
}
.tpt-nav-toggle span{display:block; width:26px; height:2px; background:var(--tpt-chalk); border-radius:2px; transition:transform .2s ease, opacity .2s ease;}
.tpt-nav-toggle-open span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.tpt-nav-toggle-open span:nth-child(2){opacity:0;}
.tpt-nav-toggle-open span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

@media (max-width:820px){
  .tpt-hero .tpt-wrap{grid-template-columns:1fr;}
  .tpt-course-grid, .tpt-test-grid{grid-template-columns:1fr;}
  .tpt-hero h1{font-size:32px;}
  .tpt-contact-grid{grid-template-columns:1fr;}
  .tpt-covered{grid-template-columns:1fr;}
  .tpt-article{grid-template-columns:1fr;}

  .tpt-nav-toggle{display:flex;}
  .tpt-navlinks{
    display:none; position:absolute; top:100%; left:0; right:0;
    flex-direction:column; gap:0; background:var(--tpt-navy-deep);
    border-top:1px solid var(--tpt-line); padding:8px 0;
  }
  .tpt-navlinks.tpt-nav-open{display:flex;}
  .tpt-navlinks li{width:100%;}
  .tpt-navlinks li a{display:block; padding:14px 32px;}
}


/* ARTICLE PAGE (How to Learn Physics) */
.tpt-article{display:grid; grid-template-columns:0.75fr 0.25fr; gap:48px;}
.tpt-article-body h2{font-size:24px; color:var(--tpt-navy); margin:36px 0 14px;}
.tpt-article-body h2:first-child{margin-top:0;}
.tpt-article-body p{font-size:16px; color:#333; margin-bottom:16px; max-width:68ch;}
.tpt-article-body ul{margin:0 0 20px 20px; max-width:68ch;}
.tpt-article-body li{font-size:15px; color:#333; margin-bottom:8px;}
.tpt-article-aside{background:#fff; border:1px solid rgba(22,35,63,0.1); border-radius:6px; padding:26px; height:fit-content; position:sticky; top:24px;}
.tpt-article-aside h4{font-family:'IBM Plex Mono', monospace; font-size:12px; text-transform:uppercase; letter-spacing:0.06em; color:var(--tpt-teal); margin-bottom:14px;}
.tpt-article-aside p{font-size:14px; color:#444; margin-bottom:18px;}

/* NEWS / UPDATES LISTING */
.tpt-news-list{display:flex; flex-direction:column; gap:20px;}
.tpt-news-item{
  background:#fff; border:1px solid rgba(22,35,63,0.1); border-radius:6px;
  padding:26px 28px; display:flex; justify-content:space-between; gap:24px; align-items:flex-start; flex-wrap:wrap;
}
.tpt-news-item .tpt-news-date{
  font-family:'IBM Plex Mono', monospace; font-size:12px; color:var(--tpt-teal);
  min-width:110px; padding-top:4px;
}
.tpt-news-item .tpt-news-body{flex:1; min-width:220px;}
.tpt-news-item h3{font-size:18px; color:var(--tpt-navy); margin-bottom:8px;}
.tpt-news-item h3 a{color:inherit;}
.tpt-news-item p{font-size:14.5px; color:#555; margin-bottom:0;}
.tpt-news-empty{background:#fff; border:1px dashed rgba(22,35,63,0.2); border-radius:6px; padding:40px; text-align:center; color:#777;}
.tpt-news-pagination{margin-top:32px; display:flex; gap:12px; font-family:'IBM Plex Mono', monospace; font-size:13px;}
.tpt-news-pagination a{padding:8px 14px; border:1px solid rgba(22,35,63,0.15); border-radius:4px; color:var(--tpt-navy);}
.tpt-news-pagination a:hover{border-color:var(--tpt-gold);}
