/*
Theme Name: Islahiya School
Theme URI: https://www.islahiyaschool.com/
Author: Islahiya English Medium Higher Secondary School
Description: Website theme for Islahiya English Medium Higher Secondary School, Varangode, Malappuram. All text and photos are edited from the dashboard: Appearance > Customize > Islahiya website, Posts (news), Academic stages, Campus facilities and FAQs. Includes the contact form (saved under Enquiries) and the Section Reports staff login.
Version: 1.3.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: islahiya
*/

/* Main design is in assets/site.css. Below: parts that only the WordPress version needs. */

/* contact page */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding: 80px 0 64px; }
.school-name { font-size: 32px; font-weight: 800; line-height: 1.25; letter-spacing: -.5px; margin: 0 0 32px; }
.big { color: var(--ink); font-size: 26px; font-weight: 700; line-height: 1.4; letter-spacing: -.3px; margin: 0 0 28px; font-family: var(--head); overflow-wrap: anywhere; }
.big a { color: inherit; text-decoration: none; }
.big a:hover { color: var(--blue); }
.form-title { font-size: 44px; line-height: 1.15; font-weight: 600; margin: 0 0 32px; letter-spacing: -1px; }
.form-title span { display: block; color: var(--blue); }
#contactForm { display: grid; gap: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.f input, .f textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.f textarea { min-height: 140px; resize: vertical; }
.f input:focus, .f textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; background: #fff; }
.f input::placeholder, .f textarea::placeholder { color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#contactForm .btn { justify-self: start; border: none; cursor: pointer; }
#contactForm .btn:disabled { opacity: .6; cursor: wait; }
.form-msg { padding: 12px 14px; border-radius: 8px; font-size: 15px; }
.form-msg.ok { background: #e7f5ec; color: #1d7a46; }
.form-msg.err { background: #fbeaea; color: #b3261e; }
.form-msg.info { background: var(--bg-tint); color: var(--ink); }
.map-wide { padding-bottom: 80px; }
.map-wide iframe { width: 100%; height: 380px; border: 0; border-radius: var(--radius); display: block; background: var(--bg-tint); }

/* section reports page */
.page-template-section-reports .page-hero { padding: 40px 24px 46px; }
.reports-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px 56px; }
#reports-frame { width: 100%; height: 900px; border: 0; display: block; }
.admin-tip { background: var(--gold-soft); border: 1px solid #F0D58A; color: var(--ink); border-radius: 10px; padding: 12px 16px; font-size: 15px; }

/* cards written in the dashboard can have more than one paragraph */
.stage .body p + p, .place .body p + p { margin-top: .6em; }
.faq details p + p { margin-top: -8px; }
.principal .msg p:last-child { margin-bottom: 0; }

/* news cards with photos */
.news-item { overflow: hidden; }
.news-item .thumb { display: block; margin: -22px -22px 16px; aspect-ratio: 16 / 10; background: var(--bg-tint); }
.news-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-item h3 a { color: var(--ink); text-decoration: none; }
.news-item h3 a:hover { color: var(--blue); }
.news-item .more { margin-top: 4px; }
.empty { text-align: center; color: var(--muted); font-size: 17px; }
.pager { margin-top: 40px; }
.pager .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pager .page-numbers { display: inline-block; min-width: 42px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; text-align: center; text-decoration: none; color: var(--navy); font-weight: 600; }
.pager .page-numbers.current { background: var(--navy); border-color: var(--navy); color: #fff; }
.pager .screen-reader-text { position: absolute; left: -9999px; }

/* news item and ordinary pages */
.page-hero .kicker { color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .6px; font-size: 14px; margin: 0 0 8px; }
.single .page-hero h1 { font-size: clamp(28px, 4vw, 46px); max-width: 900px; margin: 0 auto; }
.entry-wrap { max-width: 860px; padding-top: 56px; padding-bottom: 80px; }
.entry-photo { margin: 0 0 32px; border-radius: var(--radius); overflow: hidden; }
.entry-photo img { width: 100%; height: auto; }
.entry { font-size: 17px; line-height: 1.75; overflow-wrap: break-word; }
.entry h2 { font-size: 28px; margin-top: 1.4em; }
.entry h3 { font-size: 22px; margin-top: 1.2em; }
.entry img { height: auto; border-radius: 10px; }
.entry figure { margin: 1.5em 0; }
.entry figcaption { color: var(--muted); font-size: 14px; text-align: center; margin-top: 6px; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 4px solid var(--gold); font-family: var(--head); font-weight: 600; color: var(--ink); }
.entry table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 15px; }
.entry th, .entry td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.entry th { background: var(--bg-tint); color: var(--ink); }
.entry .wp-block-gallery { gap: 12px; }
.entry .wp-block-button__link { background: var(--navy); color: #fff; border-radius: 999px; padding: 12px 24px; text-decoration: none; }
.entry .wp-block-file a { font-weight: 600; }
.entry .alignwide { max-width: none; }
.contact .entry { font-size: 16px; color: var(--muted); }
.entry-nav { display: flex; justify-content: space-between; gap: 20px; margin: 40px 0 28px; padding-top: 24px; border-top: 1px solid var(--line); font-weight: 600; }
.entry-nav span:last-child { text-align: right; }
.entry-nav a { text-decoration: none; }

@media (max-width: 860px) {
	.contact { grid-template-columns: minmax(0, 1fr); gap: 44px; padding: 48px 0 40px; }
	.school-name { font-size: 26px; }
	.big { font-size: 21px; }
	.form-title { font-size: 34px; }
	.row2 { grid-template-columns: minmax(0, 1fr); }
	#contactForm .btn { justify-self: stretch; }
	.map-wide iframe { height: 300px; }
	.entry-wrap { padding-top: 36px; padding-bottom: 56px; }
	.entry-nav { flex-direction: column; }
	.entry-nav span:last-child { text-align: left; }
}

/* ---------------- version 1.1: menu drop-down, social icons, gallery, department ---------------- */
.nav-item { position: relative; display: flex; }
.nav .has-sub > a::after { content: ""; display: inline-block; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); margin: 0 0 3px 7px; opacity: .6; }
.nav .sub { position: absolute; top: 100%; left: 0; min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: none; z-index: 60; }
.nav .sub a { display: block; white-space: nowrap; }
.nav .has-sub:hover .sub, .nav .has-sub:focus-within .sub, .nav .has-sub.tapped .sub { display: block; }
@media (max-width: 1180px) {
	.nav-item { display: block; position: static; }
	.header.open .nav .has-sub > a { display: block; }
	.header.open .nav .sub { position: static; display: block; min-width: 0; border: 0; box-shadow: none; padding: 0; border-radius: 0; }
	.header.open .nav .sub a { padding-left: 26px !important; font-weight: 500; }
	.nav .has-sub > a::after { display: none; }
}

.social { display: inline-flex; gap: 8px; align-items: center; }
.social a { display: inline-grid; place-items: center; }
.social svg { margin: 0 !important; }
.tb-social a { width: 26px; height: 26px; }
.tb-social svg { width: 16px !important; height: 16px !important; vertical-align: 0 !important; }
.f-social { margin-top: 4px; gap: 10px; }
.f-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; }
.f-social a:hover { background: var(--gold); color: var(--navy-deep); }
.f-social svg, .c-social svg { width: 19px; height: 19px; }
.c-social { gap: 12px; }
.c-social a { width: 48px; height: 48px; border-radius: 50%; background: var(--bg-tint); color: var(--navy) !important; }
.c-social a:hover { background: var(--navy); color: #fff !important; }
@media (max-width: 640px) {
	.topbar .container { justify-content: space-between; }
	.topbar .tb-right { display: flex; }
	.topbar .tb-right > span:not(.social), .topbar .tb-right > a { display: none; }
}

/* Communicative English on the home page */
.ce { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.ce .photo { aspect-ratio: 4 / 3; }
.ce-text { font-size: 17px; }
.ce-updates { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; }
.ce-updates a { display: flex; gap: 14px; align-items: baseline; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; }
.ce-updates a:hover { border-color: var(--navy); }
.ce-updates span { flex: 0 0 auto; color: var(--gold); font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }

/* department page */
.dept-intro { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: start; }
.dept-intro.no-photo { grid-template-columns: minmax(0, 860px); justify-content: center; }
.dept-photo { aspect-ratio: 4 / 3; }

/* photo gallery */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.photo-grid .tile { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg-tint); }
.photo-grid .tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.photo-grid .tile:hover img { transform: scale(1.05); }
.album-text { max-width: 860px; margin: 0 auto 32px; }
.album-back { text-align: center; margin-top: 40px; }
.albums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.album { display: block; text-decoration: none; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.album:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.album .cover { display: block; position: relative; aspect-ratio: 3 / 2; background: linear-gradient(135deg, var(--bg-tint), #DCE5F1); }
.album .cover img { width: 100%; height: 100%; object-fit: cover; }
.album .count { position: absolute; right: 12px; bottom: 12px; background: rgba(19, 34, 63, .8); color: #fff; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 4px 12px; }
.album .meta { display: block; padding: 16px 18px 18px; }
.album .meta b { display: block; color: var(--ink); font: 700 18px/1.3 var(--head); }
.album .meta small { color: var(--muted); font-size: 14px; }

/* lightbox */
html.lb-on { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 1000; background: rgba(8, 14, 28, .94); display: none; align-items: center; justify-content: center; }
.lb.open { display: flex; }
.lb figure { margin: 0; max-width: 92vw; max-height: 92vh; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; }
.lb img { max-width: 92vw; max-height: 82vh; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lb figcaption { color: #DCE4F2; margin-top: 12px; display: flex; gap: 16px; font-size: 15px; text-align: center; }
.lb-count { color: #8FA0BF; }
.lb button { position: absolute; background: rgba(255, 255, 255, .1); color: #fff; border: 0; border-radius: 50%; width: 52px; height: 52px; font-size: 34px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb button:hover { background: rgba(255, 255, 255, .22); }
.lb-close { top: 16px; right: 16px; font-size: 30px !important; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb.single .lb-prev, .lb.single .lb-next { display: none; }

@media (max-width: 1100px) {
	.photo-grid { grid-template-columns: repeat(3, 1fr); }
	.albums { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
	.ce, .dept-intro { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.dept-photo { order: -1; }
	.photo-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.home-grid .tile:nth-child(n+7) { display: none; }
	.albums { grid-template-columns: minmax(0, 1fr); }
	.lb button { width: 44px; height: 44px; font-size: 28px; }
	.lb-prev { left: 6px; } .lb-next { right: 6px; }
}

/* ---------------- version 1.2: departments & activities cards on the home page ---------------- */
.depts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.dept-card { position: relative; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.dept-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.dept-card .dept-link { position: absolute; inset: 0; z-index: 1; }
.dept-card .photo { aspect-ratio: 16 / 10; border-radius: 0; }
.dept-card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.dept-card h3 { font-size: 20px; margin-bottom: 6px; }
.dept-card p { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.dept-card .latest { position: relative; z-index: 2; display: block; background: var(--bg-soft); border-radius: 10px; padding: 10px 12px; font-size: 14.5px; font-weight: 600; color: var(--ink); text-decoration: none; margin-bottom: 14px; }
.dept-card .latest:hover { background: var(--bg-tint); }
.dept-card .latest span { display: block; color: var(--gold); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.dept-card .more { margin-top: auto; font-weight: 700; color: var(--blue); }
@media (max-width: 1100px) { .depts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .depts { grid-template-columns: minmax(0, 1fr); } }

/* ---------------- version 1.3: coming programmes ---------------- */
.news-item.is-upcoming { box-shadow: 0 0 0 2px var(--gold), var(--shadow-sm); }
.news-item .date.upcoming { display: inline-block; align-self: flex-start; background: var(--gold); color: var(--navy-deep); padding: 4px 10px; border-radius: 999px; font-size: 12px; letter-spacing: .4px; }
.dept-card .latest span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
