/* Natural Academic Portal Design - Human Touch */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Merriweather:wght@300;400;700&display=swap');

:root {
  --primary: #2f5d3f;
  --primary-hover: #1e3d2a;
  --secondary: #5a7d67;
  --bg-main: #f9fafb;
  --bg-card: #ffffff;
  --text-dark: #1f2937;
  --text-medium: #4b5563;
  --text-light: #6b7280;
  --border-subtle: #e5e7eb;
  --border-medium: #d1d5db;
  --accent-light: #e8f4ed;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

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

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: none;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-dark);
  cursor: pointer;
}

.logo-icon {
  font-size: 1.5rem;
  filter: grayscale(20%);
}

.logo-text {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-medium);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.2s ease;
  cursor: pointer;
}

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

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    width: 0;
    left: 50%;
  }
  to {
    width: 100%;
    left: 0;
  }
}

/* Hero Section */
.hero-section {
  background: linear-gradient(to bottom, var(--accent-light), var(--bg-main));
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  color: var(--text-medium);
  font-size: 1rem;
  font-weight: 400;
}

/* Main Card */
.card-main {
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 2rem;
  display: flex;
  gap: 0;
}

.card-wrapper {
  width: 100%;
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  transition: box-shadow 0.3s ease;
}

.card-wrapper:hover {
  box-shadow: var(--shadow-lg);
}

.card-media {
  flex: 0 0 360px;
  background: linear-gradient(135deg, #f5f7f6 0%, #e8ede9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-right: 1px solid var(--border-subtle);
}

.card-media img {
  width: 100%;
  max-width: 320px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-media img:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.card-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem;
}

.card-details h2 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.card-details h2 span {
  display: block;
  font-size: 0.95rem;
  color: var(--secondary);
  font-weight: 600;
  margin-top: 0.5rem;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-data {
  margin: 1rem 0 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--accent-light);
  border-left: 3px solid var(--primary);
  color: var(--text-medium);
  font-size: 0.88rem;
  border-radius: 0 4px 4px 0;
  font-weight: 500;
}

.card-details > div:first-child p {
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--text-medium);
  margin-bottom: 0;
}

/* Content Sections */
.content-section {
  max-width: 1100px;
  margin: 0 auto 2.5rem;
  padding: 0 2rem;
  display: none;
}

.content-section.active {
  display: block;
  animation: fadeInUp 0.4s ease;
}

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

.section-card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
}

.section-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.75rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  font-weight: 700;
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--text-dark);
  margin: 1.5rem 0 0.75rem;
  font-weight: 600;
}

.section-card p {
  color: var(--text-medium);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.section-card ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.section-card li {
  color: var(--text-medium);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  color: var(--text-medium);
}

.contact-item a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-item a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.contact-icon {
  font-size: 1.1rem;
  opacity: 0.8;
}

/* Buttons */
.actions {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.btn {
  flex: 1;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  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.5s, height 0.5s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-icon {
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}

.btn span {
  position: relative;
  z-index: 1;
}

.btn--primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--border-medium);
  box-shadow: var(--shadow-sm);
}

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

/* Footer */
.site-footer {
  background: #2a3f35;
  color: #d1d5db;
  margin-top: 4rem;
  padding: 3rem 2rem 1.5rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: #a7d5ba;
  font-weight: 600;
  font-size: 1rem;
}

.footer-section p,
.footer-section a {
  color: #9ca3af;
  font-size: 0.9rem;
  line-height: 1.6;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: #a7d5ba;
}

.footer-section ul {
  list-style: none;
}

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

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(167, 213, 186, 0.15);
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 1.2rem;
}

.social-links a:hover {
  background: rgba(167, 213, 186, 0.25);
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* Email color fix */
.footer-content a[href^="mailto"],
.section-card a[href^="mailto"] {
  color: #a7d5ba !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-content a[href^="mailto"]:hover,
.section-card a[href^="mailto"]:hover {
  color: #c1e5d0 !important;
  text-decoration: underline;
}

/* Success Notification */
.success-notification {
  position: fixed;
  top: 90px;
  right: 20px;
  background: white;
  padding: 1rem 1.3rem;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid #10b981;
  z-index: 1000;
  display: none;
}

.success-notification.show {
  display: block;
  animation: slideInRight 0.3s ease;
}

.success-notification.fade-out {
  animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  to {
    opacity: 0;
    transform: translateX(400px);
  }
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.notification-icon {
  font-size: 1.5rem;
  color: #10b981;
}

.notification-text h4 {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
  color: var(--text-dark);
  font-weight: 600;
}

.notification-text p {
  font-size: 0.85rem;
  color: var(--text-medium);
}

/* ========================================
   PDF VIEWER - SIMPLIFIED VERSION
   ======================================== */

.pdf-viewer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s ease;
}

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

.pdf-viewer-header {
  background: #2c3e35;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.pdf-viewer-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: white;
  font-size: 1rem;
  font-weight: 600;
}

.viewer-icon {
  font-size: 1.3rem;
}

.pdf-viewer-close {
  background: rgba(255, 77, 77, 0.2);
  border: 1px solid rgba(255, 77, 77, 0.4);
  color: white;
  font-size: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  font-weight: 300;
}

.pdf-viewer-close:hover {
  background: rgba(255, 77, 77, 0.9);
  border-color: rgba(255, 77, 77, 1);
  transform: scale(1.05);
}

.pdf-viewer-close:active {
  transform: scale(0.98);
}

.pdf-viewer-container {
  flex: 1;
  background: #1a1a1a;
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.pdf-viewer-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
  display: block;
}

/* Auth Modal Styles */
.auth-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

.auth-modal-content {
  background-color: #ffffff;
  margin: 10% auto;
  padding: 50px 40px;
  border: none;
  border-radius: 20px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.4s ease;
  position: relative;
}

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

.auth-modal-content h2 {
  color: #86b097;
  margin-bottom: 15px;
  font-size: 28px;
  text-align: center;
  font-weight: 700;
}

.auth-modal-content h3 {
  color: #2f5d3f;
  margin-bottom: 10px;
  font-size: 24px;
  text-align: center;
  font-weight: 700;
}

.auth-modal-content p {
  color: #79838b;
  margin-bottom: 35px;
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
}

.modal-close {
  color: #a39baa;
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 32px;
  font-weight: 300;
  cursor: pointer;
  line-height: 20px;
  transition: color 0.3s ease;
  background: none;
  border: none;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover,
.modal-close:focus {
  color: #86b097;
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 30px;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background-color: #ffffff;
  color: #3a4750;
  border: 2px solid #e8ebe8;
  padding: 16px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.google-btn:hover {
  background-color: #f8fbf8;
  border-color: #86b097;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(134, 176, 151, 0.2);
}

.google-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(134, 176, 151, 0.15);
}

.auth-status {
  margin-top: 25px;
  text-align: center;
  min-height: 30px;
}

.auth-status p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

/* Loading Modal */
.loading-content {
  text-align: center;
  padding: 30px 20px;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #86b097;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

/* Error Modal */
.error-content {
  text-align: center;
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.error-content .btn {
  margin-top: 1.5rem;
  padding: 0.75rem 2rem;
  background: #2f5d3f;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.error-content .btn:hover {
  background: #1e3d2a;
  transform: translateY(-2px);
}

/* Download Section */
.download-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 35px;
}

.download-btn {
  background: linear-gradient(135deg, #86b097, #9ac4ab);
  color: #03221a;
  border: none;
  padding: 18px 32px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(134, 176, 151, 0.25);
}

.download-btn:hover {
  background: linear-gradient(135deg, #9ac4ab, #aed4bc);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(134, 176, 151, 0.35);
}

.download-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(134, 176, 151, 0.25);
}

/* Responsive Design */
@media (max-width: 900px) {
  .card-main {
    flex-direction: column;
    padding: 0 1.5rem;
  }

  .card-media {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
  }

  .actions {
    flex-direction: column;
  }

  .main-nav {
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  /* PDF Viewer Mobile */
  .pdf-viewer-header {
    padding: 0.8rem 1rem;
  }
  
  .pdf-viewer-title {
    font-size: 0.9rem;
    flex: 1;
  }
  
  .pdf-viewer-title span:last-child {
    display: none;
  }
  
  .pdf-viewer-close {
    width: 40px;
    height: 40px;
    font-size: 1.8rem;
  }
}

@media (max-width: 600px) {
  .header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.8rem 1rem;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
  }

  .nav-link {
    font-size: 0.9rem;
    padding: 0.3rem 0;
  }

  .hero-section {
    padding: 1.2rem 1rem;
  }

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

  .card-main {
    padding: 0 1rem;
  }

  .card-wrapper {
    flex-direction: column;
  }

  .card-media {
    flex: unset;
    padding: 1.2rem;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .card-details {
    padding: 1.5rem;
  }

  .card-details h2 {
    font-size: 1.5rem;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .success-notification {
    right: 10px;
    left: 10px;
  }

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

  .auth-modal-content {
    width: 95%;
    padding: 40px 25px;
    margin: 20% auto;
  }
  
  .auth-modal-content h2 {
    font-size: 24px;
  }
  
  .auth-modal-content h3 {
    font-size: 20px;
  }
  
  .google-btn {
    font-size: 15px;
    padding: 14px 22px;
  }
  
  .download-btn {
    font-size: 15px;
    padding: 15px 26px;
  }
  
  .modal-close {
    top: 15px;
    right: 15px;
    font-size: 28px;
  }

  /* PDF Viewer Mobile */
  .pdf-viewer-header {
    padding: 0.6rem 0.8rem;
  }
  
  .pdf-viewer-title {
    font-size: 0.85rem;
  }
  
  .viewer-icon {
    font-size: 1.1rem;
  }
  
  .pdf-viewer-close {
    width: 36px;
    height: 36px;
    font-size: 1.6rem;
  }
}