/* style.css - Updated Colors: Teal-Green Palette (Psychologically Attractive: Calming, Friendly, Cool - Evokes Harmony, Growth, Trust) */

/* Global Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #0d9488 0%, #10b981 50%, #34d399 100%); /* Teal to emerald green: Cool, friendly, nature-inspired for psychological appeal */
  background-attachment: fixed;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* Modal Styles (Updated Colors) */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
  animation: fadeIn 0.3s;
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: slideInModal 0.3s ease-out;
}

.modal-header {
  padding: 20px;
  background: linear-gradient(135deg, #0d9488, #10b981); /* Matching teal-green */
  color: white;
  border-radius: 15px 15px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.8em;
}

.close-btn {
  color: white;
  font-size: 28px;
  font-weight: bold;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.close-btn:hover {
  background: rgba(255,255,255,0.2);
}

.modal-body {
  padding: 20px;
  color: #333;
  line-height: 1.6;
}

.modal-body h3 {
  color: #0d9488; /* Teal */
  margin-top: 20px;
}

.modal-body ul {
  margin: 10px 0;
  padding-left: 20px;
}

.modal-footer {
  padding: 20px;
  background: #f8f9fa;
  border-top: 1px solid #ddd;
  border-radius: 0 0 15px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.modal-footer label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

#agree-btn {
  padding: 12px 30px;
  background: linear-gradient(135deg, #0d9488, #10b981); /* Matching */
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s;
  font-family: 'Poppins', sans-serif;
}

#agree-btn:hover:not(:disabled) {
  transform: scale(1.02);
}

#agree-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInModal {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Top Navigation - Updated Colors */
.top-nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #333;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  color: #0d9488; /* Teal */
}

.logo .icon {
  margin-right: 8px;
  font-size: 24px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
  60% { transform: translateY(-3px); }
}

.nav-links {
  display: flex;
  gap: 25px;
}

.nav-links a {
  color: #0d9488; /* Teal */
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 20px;
}

.nav-links a:hover {
  color: #10b981; /* Emerald hover */
  transform: scale(1.05);
  background: rgba(13, 148, 136, 0.1);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #0d9488;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Features Dashboard - Updated Colors */
.features-dashboard {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  overflow: hidden;
}

.dashboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.dashboard-link {
  text-decoration: none;
  color: #0d9488; /* Teal */
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 25px;
  transition: all 0.3s ease;
  
  white-space: nowrap;
}

.dashboard-link:hover {
  background: linear-gradient(135deg, #0d9488, #10b981); /* Teal-green gradient */
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

/* Hero/Section Headers - Updated Text Shadow */
.section-hero {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  padding: 0 10px;
}

.section-title {
  font-size: clamp(1.8em, 5vw, 2.5em);
  font-weight: 700;
  color: white;
  margin: 0 0 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.section-subtitle {
  font-size: clamp(1em, 3vw, 1.2em);
  color: rgba(255,255,255,0.95);
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Search - Updated Focus Shadow */
.search-wrapper {
  text-align: center;
  margin-bottom: 40px;
  padding: 0 10px;
}

.search-container {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 600px;
}

.search-input {
  width: 100%;
  padding: 16px 20px 16px 50px;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.search-input:focus {
  outline: none;
  box-shadow: 0 12px 40px rgba(13, 148, 136, 0.3);
  transform: scale(1.02);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #999;
  pointer-events: none;
}

.search-input::placeholder {
  color: #999;
}

/* Grid - Unchanged */
.grid, .faculty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
  padding: 0 10px;
}

/* No Results - Updated Background */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 4vw, 18px);
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

/* Cards - Updated Borders and Shadows */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  animation: slideIn 0.6s ease-out both;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}

.card:hover::before {
  left: 100%;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  border-color: #0d9488; /* Teal */
}

.card:active {
  transform: translateY(-5px) scale(1.01);
}

.card-icon {
  font-size: 32px;
  margin-bottom: 12px;
  animation: pulse 2s infinite;
  text-align: center;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.code {
  font-weight: 600;
  color: #0d9488; /* Teal */
  margin: 0 0 8px 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

.title {
  color: #555;
  font-size: 16px;
  line-height: 1.4;
  margin: 0 0 12px 0;
  font-weight: 500;
  text-align: center;
}

.vibe-tag {
  background: linear-gradient(135deg, #0d9488, #10b981); /* Matching */
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  align-self: center;
  margin-top: auto;
}

.view-count {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  color: #999;
  font-size: 14px;
}

.view-count .icon {
  margin-right: 4px;
  font-size: 16px;
}

/* Faculty Card Specific - Updated Colors */
.faculty-card .card-icon {
  font-size: 32px;
  color: #0d9488;
}

.faculty-card .name {
  font-weight: 600;
  color: #333;
  margin: 0 0 4px;
  font-size: 18px;
  text-align: center;
}

.faculty-card .course {
  color: #666;
  font-size: 14px;
  margin-bottom: 8px;
  text-align: center;
}

.faculty-card .phone {
  color: #999;
  font-size: 14px;
  margin-bottom: 8px;
  text-align: center;
}

.faculty-card .rating {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
}

.faculty-card .stars {
  color: #ffd700;
  font-size: 18px;
}

/* Assignment Card Specific - Updated Icon Color */
.assignment-card .card-icon {
  font-size: 32px;
  color: #10b981; /* Emerald */
}

.assignment-card .assignment-link {
  color: #0d9488;
  font-size: 14px;
  margin-top: 8px;
  text-decoration: none;
  font-weight: 500;
  text-align: center;
  display: block;
}

.assignment-card .assignment-link:hover {
  text-decoration: underline;
}

/* Calculator Sections - Updated Background and Button Colors */
.calculator-section {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px 20px;
  margin: 40px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  animation: fadeInUp 1s ease 0.6s both;
  text-align: center;
}

.calculator {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
  color: #333;
  max-width: 400px;
  margin: 0 auto;
  position: relative;
}

.input-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  gap: 10px;
}

.input-group label {
  flex: 1;
  font-weight: 500;
  color: #555;
  min-width: 0;
}

.input-group input, 
.input-group select, 
.input-group textarea {
  flex: 1.5;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  text-align: center;
  background-color: #fff;
  color: #333;
  transition: border-color 0.3s;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
}

.input-group input:focus, 
.input-group select:focus, 
.input-group textarea:focus {
  outline: none;
  border-color: #0d9488; /* Teal */
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2);
}

.calculator button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #0d9488, #10b981); /* Teal-green gradient */
  color: white;
  font-weight: bold;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  min-height: 48px;
}

.calculator button:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

#result {
  margin-top: 20px;
  font-size: clamp(28px, 8vw, 36px);
  font-weight: bold;
  text-align: center;
  color: #0d9488; /* Teal */
  background: rgba(13, 148, 136, 0.1);
  padding: 15px;
  border-radius: 10px;
}

/* Attendance Specific */
.attendance-calc #attendance-result {
  text-align: center;
  margin-top: 20px;
}

.attendance-percent {
  font-size: clamp(32px, 10vw, 48px);
  font-weight: bold;
  color: #0d9488;
  margin-bottom: 10px;
}

#attendance-note {
  color: #666;
  font-size: 16px;
  margin: 0;
}

/* Assignment & Request Sections - Updated Background */
.assignment-section, .request-section, .faculty-section {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px 20px;
  margin: 40px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  animation: fadeInUp 1s ease 0.6s both;
  text-align: center;
}

.request-form {
  max-width: 500px;
  margin: 0 auto;
}

.request-form .input-group {
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.request-form .input-group label {
  flex: none;
  margin-bottom: 5px;
  color: #333;
  font-weight: 500;
}

.request-form .input-group input,
.request-form .input-group select,
.request-form .input-group textarea {
  width: 100%;
  padding: 12px;
}

/* Announcement and Contributor Cards - Updated Link Color */
.announcement-card .date,
.contributor-card .date {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
  text-align: left;
}

.announcement-card .content,
.contributor-card .about {
  font-size: 1rem;
  line-height: 1.5;
  color: #111827;
  margin-bottom: 0.5rem;
  text-align: left;
}

.contributor-card .photo {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.75rem;
  align-self: center;
}

.contributor-card .insta {
  color: #10b981; /* Emerald for links */
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  text-align: center;
  display: block;
  margin-bottom: 0.5rem;
}

.contributor-card .insta:hover {
  text-decoration: underline;
}

.announcement-card .title,
.contributor-card .name {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #111827;
  text-align: left;
}

/* About, Credits, and Privacy Sections */
.about-section, .privacy-section, .credits-section {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px 20px;
  margin: 40px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  animation: fadeInUp 1s ease 0.6s both;
  text-align: center;
}

.about-content, .privacy-content, .credits-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.content-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 24px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.content-card h3 {
  color: #0d9488;
  margin-bottom: 12px;
  font-size: 1.2em;
}

.content-card ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.content-card li {
  margin-bottom: 8px;
  color: #555;
}

.content-footer {
  text-align: center;
  color: rgba(255,255,255,0.9);
  font-style: italic;
}

.policy-article {
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.policy-article h3 {
  color: #0d9488;
  margin-bottom: 12px;
  font-size: 1.3em;
}

.policy-article ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.policy-article li {
  margin-bottom: 8px;
  color: #555;
}

/* Footer Styles */
.footer {
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 20px;
  margin-top: 60px;
  text-align: center;
}

.footer-links {
  margin-bottom: 10px;
  font-size: 0.9em;
}

.footer-links a {
  color: #10b981; /* Emerald */
  text-decoration: none;
  margin: 0 5px;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #34d399;
  text-decoration: underline;
}

.footer-links span {
  color: rgba(255, 255, 255, 0.5);
  margin: 0 5px;
}

.footer-bottom {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85em;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Comprehensive Responsive Design - Unchanged */
@media (max-width: 1024px) {
  .grid, .faculty-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
  
  .dashboard-list {
    gap: 12px;
  }

  .content-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  .grid,
  .faculty-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .dashboard-list {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .dashboard-link {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }

  .top-nav {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }

  .nav-links {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .input-group {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .input-group label {
    text-align: left;
  }

  .input-group input, 
  .input-group select, 
  .input-group textarea {
    width: 100%;
    margin-top: 0;
  }

  .calculator-section, 
  .assignment-section, 
  .request-section, 
  .faculty-section,
  .about-section,
  .privacy-section,
  .credits-section {
    padding: 30px 15px;
    margin: 30px 0;
  }

  .attendance-percent {
    font-size: 36px;
  }

  .no-results {
    padding: 30px 15px;
    font-size: 16px;
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
    max-height: 90vh;
  }

  .modal-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .close-btn {
    align-self: flex-end;
  }

  .modal-footer {
    flex-direction: column;
    gap: 10px;
  }

  .modal-footer label {
    justify-content: center;
  }

  .calculator {
    padding: 25px 20px;
    max-width: 100%;
  }

  .footer {
    padding: 15px;
  }

  .footer-links {
    font-size: 0.8em;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .policy-article {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .top-nav, .features-dashboard {
    padding: 12px;
  }
  
  .search-input {
    padding: 14px 16px 14px 45px;
    font-size: 16px;
  }
  
  .card {
    padding: 20px;
  }
  
  .calculator button {
    padding: 16px;
  }

  .content-card {
    padding: 20px;
  }

  .footer-links a,
  .footer-links span {
    margin: 0 3px;
    font-size: 0.75em;
  }
}