/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Cairo', Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
}

/* Color variables */
:root {
    --neon-green: #39FF14;
    --neon-blue: #00D4FF;
    --electric-purple: #8A2BE2;
    --cyber-pink: #FF1493;
    --dark-overlay: rgba(0, 0, 0, 0.6);
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --glow-intensity: 0 0 20px var(--neon-green), 0 0 40px var(--neon-green), 0 0 60px var(--neon-green);
    --blue-glow: 0 0 25px var(--neon-blue), 0 0 50px var(--neon-blue), 0 0 75px var(--neon-blue);
    --pulse-duration: 1s;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    :root {
        --pulse-duration: 0s;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Main container */
.portal-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Background and overlay */
.background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('./assets/hills-background.jpg') center center/cover no-repeat;
    filter: brightness(0.8) contrast(1.2) saturate(1.1);
    z-index: -2;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, rgba(57, 255, 20, 0.05) 0%, rgba(0, 0, 0, 0.8) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.85) 100%);
    z-index: -1;
}

/* Content wrapper */
.content-wrapper {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* Center circle */
.center-circle {
    position: relative;
  width: fit-content;
  min-width: 200px;
  max-width: 600px;
  height: auto;
  aspect-ratio: 5/1;
  padding: 20px 40px;
    border-radius: 20px;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    margin-bottom: 60px;
    border: 3px solid var(--neon-green);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 0 30px rgba(57, 255, 20, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.3);
}

.main-logo {
  width: 30%;
  height: auto;
  max-width: 120px;
  min-width: 60px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(57, 255, 20, 0.4)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

/* Glow effects */
.glow-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: var(--glow-intensity);
    pointer-events: none;
}

.center-circle .glow-effect {
    border-radius: 20px;
    box-shadow: 
        0 0 20px var(--neon-green), 
        0 0 40px var(--neon-green), 
        0 0 60px rgba(57, 255, 20, 0.3);
    z-index: 3;
}

/* Connecting lines */
.connection-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.line {
    position: absolute;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(57, 255, 20, 0.2) 10%, 
        rgba(57, 255, 20, 0.8) 30%, 
        var(--neon-green) 50%, 
        rgba(57, 255, 20, 0.8) 70%, 
        rgba(57, 255, 20, 0.2) 90%, 
        transparent 100%);
    box-shadow: 
        0 0 8px rgba(57, 255, 20, 0.6), 
        0 0 16px rgba(57, 255, 20, 0.4),
        0 0 24px rgba(57, 255, 20, 0.2);
    filter: blur(0.5px);
    transition: all 0.4s ease;
}

.line-left {
    top: 170px;
    left: 40%;
    width: 280px;
    height: 3px;
    transform: translateX(-50%) rotate(-30deg);
    transform-origin: left center;
}

.line-right {
    top: 170px;
    right: 40%;
    width: 280px;
    height: 3px;
    transform: translateX(50%) rotate(30deg);
    transform-origin: right center;
}

/* School options */
.school-options {
    position: absolute;
    width: 100%;
    height: 80%;
    top: 20%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.school-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 20px;
    border-radius: 20px;
    background: 
        linear-gradient(145deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
    backdrop-filter: blur(15px) saturate(1.1);
    border: 2px solid transparent;
    outline: none;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(0) scale(1);
    width: 280px;
    height: 280px;
    justify-content: center;
}

.school-option:hover,
.school-option:focus {
    border-color: var(--neon-blue);
    background: 
        linear-gradient(145deg, rgba(0, 212, 255, 0.15) 0%, rgba(0, 100, 200, 0.1) 100%),
        linear-gradient(145deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
    transform: scale(1.08) translateY(0);
    box-shadow: 
        0 0 30px rgba(0, 212, 255, 0.4),
        0 0 60px rgba(0, 212, 255, 0.2),
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.school-option:focus {
    box-shadow: 
        0 0 0 3px rgba(0, 212, 255, 0.6),
        0 0 30px rgba(0, 212, 255, 0.4),
        0 0 60px rgba(0, 212, 255, 0.2),
        0 12px 40px rgba(0, 0, 0, 0.4);
}

.option-circle {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.98) 0%, rgba(240, 248, 255, 0.95) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    border: 3px solid var(--neon-green);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 0 20px rgba(57, 255, 20, 0.3),
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.school-option:hover .option-circle,
.school-option:focus .option-circle {
    border-color: var(--neon-blue);
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 1) 0%, rgba(230, 245, 255, 0.98) 100%);
    box-shadow: 
        0 0 35px rgba(0, 212, 255, 0.5),
        0 0 70px rgba(0, 212, 255, 0.3),
        0 8px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

.school-logo {
    width: 85px;
    height: 85px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(57, 255, 20, 0.3)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

/* Make GHIS logo smaller than GHLS logo */
.school-option[data-school="ghis"] .school-logo {
    width: 70px;
    height: 70px;
}

.school-option:hover .school-logo,
.school-option:focus .school-logo {
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.5)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transform: scale(1.05);
}

.school-name {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(255, 255, 255, 0.1);
    line-height: 1.3;
    transition: all 0.3s ease;
}

.school-option:hover .school-name,
.school-option:focus .school-name {
    color: var(--neon-blue);
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(0, 212, 255, 0.6),
        0 0 30px rgba(0, 212, 255, 0.3);
    transform: scale(1.02);
}

.school-code {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--neon-green);
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(57, 255, 20, 0.4);
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.school-option:hover .school-code,
.school-option:focus .school-code {
    color: var(--neon-blue);
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(0, 212, 255, 0.6),
        0 0 30px rgba(0, 212, 255, 0.3);
    transform: scale(1.02);
}

/* Pulse animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 
            0 0 35px rgba(0, 212, 255, 0.5),
            0 0 70px rgba(0, 212, 255, 0.3),
            0 8px 30px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 
            0 0 45px rgba(0, 212, 255, 0.7),
            0 0 90px rgba(0, 212, 255, 0.4),
            0 8px 30px rgba(0, 0, 0, 0.3);
    }
}

.school-option:hover .option-circle,
.school-option:focus .option-circle {
    animation: glow-pulse var(--pulse-duration) ease-in-out infinite;
}

/* Position options */
.option-left {
    position: relative;
    margin-left: 5%;
}

.option-right {
    position: relative;
    margin-right: 5%;
}

/* Footer */
.portal-footer {
    position: absolute;
    bottom: 30px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.portal-footer p {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
}

/* Mobile and tablet responsiveness */
@media (max-width: 1024px) {
    .content-wrapper {
        height: 70vh;
    }
    
    .center-circle {
        width: 100px;
        height: 100px;
    }
    
    .main-logo {
        width: 52px;
        height: 52px;
    }
    
    .school-option {
        width: 240px;
        height: 240px;
    }
    
    .option-circle {
        width: 100px;
        height: 100px;
    }
    
    .school-logo {
        width: 70px;
        height: 70px;
    }
    
    /* Adjust GHIS logo size for tablet */
    .school-option[data-school="ghis"] .school-logo {
        width: 58px;
        height: 58px;
    }
    
    .school-name {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        height: 90vh;
    }
    
    .center-circle {
        width: 90%;
        height: 100px;
        margin-top: 30px;
        margin-bottom: 40px;
    }
    
    .main-logo {
        width: 64px;
        height: 64px;
    }
    
    .connection-lines {
        display: none;
    }
    
    .school-options {
        flex-direction: column;
        gap: 30px;
        margin-top: 20px;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    .line-left,
    .line-right {
        display: none;
    }
    
    .option-left,
    .option-right {
        margin-left: 0;
        margin-right: 0;
        width: 280px;
        height: 280px;
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        width: 95%;
        padding: 15px;
        height: 95vh;
        justify-content: flex-start;
        padding-top: 0;
    }
    
    .center-circle {
        min-width: 140px;
        max-width: 300px;
        padding: 10px 20px;
        margin-top: 20px;
        margin-bottom: 30px;
    }
    
    .main-logo {
        max-width: 60px;
        min-width: 30px;
    }
    
    .school-options {
        gap: 25px;
        margin-top: 30px;
        position: static;
        height: auto;
        width: 100%;
        top: auto;
        align-items: center;
        justify-content: center;
    }
    
    .school-option {
        width: 280px;
        height: 280px;
        padding: 20px;
        justify-content: center;
    }
    
    .option-left,
    .option-right {
        margin-left: 0;
        margin-right: 0;
        width: 280px;
        height: 280px;
    }
    
    .option-circle {
        width: 120px;
        height: 120px;
        margin-bottom: 18px;
    }
    
    .school-logo {
        width: 85px;
        height: 85px;
    }
    
    /* Adjust GHIS logo size for mobile */
    .school-option[data-school="ghis"] .school-logo {
        width: 70px;
        height: 70px;
    }
    
    .school-name {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .school-code {
        font-size: 0.9rem;
    }
    
    .portal-footer {
        bottom: 20px;
    }
    
    .portal-footer p {
        font-size: 0.9rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .school-option {
        border: 3px solid var(--neon-green);
        background: rgba(0, 0, 0, 0.8);
    }
    
    .center-circle,
    .option-circle {
        border: 4px solid var(--neon-green);
    }
}

/* Print styles */
@media print {
    .glow-effect,
    .connection-lines {
        display: none;
    }
    
    body {
        color: #000000;
    }
    
    .gradient-overlay {
        background: rgba(255, 255, 255, 0.8);
    }
}





/* ==== FIX: خلي الفريم يـhug الشعار ويرجع القياسات المرنة ==== */
.center-circle{
  display: inline-flex !important;     /* shrink-wrap */
  justify-content: center !important;
  align-items: center !important;

  /* الغي القيود اللي كبّرت الفريم بالنسبة للشعار */
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  max-width: 90vw !important;          /* أمان ضدّ overflow */
  aspect-ratio: auto !important;

  /* padding مرن حوالين الشعار */
  padding: clamp(10px, 2vmin, 18px) !important;
}

/* رجّع التحكم الحقيقي في عرض الشعار نفسه */
:root{
  --main-logo-asset-width: 2048px;     /* لوغو الأصل */
  --main-logo-scale: 0.10;             /* 30% (عدّلها لو عاوز) */
}

.main-logo{
  width: calc(var(--main-logo-asset-width) * var(--main-logo-scale)) !important;
  height: auto !important;
  max-width: none !important;          /* ألغي 120px الحدّ الأقصى السابق */
  min-width: 0 !important;             /* منع حد أدنى يجبر التصغير */
  object-fit: contain !important;
}

/* --- موبايل/تابلت: ألغِ القياسات الثابتة للفريم واللوجو في الميديا القديمة --- */
@media (max-width: 1024px){
  .center-circle{
    width: auto !important;
    height: auto !important;
    padding: clamp(10px, 2vmin, 16px) !important;
  }
  /* اختَر قياسًا مناسبًا للموبايل/تابلت */
  .main-logo{
    /* مثال: بين 140px و 320px حسب العرض */
    width: clamp(140px, 35vw, 320px) !important;
    height: auto !important;
  }
}

@media (max-width: 480px){
  .center-circle{
    padding: clamp(10px, 2.5vmin, 14px) !important;
  }
  .main-logo{
    /* مثال: أصغر شوية على الشاشات الصغيرة */
    width: clamp(120px, 50vw, 240px) !important;
  }
}





/* ===== Main logo: keep desktop at 0.10, tweak tablet/mobile ===== */

/* قاعدة عامة: خليه يحتضن الشعار بدون أبعاد ثابتة */
.center-circle{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  max-width: 90vw !important;
  aspect-ratio: auto !important;
  padding: clamp(10px, 2vmin, 18px) !important;
}

/* ديسكتوب (زي ما طلبت): 0.10 */
@media (min-width: 1025px){
  :root{ --main-logo-scale: 0.10; }
  .main-logo{
    width: calc(2048px * var(--main-logo-scale)) !important; /* = ~205px */
    height: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    object-fit: contain !important;
  }
}

/* تابلت (768–1024): كبره شوية عشان يبان (0.14) + حدود دنيا/عليا احتياطياً */
@media (min-width: 768px) and (max-width: 1024px){
  :root{ --main-logo-scale: 0.8; }
  .main-logo{
    width: clamp(160px, calc(2048px * var(--main-logo-scale)), 320px) !important;
    height: auto !important;
  }
  /* مسافة صغيرة تحت اللوجو قبل الكروت */
  .center-circle{ margin-bottom: 24px !important; }
}

/* موبايل (≤767): كبره أكثر شوية (0.18) مع clamp مناسب */
@media (max-width: 767px){
  :root{ --main-logo-scale: 0.5; }
  .main-logo{
    width: clamp(140px, calc(2048px * var(--main-logo-scale)), 260px) !important;
    height: auto !important;
  }
  .center-circle{ margin-bottom: 20px !important; }
}

/* تأكيد: ألغي أي قياسات قديمة كانت بتحط أبعاد ثابتة للفريم/اللوجو في ميديا كويريز سابقة */
@media (max-width: 1024px){
  .center-circle{ width: auto !important; height: auto !important; }
}

/* GHIS يفضل 70×70 زي ما ظبطناه */
.school-option[data-school="ghis"] .school-logo{
  width: 70px !important;
  height: 70px !important;
}

/* (اختياري) لو حسيت الكارت كبير على الموبايل، صغّر الكروت شوية */
@media (max-width: 767px){
  .school-option{ width: 240px !important; height: 240px !important; }
  .option-circle{ width: 100px !important; height: 100px !important; }
}






/* ===== Main logo scales: Desktop 0.10, Tablet 0.08, Mobile 0.05 ===== */

/* خلي الفريم يـhug الشعار */
.center-circle{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  max-width: 90vw !important;
  aspect-ratio: auto !important;
  padding: clamp(10px, 2vmin, 18px) !important;
}

/* قاعدة عامة: احسب العرض من الـ scale */
.main-logo{
  width: calc(2048px * var(--main-logo-scale)) !important;
  height: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  object-fit: contain !important;
}

/* Desktop ≥1025px: 0.10 */
@media (min-width: 1025px){
  :root{ --main-logo-scale: 0.10; }
}

/* Tablet 768–1024px: 0.08 */
@media (min-width: 768px) and (max-width: 1024px){
  :root{ --main-logo-scale: 0.08; }
  .center-circle{ margin-bottom: 24px !important; }
}

/* Mobile ≤767px: 0.05 */
@media (max-width: 767px){
  :root{ --main-logo-scale: 0.05; }
  .center-circle{ margin-bottom: 20px !important; }
}

/* تأكيد: ألغِ أي أبعاد ثابتة سابقة للفريم على الأجهزة الصغيرة */
@media (max-width: 1024px){
  .center-circle{ width: auto !important; height: auto !important; }
}

/* يظل GHIS 70×70 */
.school-option[data-school="ghis"] .school-logo{
  width: 70px !important;
  height: 70px !important;
}




/* Tablet + Mobile: fix GHIS logo to 70×70 */
@media (max-width: 1024px){
  /* بالـ data-attr وبالـ alt للتأكيد */
  .school-option[data-school="ghis"] .school-logo,
  img[alt="Green Heights International School Logo"]{
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
  }
}

/* (اختياري) امنع تكبير الهوفر على الشاشات الصغيرة */
@media (max-width: 1024px){
  .school-option[data-school="ghis"]:hover .school-logo,
  .school-option[data-school="ghis"]:focus .school-logo{
    transform: none !important;
  }
}

