/* ===========================================
   MAIN.CSS - Global Styles for NCSS Website
   =========================================== */

/* Font Face */
@font-face {
    font-family: 'emad-diana_extraregular';
    src: url('../emad-dianaextra-regular-webfont.woff2') format('woff2'),
         url('../emad-dianaextra-regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* CSS Custom Properties */
:root {
    --primary-color: #094d6b;
    --secondary-color: #2A6B7A;
    --accent-color: #D4AF37;
    --light-accent: #F5E6B8;
    --text-dark: #333;
    --text-light: #555;
    --text-muted: #666;
    --background-light: #f8f9fa;
    --white: #ffffff;
    
    /* Responsive Variables */
    --mobile-font-size: 12px;
    --small-mobile-font-size: 10px;
    --tablet-padding: 15px;
    --mobile-padding: 10px;
    --touch-target-min: 44px;
    --nav-height: 70px;
    --hero-padding-mobile: 80px 0 100px;
    --hero-padding-small: 60px 0 80px;
}

/* ===========================================
   RESET AND BASE STYLES
   =========================================== */

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

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

body {
    font-family: 'emad-diana_extraregular', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ===========================================
   CUSTOM SCROLLBAR
   =========================================== */

::-webkit-scrollbar-track {
    background: linear-gradient(
        to bottom,
        var(--primary-color) 0 66.5px,
        var(--primary-color) 66.5px 100%
    );
}

::-webkit-scrollbar {
    width: 11px;
    height: 200px;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
    margin: 0 20px 0 20px;
    border: 3.5px solid var(--primary-color);
    transition: all 0.7s ease;
}

::-webkit-scrollbar-thumb:hover {
    border-width: 3px;
    cursor: pointer;
}

/* ===========================================
   TYPOGRAPHY
   =========================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
    text-shadow: 0 0 20px rgba(27, 75, 90, 0.3);
    transition: text-shadow 0.3s ease;
}

.section-title:hover {
    text-shadow: 0 0 30px rgba(27, 75, 90, 0.5);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 3rem;
}

.section-header {
    margin-bottom: 4rem;
}

/* ===========================================
   BUTTONS
   =========================================== */

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    min-height: var(--touch-target-min);
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(27, 75, 90, 0.3);
}

.btn-secondary {
    background: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
}

.btn-secondary:hover {
    background: var(--light-accent);
    color: var(--primary-color);
    border-color: var(--light-accent);
}

/* Button animations */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* ===========================================
   NAVIGATION
   =========================================== */

.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.5s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    background: var(--primary-color);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

.nav-container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}
.nav-logo a:visited{
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--primary-color);
    white-space: nowrap;
    margin-right: 100px;
    transition: all 0.3s ease;
    text-decoration: none;
}
.logo-text.scrolled:visited{
    color: #fdf0c3;
}

.logo {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--primary-color);
    white-space: nowrap;
    margin-right: 100px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.logo-text.scrolled {
    color: #fdf0c3;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link.scrolled {
    color: #fdf0c3;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.scrolled:hover {
    color: #fdf0c3;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link.scrolled::after {
    background: #fdf0c3;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: bold;
    border-bottom: 2px solid var(--primary-color);
}

.nav-link.scrolled.active {
    color: #fdf0c3;
    border-bottom-color: #fdf0c3;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.hamburger:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 5px;
}

.bar.scrolled {
    background: #fdf0c3;
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ===========================================
   FOOTER
   =========================================== */

.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 50px 0 20px;
    width: 100%;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
}

.footer-logo-img {
    height: 50px;
    width: 50px;
    border-radius: 50%;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--light-accent);
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.9;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    text-align: center;
}

.footer-credits p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* ===========================================
   LIGHTBOX
   =========================================== */

.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    max-height: 80%;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #bbb;
}

.lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}
/* ===========================================
   Loading spinner
   =========================================== */
   .loading-spinner {
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    z-index: 10000;
}
.loading-spinner-achievements {
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    display: flex;
    align-items: center;
    position: absolute;
    left: 50%;
}
.loading-bg{

    color: #094d6b;
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    vertical-align: middle;
    width: 100%;
}
/* HTML: <div class="loader"></div> */
.loader {
  width: 40px;
  aspect-ratio: 1;
  --c: linear-gradient(#094d6b 0 0);
  --r1: radial-gradient(farthest-side at bottom,#094d6b 93%,#0000);
  --r2: radial-gradient(farthest-side at top   ,#094d6b 93%,#0000);
  background: 
    var(--c) ,var(--r1),var(--r2),
    var(--c) ,var(--r1),var(--r2),
    var(--c) ,var(--r1),var(--r2);
  background-repeat: no-repeat;
  animation: l2 1s infinite alternate;
}
@keyframes l2 {
  0%,25% {
    background-size: 8px 0,8px 4px,8px 4px,8px 0,8px 4px,8px 4px,8px 0,8px 4px,8px 4px;
    background-position: 0 50%,0 calc(50% - 2px),0 calc(50% + 2px),50% 50%,50% calc(50% - 2px),50% calc(50% + 2px),100% 50%,100% calc(50% - 2px),100% calc(50% + 2px);
 }
 50% {
    background-size: 8px 100%,8px 4px,8px 4px,8px 0,8px 4px,8px 4px,8px 0,8px 4px,8px 4px;
    background-position: 0 50%,0 calc(0% - 2px),0 calc(100% + 2px),50% 50%,50% calc(50% - 2px),50% calc(50% + 2px),100% 50%,100% calc(50% - 2px),100% calc(50% + 2px);
 }
 75% {
    background-size: 8px 100%,8px 4px,8px 4px,8px 100%,8px 4px,8px 4px,8px 0,8px 4px,8px 4px;
    background-position: 0 50%,0 calc(0% - 2px),0 calc(100% + 2px),50% 50%,50% calc(0% - 2px),50% calc(100% + 2px),100% 50%,100% calc(50% - 2px),100% calc(50% + 2px);
 }
 95%,100% {
    background-size: 8px 100%,8px 4px, 8px 4px,8px 100%,8px 4px,8px 4px,8px 100%,8px 4px,8px 4px;
    background-position: 0 50%,0 calc(0% - 2px),0 calc(100% + 2px),50% 50%,50% calc(0% - 2px),50% calc(100% + 2px),100% 50%,100% calc(0% - 2px),100% calc(100% + 2px);
 }
}

/* ===========================================
   ANIMATIONS
   =========================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes zoomIn {
    from {
        transform: translate(-50%, -50%) scale(0.5);
    }
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

@keyframes slowZoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes gradientBorder {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes sparkle {
    0% {
        transform: translateY(0px);
    }
    100% {
        transform: translateY(-100px);
    }
}

@keyframes mobileSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */

.section-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000;
}

/* Apply GPU acceleration to animated elements */
.hero-image,
.hero-logo-img,
.academic-card,
.gallery-item,
.btn {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */

/* Large screens and below */
@media(max-width: 1400px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        width: 100%;
        text-align: center;
        transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
        gap: 1.5rem;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
        animation: slideInFromLeft 0.4s ease-out;
    }
    
    .nav-menu.scrolled {
        background-color: #094d6b;
        top: 60px;
    }
    
    .nav-menu .nav-link {
        color: var(--text-dark) !important;
        font-size: 1.1rem;
        padding: 12px 20px;

    }
    
    .nav-menu.scrolled .nav-link {
        color: #fdf0c3 !important;
    }
}

/* Tablet and below */
@media (max-width: 768px) {
    html {
        font-size: var(--mobile-font-size);
    }
    
    .container {
        padding: 0 var(--tablet-padding);
    }
    
    .nav-container {
        padding: 0 var(--tablet-padding);
    }
    
    .logo-text {
        font-size: 1rem;
        margin-right: 20px;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .btn {
        padding: 12px 28px;
        font-size: 0.95rem;
        border-radius: 25px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* Focus states for accessibility */
    .nav-link:focus,
    .btn:focus,
    .hamburger:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    html {
        font-size: var(--small-mobile-font-size);
    }
    
    .container {
        padding: 0 var(--mobile-padding);
    }
    
    .logo-text {
        font-size: 0.9rem;
        margin-right: 10px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
        margin-bottom: 8px;
    }
    
    .lightbox-content {
        width: 95%;
    }
}

/* Accessibility enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .nav-menu {
        background-color: var(--white);
        border: 2px solid var(--primary-color);
    }
    
    .nav-menu.scrolled {
        background-color: var(--primary-color);
        border: 2px solid #fdf0c3;
    }
}
