/* ================================================
   GlobiLinker – countries.css (ENHANCED)
   Country university pages with improved design
   Mobile-first responsive approach
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --navy:       #0d1b2a;
  --navy-light: #1a3a5c;
  --gold:       #c9a84c;
  --gold-light: #e4c576;
  --cream:      #f7f3ec;
  --cream-dark: #ede7d9;
  --white:      #ffffff;
  --text-dark:  #1a1a2e;
  --text-muted: #6b7a8d;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;

  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(13,27,42,.12);
  --shadow-md: 0 8px 28px rgba(13,27,42,.18);
  --shadow-lg: 0 15px 40px rgba(13,27,42,.25);
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { 
  scroll-behavior: smooth; 
  font-size: 16px; 
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
}

img { 
  max-width: 100%; 
  display: block;
  height: auto;
}
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* ── HEADER ───────────────────────────────────── */
.country-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 70px;
  background: rgba(13,27,42,.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(201,168,76,.2);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  transition: transform var(--transition);
}

.header-logo:hover {
  transform: scale(1.02);
}

.header-logo img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--gold);
  box-shadow: 0 2px 8px rgba(201,168,76,.3);
}

.header-logo span {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.03em;
}

.header-logo span::after {
  content: ' ✦';
  color: var(--gold);
  font-size: 0.7em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.lang-select {
  background: rgba(201,168,76,.15);
  border: 1px solid rgba(201,168,76,.3);
  border-radius: 6px;
  color: var(--gold-light);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  outline: none;
  transition: background var(--transition);
}

.lang-select:hover {
  background: rgba(201,168,76,.25);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: rgba(201,168,76,.2);
  border: 1.5px solid rgba(201,168,76,.4);
  border-radius: 50px;
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.back-btn:hover {
  background: rgba(201,168,76,.35);
  border-color: var(--gold-light);
  transform: translateX(-3px);
}

/* ── HERO BANNER ──────────────────────────────── */
.country-hero {
  position: relative;
  height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-top: 70px;
}

.country-hero > div:first-child {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  font-size: 300px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 0;
}

.country-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,27,42,.7) 0%, rgba(13,27,42,.5) 50%, rgba(13,27,42,.8) 100%);
  z-index: 1;
}

.country-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, rgba(13,27,42,.9) 0%, transparent 100%);
  z-index: 1;
}

.country-hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem 2rem 2.5rem;
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  width: 100%;
}

.country-flag {
  width: auto;
  height: auto;
  font-size: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.country-hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 300;
  color: var(--white);
  letter-spacing: -0.015em;
  line-height: 1.15;
  text-shadow: 0 4px 12px rgba(0,0,0,.3);
}

.country-hero-content h1 span {
  color: var(--gold-light);
  font-style: italic;
  display: block;
  font-size: 0.9em;
}

/* ── INTRO SECTION ────────────────────────────── */
.country-intro {
  background: var(--white);
  padding: 4rem 5%;
  border-bottom: 1px solid var(--cream-dark);
  text-align: center;
}

.country-intro p {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.9;
  font-weight: 300;
}

/* ── UNIVERSITIES GRID ────────────────────────── */
.universities-section {
  padding: 90px 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.universities-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--navy);
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.universities-section h2::after {
  content: '';
  display: block;
  width: 70px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 3px;
  margin: 1rem auto 0;
  box-shadow: 0 2px 8px rgba(201,168,76,.2);
}

.universities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.2rem;
  margin-top: 3.5rem;
}

/* ── UNIVERSITY CARD ──────────────────────────── */
.uni-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--cream-dark);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  animation: slideUp 0.6s ease both;
  cursor: pointer;
  height: 100%;
}

.uni-card:nth-child(1) { animation-delay: 0.05s; }
.uni-card:nth-child(2) { animation-delay: 0.12s; }
.uni-card:nth-child(3) { animation-delay: 0.19s; }
.uni-card:nth-child(4) { animation-delay: 0.26s; }

@keyframes slideUp {
  from { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  to   { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.uni-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201,168,76,.3);
}

.uni-card-img {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
}

.uni-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.uni-card:hover .uni-card-img img { 
  transform: scale(1.08); 
}

.uni-card-img .img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: rgba(255,255,255,.2);
}

.uni-card-body {
  padding: 1.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.uni-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.uni-location {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.majors-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.majors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.6rem;
  flex: 1;
}

.major-tag {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
  border: 1px solid var(--cream-dark);
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--navy);
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all var(--transition);
}

.uni-card:hover .major-tag {
  background: rgba(201,168,76,.15);
  border-color: rgba(201,168,76,.4);
  color: var(--navy);
  transform: translateY(-2px);
}

.uni-website-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--gold-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 50px;
  align-self: flex-start;
  transition: all var(--transition);
  border: 1px solid rgba(201,168,76,.2);
  box-shadow: 0 4px 12px rgba(13,27,42,.2);
}

.uni-website-btn:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(201,168,76,.3);
}

.uni-website-btn::after { 
  content: '→'; 
}

/* ── FOOTER ───────────────────────────────────── */
.country-footer {
  background: var(--navy);
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  border-top: 1px solid rgba(201,168,76,.15);
  margin-top: 3rem;
}

/* ═══════════════════════════════════════════════ */
/* RESPONSIVE DESIGN - MOBILE FIRST              */
/* ═══════════════════════════════════════════════ */

/* ── Mobile (480px and below) ─────────────────── */
@media (max-width: 480px) {
  html { font-size: 14px; }

  .country-header {
    padding: 0 1rem;
    height: 60px;
  }

  .header-logo img {
    width: 36px;
    height: 36px;
  }

  .back-btn {
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
  }

  .country-hero {
    height: 280px;
    margin-top: 60px;
  }

  .country-hero-content {
    padding: 1.5rem 1rem 1.2rem;
    gap: 1rem;
  }

  .country-flag {
    width: 50px;
    height: 36px;
  }

  .country-hero-content h1 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
  }

  .country-hero-content h1 span {
    font-size: 0.85em;
  }

  .country-intro {
    padding: 2.5rem 1rem;
  }

  .country-intro p {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .universities-section {
    padding: 50px 1rem;
  }

  .universities-section h2 {
    font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  }

  .universities-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2.5rem;
  }

  .uni-card {
    border-radius: 12px;
  }

  .uni-card-img {
    height: 160px;
  }

  .uni-card-body {
    padding: 1.2rem;
  }

  .uni-card-body h3 {
    font-size: 1.1rem;
  }

  .majors-list {
    gap: 0.4rem;
    margin-bottom: 1.2rem;
  }

  .major-tag {
    font-size: 0.7rem;
    padding: 0.25rem 0.7rem;
  }

  .uni-location {
    font-size: 0.7rem;
    margin-bottom: 0.8rem;
  }

  .uni-website-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.7rem;
  }

  .country-footer {
    padding: 1.5rem 1rem;
    font-size: 0.75rem;
  }
}

/* ── Tablet (481px - 768px) ──────────────────── */
@media (max-width: 768px) and (min-width: 481px) {
  .country-header {
    padding: 0 1.5rem;
    height: 65px;
  }

  .header-logo img {
    width: 38px;
    height: 38px;
  }

  .back-btn {
    padding: 0.55rem 1.1rem;
    font-size: 0.75rem;
  }

  .country-hero {
    height: 340px;
    margin-top: 65px;
  }

  .country-hero-content {
    padding: 2rem 1.5rem 1.5rem;
    gap: 1.2rem;
  }

  .country-flag {
    width: 58px;
    height: 41px;
  }

  .country-hero-content h1 {
    font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  }

  .country-intro {
    padding: 3.5rem 2rem;
  }

  .country-intro p {
    font-size: 1rem;
    line-height: 1.8;
  }

  .universities-section {
    padding: 70px 2rem;
  }

  .universities-section h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  }

  .universities-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
  }

  .uni-card-img {
    height: 180px;
  }

  .uni-card-body {
    padding: 1.4rem;
  }

  .uni-website-btn {
    padding: 0.65rem 1.4rem;
    font-size: 0.72rem;
  }
}

/* ── Large Tablet & Desktop (769px+) ────────── */
@media (min-width: 769px) {
  .header-logo span {
    display: inline;
  }

  .country-hero-content h1 span {
    display: inline;
    font-size: 1em;
  }
}

/* ── Medium Devices (769px - 1024px) ────────── */
@media (max-width: 1024px) {
  .universities-section {
    padding: 80px 3%;
  }

  .universities-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* ── Large Devices (1025px+) ────────────────── */
@media (min-width: 1025px) {
  .universities-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}