/*
Theme Name: RRU Research & Development
Theme URI: https://www.rru.ac.th/
Author: RDI RRU
Description: ธีมบล็อกสำหรับเว็บไซต์สถาบันวิจัยและพัฒนา มหาวิทยาลัยราชภัฏราชนครินทร์ แก้ไขข้อความ รูปภาพ เมนู ข่าว และเอกสารได้ผ่าน Site Editor
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: rru-rdi
License: GNU General Public License v2 or later
*/

:root {
  --rdi-navy: #071d42;
  --rdi-blue: #185bd8;
  --rdi-teal: #0aa6a6;
  --rdi-ink: #122035;
  --rdi-muted: #66758b;
  --rdi-line: #dce5ee;
  --rdi-soft: #f3f7fb;
  --rdi-white: #ffffff;
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
a { text-underline-offset: .2em; }
.wp-site-blocks { padding: 0; }
.rdi-shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto !important; }

.rdi-utility {
  background: var(--rdi-navy);
  color: #dceaff;
  font-size: .84rem;
}
.rdi-utility .wp-block-group { min-height: 38px; }
.rdi-utility a { color: inherit; text-decoration: none; opacity: .86; }
.rdi-utility a:hover { opacity: 1; }

.rdi-header {
  position: relative;
  z-index: 20;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid #e6edf4;
  box-shadow: 0 10px 30px rgba(24,52,91,.05);
}
.rdi-header-inner { min-height: 82px; }
.rdi-brand .wp-block-site-logo img { width: 58px; height: 58px; object-fit: contain; }
.rdi-brand .wp-block-site-title { margin: 0; color: #17457e; font-size: 1rem; font-weight: 800; }
.rdi-brand .wp-block-site-tagline { margin: 2px 0 0; color: #69809b; font-size: .72rem; }
.rdi-header .wp-block-navigation { font-size: .88rem; font-weight: 650; }
.rdi-header .wp-block-navigation-item__content { padding: .7rem .55rem; }
.rdi-header .wp-block-navigation__submenu-container { min-width: 250px !important; padding: .5rem !important; border: 1px solid #e5edf5 !important; border-radius: 0 0 14px 14px; box-shadow: 0 22px 50px rgba(20,46,85,.15); }
.rdi-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .7rem .75rem; border-radius: 8px; }

.rdi-hero {
  position: relative;
  overflow: hidden;
  min-height: 610px;
  color: white;
  background: radial-gradient(circle at 82% 24%, rgba(14,176,186,.40), transparent 24%), linear-gradient(120deg, #071d42 0%, #0b3782 53%, #1766cb 100%);
}
.rdi-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .11;
  background-image: linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to right, transparent, black 45%, black);
}
.rdi-hero::after { content: ""; position: absolute; width: 520px; height: 520px; right: -190px; bottom: -320px; border-radius: 50%; background: var(--rdi-teal); opacity: .2; }
.rdi-hero > .wp-block-group { position: relative; z-index: 2; min-height: 610px; }
.rdi-eyebrow { color: #63ddd7; font-size: .78rem; font-weight: 800; letter-spacing: .13em; }
.rdi-hero h1 { max-width: 760px; margin-top: .8rem; font-size: clamp(2.65rem, 4.2vw, 4.8rem); line-height: 1.12; letter-spacing: -.035em; }
.rdi-hero-copy { max-width: 730px; }
.rdi-hero-copy > p:not(.rdi-eyebrow) { max-width: 650px; color: #d7e7ff; font-size: 1.12rem; line-height: 1.85; }
.rdi-primary-button .wp-block-button__link { background: #fff; color: #0f4cac; box-shadow: 0 10px 28px rgba(0,0,0,.15); }
.rdi-outline-button .wp-block-button__link { border-color: rgba(255,255,255,.65); color: #fff; }
.rdi-hero-orb { width: 330px; min-height: 330px; margin-inline: auto !important; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: linear-gradient(145deg, rgba(255,255,255,.2), rgba(255,255,255,.07)); box-shadow: 0 30px 70px rgba(0,20,59,.28); backdrop-filter: blur(14px); }
.rdi-hero-orb h2 { margin: 0; font-family: Georgia, serif; font-size: 6rem; letter-spacing: -.08em; }
.rdi-hero-orb p { margin: 0; color: #aeeeed; }

.rdi-services { position: relative; z-index: 3; margin-top: -58px !important; padding-bottom: 85px; }
.rdi-section-head { padding: 25px 27px 22px; border-radius: 22px 22px 0 0; background: #fff; box-shadow: 0 18px 45px rgba(30,61,103,.12); }
.rdi-kicker { margin: 0 0 .5rem; color: #0a9697; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.rdi-section-head h2, .rdi-title-row h2 { margin: 0; color: #102a50; font-size: clamp(1.85rem, 3vw, 2.55rem); line-height: 1.25; }
.rdi-section-head > p { max-width: 420px; margin: 0; color: var(--rdi-muted); }
.rdi-service-grid { gap: 0 !important; overflow: hidden; border-radius: 0 0 22px 22px; background: #fff; box-shadow: 0 22px 55px rgba(30,61,103,.13); }
.rdi-service-card { min-height: 150px; padding: 28px 24px; border-top: 1px solid #edf1f5; border-right: 1px solid #edf1f5; }
.rdi-service-card:last-child { border-right: 0; }
.rdi-service-card h3 { margin: 0; color: #152b49; font-size: 1.25rem; }
.rdi-service-card p { margin: .4rem 0 0; color: #758398; font-size: .88rem; line-height: 1.5; }
.rdi-service-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: #e6f1ff; color: #185bd8; font-weight: 900; }

.rdi-news { padding: 0 0 100px; }
.rdi-title-row { margin-bottom: 30px; }
.rdi-title-row a { color: var(--rdi-blue); font-weight: 800; text-decoration: none; }
.rdi-query .wp-block-post-template { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.rdi-query .wp-block-post { overflow: hidden; margin: 0; background: #fff; border: 1px solid #e2eaf2; border-radius: 20px; box-shadow: 0 12px 35px rgba(30,60,100,.07); }
.rdi-query .wp-block-post-featured-image img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.rdi-query .wp-block-post > *:not(.wp-block-post-featured-image) { margin-inline: 24px; }
.rdi-query .wp-block-post-terms { margin-top: 22px; color: #0a8f90; font-size: .78rem; font-weight: 800; }
.rdi-query .wp-block-post-title { margin-top: 10px; font-size: 1.18rem; line-height: 1.5; }
.rdi-query .wp-block-post-title a { color: #153050; text-decoration: none; }
.rdi-query .wp-block-post-excerpt { color: #708095; font-size: .9rem; line-height: 1.7; }
.rdi-query .wp-block-post-date { margin-bottom: 24px; color: #8190a2; font-size: .82rem; }

.rdi-research { position: relative; overflow: hidden; padding-block: 92px; color: #fff; background: linear-gradient(120deg, #071c40, #0b3a84); }
.rdi-research::after { content: ""; position: absolute; inset: 0; opacity: .13; background: radial-gradient(circle at 70% 10%, #25c5c2 0 8%, transparent 30%), repeating-linear-gradient(45deg, transparent 0 18px, rgba(255,255,255,.08) 18px 19px); }
.rdi-research > .wp-block-group { position: relative; z-index: 2; }
.rdi-research h2 { color: #fff; font-size: clamp(2rem, 3.5vw, 3.5rem); line-height: 1.2; }
.rdi-research-copy > p:not(.rdi-kicker) { color: #ccddf6; line-height: 1.8; }
.rdi-research-links { gap: 14px !important; }
.rdi-research-link { min-height: 128px; padding: 24px; border: 1px solid rgba(255,255,255,.2); border-radius: 16px; background: rgba(255,255,255,.1); }
.rdi-research-link h3 { margin: 0; color: #fff; font-size: 1.05rem; }
.rdi-research-link p { margin: .55rem 0 0; color: #bcd0eb; font-size: .85rem; }

.rdi-documents { padding-block: 100px; background: #fff; }
.rdi-doc-grid { gap: 18px !important; }
.rdi-doc-card { overflow: hidden; border: 1px solid #e2e9f0; border-radius: 18px; background: #fff; }
.rdi-doc-card figure { margin: 0; overflow: hidden; background: #edf3f8; }
.rdi-doc-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.rdi-doc-card > .wp-block-group { padding: 20px; }
.rdi-doc-card h3 { min-height: 88px; margin: 8px 0 18px; color: #193451; font-size: 1rem; line-height: 1.55; }
.rdi-doc-card .wp-block-button__link { padding: 0; background: transparent; color: var(--rdi-blue); font-size: .86rem; font-weight: 800; }

.rdi-partners { padding-block: 38px; background: #f1f5f9; border-block: 1px solid #e1e8ef; color: #536075; }
.rdi-partners p { margin: 0; font-weight: 800; }

.rdi-footer { background: #071a34; color: #cbd9ea; }
.rdi-footer-main { padding-block: 68px; }
.rdi-footer h2, .rdi-footer h3 { color: #fff; }
.rdi-footer h2 { margin: .5rem 0 0; }.rdi-footer h3 { font-size: 1rem; }
.rdi-footer p, .rdi-footer a { color: #b9c9dd; font-size: .9rem; line-height: 1.7; }
.rdi-footer a { text-decoration: none; }
.rdi-footer-bottom { padding-block: 18px; border-top: 1px solid rgba(255,255,255,.09); color: #8799b1; font-size: .82rem; }

.rdi-single { padding-block: 70px; }
.rdi-single h1 { color: #102a50; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.25; }
.rdi-single .wp-block-post-featured-image img { width: 100%; max-height: 600px; object-fit: cover; border-radius: 20px; }
.rdi-single .entry-content { line-height: 1.85; }

@media (max-width: 900px) {
  .rdi-shell { width: min(100% - 28px, 700px); }
  .rdi-utility { display: none; }
  .rdi-header-inner { min-height: 72px; }
  .rdi-hero > .wp-block-group { min-height: auto; padding-block: 70px !important; }
  .rdi-hero .wp-block-columns, .rdi-research .wp-block-columns { flex-wrap: wrap !important; }
  .rdi-hero .wp-block-column, .rdi-research .wp-block-column { flex-basis: 100% !important; }
  .rdi-hero-orb { width: 260px; min-height: 260px; margin-top: 35px !important; }
  .rdi-hero-orb h2 { font-size: 4.8rem; }
  .rdi-service-grid { flex-wrap: wrap !important; }
  .rdi-service-grid > .wp-block-column { flex-basis: 50% !important; }
  .rdi-query .wp-block-post-template { grid-template-columns: repeat(2, 1fr); }
  .rdi-doc-grid { flex-wrap: wrap !important; }.rdi-doc-grid > .wp-block-column { flex-basis: 47% !important; }
}

@media (max-width: 600px) {
  .rdi-shell { width: calc(100% - 24px); }
  .rdi-brand .wp-block-site-tagline { display: none; }
  .rdi-hero h1 { font-size: 2.55rem; }
  .rdi-section-head { align-items: flex-start !important; }
  .rdi-service-grid > .wp-block-column { flex-basis: 100% !important; }
  .rdi-query .wp-block-post-template { grid-template-columns: 1fr; }
  .rdi-doc-grid > .wp-block-column { flex-basis: 100% !important; }
  .rdi-footer-main > .wp-block-columns { flex-wrap: wrap !important; }.rdi-footer-main .wp-block-column { flex-basis: 100% !important; }
}
