/* ============================================
   New Assiut Technological University Portal
   Global Stylesheet (style.css)
   Supports: Light/Dark Mode, Responsive, RTL
   ============================================ */

/* --- Google Font: Cairo (Arabic-optimized) --- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Variables (Light Mode Default) --- */
:root {
  --font-main: 'Cairo', sans-serif;

  /* Colors */
  --color-primary: #0f172a;         /* Navy Dark */
  --color-primary-light: #0f172ae3;   /* Royal Blue */
  --color-secondary: #d97706;       /* Gold/Amber */
  --color-secondary-light: #f59e0b; /* Bright Gold */
  --color-accent: #0891b2;          /* Cyan */
  --color-accent-light: #22d3ee;    /* Light Cyan */

  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-bg-card: #ffffff;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;

  --color-success: #10b981;
  --color-error: #ef4444;
  --color-info: #3b82f6;

  /* Layout */
  --navbar-height: 72px;
  --max-width: 1200px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Transitions */
  --transition: all 0.3s ease;
}



/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Navbar Styles --- */
.navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: var(--navbar-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: var(--transition);
}


.navbar.scrolled {
  box-shadow: var(--shadow);
  height: 64px;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-primary-light);
}

.navbar-brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-secondary);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-links a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-text);
  position: relative;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0.9rem;
  left: 0.9rem;
  height: 2px;
  background: var(--color-secondary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
  border-radius: 2px;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--color-secondary);
  background: rgba(217, 119, 6, 0.08);
}

.navbar-links a.active::after,
.navbar-links a:hover::after {
  transform: scaleX(1);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-theme {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.btn-theme:hover {
  background: var(--color-secondary);
  color: #fff;
  border-color: var(--color-secondary);
}

.btn-login {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-sm);
  background: var(--color-primary-light);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-login:hover {
  background: var(--color-secondary);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Footer Styles --- */
.footer {
  background: var(--color-primary);
  color: #e2e8f0;
  margin-top: auto;
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--color-secondary);
}

.footer-desc {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--color-secondary);
  border-radius: 3px;
}

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

.footer-links a {
  color: #94a3b8;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--color-secondary);
  padding-right: 4px;
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

.footer-contact svg {
  width: 18px;
  height: 18px;
  color: var(--color-secondary);
  flex-shrink: 0;
}

.footer-map iframe {
  width: 100%;
  height: 160px;
  border-radius: var(--radius-sm);
  border: none;
  filter: grayscale(0.4);
  transition: var(--transition);
}

.footer-map iframe:hover {
  filter: grayscale(0);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-size: 0.85rem;
  color: #64748b;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  color: #cbd5e1;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--color-secondary);
  color: #fff;
  transform: translateY(-3px);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-primary-light);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary-light);
  border-color: var(--color-primary-light);
}
.btn-secondary:hover {
  background: var(--color-primary-light);
  color: #fff;
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--color-secondary);
  color: #fff;
  border-color: var(--color-secondary);
}
.btn-gold:hover {
  background: var(--color-secondary-light);
  border-color: var(--color-secondary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.section-padding {
  padding: 5rem 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 0;
  width: 60px;
  height: 4px;
  background: var(--color-secondary);
  border-radius: 4px;
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 600px;
}

/* --- Card Component --- */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(217, 119, 6, 0.3);
}

/* --- Form Styles --- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.15);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

select.form-input {
  cursor: pointer;
}

/* --- Auth Messages --- */
.auth-message {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: none;
}

.auth-message.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.auth-message.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* --- Tabs --- */
.tabs-header {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--color-border);
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

.tab-btn.active {
  color: var(--color-secondary);
  border-bottom-color: var(--color-secondary);
}

.tab-btn:hover:not(.active) {
  color: var(--color-text);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-animate].animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--color-text-muted);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .navbar-links {
    display: none;
    position: absolute;
    top: var(--navbar-height);
    right: 0;
    left: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--navbar-height));
    overflow-y: auto;
  }

  html.dark .navbar-links {
    background: var(--color-bg);
  }

  .navbar-links.open {
    display: flex;
  }

  .navbar-links a {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
  }

  .navbar-links a::after {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .navbar-actions .btn-login span {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --navbar-height: 66px;
  }

  .section-padding {
    padding: 3rem 0;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .navbar-brand {
    font-size: 1rem;
  }

  .navbar-brand img {
    width: 36px;
    height: 36px;
  }
}
