/*
Theme Name: Nordic Research Ltd
Description: Institutional innovation & technology transfer advisory theme
Version: 2.1
*/

/* ===============================
Design tokens
=============================== */

:root{
--accent:#6DA6E2;
--text:#1F2A36;
--muted:#5B6B7A;
--bg:#F4F7FA;
--card:#FFFFFF;
--rule:rgba(109,166,226,.35);
--shadow:0 12px 30px rgba(31,42,54,.08);
--radius:18px;
--max:1100px;
--read:760px;
}

*{ box-sizing:border-box; }

body{
margin:0;
background:var(--bg);
color:var(--text);
font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
font-size:15px;
line-height:1.65;
}

/* ===============================
Frame
=============================== */

.nr-frame{
max-width:var(--max);
margin:42px auto;
background:var(--card);
border:6px solid var(--accent);
box-shadow:var(--shadow);
}

/* ===============================
Header
=============================== */

.nr-header{
padding:26px 34px 18px;
border-bottom:3px solid var(--accent);
display:flex;
justify-content:space-between;
align-items:flex-end;
gap:18px;
}

.nr-brand__name{
font-weight:600;
font-size:16px;
letter-spacing:.04em;
text-transform:uppercase;
}

.nr-brand__tag{
color:var(--muted);
font-size:13px;
margin-top:4px;
}

/* ===============================
Navigation
=============================== */

.nr-header__right{
display:flex;
align-items:center;
gap:12px;
flex-wrap:wrap;
}

.nr-nav{
display:inline-flex;
align-items:center;
gap:6px;
padding:6px;
border-radius:999px;
border:1px solid rgba(31,42,54,.14);
background:rgba(244,247,250,.80);
margin:0;
list-style:none;
}

.nr-nav li{
margin:0;
padding:0;
list-style:none;
}

.nr-nav a{
font-size:15px;
font-weight:600;
letter-spacing:.12px;
padding:9px 12px;
border-radius:999px;
text-decoration:none;
color:var(--text);
line-height:1.1;
display:inline-block;
transition:background .15s ease, border-color .15s ease;
}

.nr-nav a:hover{
background:rgba(109,166,226,.14);
}

.nr-nav a[aria-current="page"],
.nr-nav .current-menu-item > a,
.nr-nav .current_page_item > a{
background:rgba(109,166,226,.18);
border:1px solid rgba(109,166,226,.45);
}

/* Contact CTA pill */
.nr-nav li:last-child a{
background:#fff;
border:1px solid rgba(31,42,54,.22);
padding:9px 14px;
}

.nr-nav li:last-child a:hover{
background:rgba(109,166,226,.12);
border-color:rgba(109,166,226,.45);
}

/* Language switch */
.nr-lang{
margin-left:auto;
padding:6px 10px;
font-size:11px;
border:1px solid rgba(31,42,54,.14);
background:rgba(244,247,250,.80);
border-radius:999px;
}

.nr-lang a{
font-size:11px;
text-decoration:none;
color:var(--text);
padding:3px 7px;
}

.nr-lang a.is-active{
font-weight:600;
}

/* ===============================
BUTTONS — MATCH NAV STYLE
=============================== */

.nr-button,
.nr-button--primary{
font-size:15px;
font-weight:600;
letter-spacing:.12px;
padding:9px 14px;
border-radius:999px;
text-decoration:none;
display:inline-block;
line-height:1.1;
border:1px solid rgba(31,42,54,.22);
background:#fff;
color:var(--text);
transition:background .15s ease, border-color .15s ease;
}

.nr-button:hover,
.nr-button--primary:hover{
background:rgba(109,166,226,.14);
border-color:rgba(109,166,226,.45);
color:var(--text);
}

/* ===============================
Main content
=============================== */

.nr-main{
padding:38px 34px 46px;
}

.nr-content{
max-width:var(--read);
}

.nr-page-title{
font-family:"Source Serif 4", Georgia, serif;
font-size:34px;
line-height:1.25;
margin:0 0 18px;
}

h2{
font-size:20px;
margin:26px 0 10px;
font-weight:600;
}

p{ margin:0 0 14px; }

ul{ margin:8px 0 18px; padding-left:18px; }
li{ margin:0 0 6px; }

/* ===============================
Cards
=============================== */

.nr-cards{
display:grid;
grid-template-columns:repeat(2, 1fr);
gap:18px;
margin-top:22px;
}

.nr-card{
border:1px solid var(--rule);
padding:16px 18px;
border-radius:14px;
background:#fff;
transition:transform .15s ease, box-shadow .15s ease;
}

.nr-card:hover{
transform:translateY(-2px);
box-shadow:0 8px 18px rgba(0,0,0,.06);
}

.nr-card__title{
font-weight:600;
margin-bottom:6px;
}

.nr-card__meta{
color:var(--muted);
font-size:14px;
}

/* ===============================
Footer
=============================== */

.nr-footer{
border-top:1px solid var(--rule);
padding:18px 34px;
font-size:13px;
color:var(--muted);
display:flex;
justify-content:space-between;
gap:14px;
}

/* ===============================
Responsive
=============================== */

@media (max-width: 860px){
.nr-frame{ margin:20px; }
.nr-cards{ grid-template-columns:1fr; }
.nr-header{ align-items:flex-start; }
.nr-page-title{ font-size:30px; }
.nr-header__right{ flex-wrap:wrap; }
.nr-lang{ margin-left:0; }
}

.nr-nav-wrap,
.nr-nav-wrap * {
font-size: inherit;
font-weight: inherit;
}

.nr-nav__text {
font-size: 15px;
font-weight: 600;
}

/* ===============================
HEADER OVERRIDE: Logo row + Nav row (masthead layout)
Only affects header/logo/nav/language
=============================== */

.nr-header{
flex-direction:column;
align-items:center;
justify-content:flex-start;
gap:18px;
}

/* Brand/logo row */
.nr-brand{
width:100%;
display:flex;
justify-content:center;
align-items:center;
text-align:center;
}

.nr-logo{
height:110px;
width:auto;
display:block;
}

.nr-logo-link{
display:flex;
justify-content:center;
align-items:center;
}

/* Nav row under logo */
.nr-header__right{
width:100%;
justify-content:center;
align-items:center;
flex-wrap:wrap;
gap:12px;
}

/* Pill bar centered and allowed to wrap (prevents overflow) */
.nr-nav{
justify-content:center;
flex-wrap:wrap;
white-space:normal;
max-width:100%;
}

.nr-lang{
margin-left:0;
}

/* Mobile tuning */
@media (max-width: 860px){
.nr-logo{ height:80px; }
}

/* Hero title accent colour */
.nr-hero__title,
.nr-hero h1,
.nr-main h1:first-of-type{
color:#6DA6E2;
}


/* Mobile-friendly logo scaling */
.nr-logo{
  height:auto;              /* allow proportional scaling */
  max-height:110px;         /* desktop cap */
  max-width:520px;          /* stop it getting too wide */
  width:100%;
  object-fit:contain;
  display:block;
}

/* Make the logo respond nicely on smaller screens */
@media (max-width: 860px){
  .nr-logo{
    max-height:72px;        /* mobile cap */
    max-width:92vw;         /* fit screen width */
  }
}

/* Very small phones */
@media (max-width: 420px){
  .nr-logo{
    max-height:60px;
  }
}

/* ==============================
MOBILE TEXT SIZE FIX
Prevents iOS/Android browsers from shrinking
or enlarging text when rotating the device
or changing viewport width.
============================== */

html{
  -webkit-text-size-adjust: 100%; /* iOS Safari / Chrome */
  -moz-text-size-adjust: 100%;    /* Firefox Mobile */
  -ms-text-size-adjust: 100%;     /* old Microsoft mobile browsers */
  text-size-adjust: 100%;         /* standard property */
}