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

/* CSS Variables for Premium Dark Theme */
:root {
  --bg-primary: #090b0f;
  --bg-secondary: #11141d;
  --bg-tertiary: #171c28;
  --accent-purple: #9333ea;
  --accent-blue: #0084ff;
  --accent-pink: #ec4899;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --glass-bg: rgba(17, 20, 29, 0.6);
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-border-hover: rgba(0, 132, 255, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.7);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(59, 82, 246, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 11, 15, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1.2rem 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.logo-text-gradient {
  background: linear-gradient(135deg, #fff 30%, var(--accent-blue) 70%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo span {
  color: #fff;
}

.logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
}


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

.nav-link {
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  font-size: 0.95rem;
  cursor: pointer;
}

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

.menu-toggle {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: var(--font-body);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: #fff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

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

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Hero Section */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
}

.hero h1 {
  font-family: var(--font-title);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* Project Showcase Section */
.showcase {
  padding: 2rem 0 6rem;
}

.section-title {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.section-title::after {
  content: '';
  height: 1px;
  flex-grow: 1;
  background: linear-gradient(to right, var(--glass-border-hover), transparent);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

/* Project Card Style */
.project-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
  padding: 1px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  background: var(--bg-secondary);
}

.project-card:hover::before {
  opacity: 1;
}

.project-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
  background-color: var(--bg-tertiary);
}

.project-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-card h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #fff;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-blue);
  background: rgba(59, 82, 246, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* Footer Section */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding: 4rem 0 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

.footer-brand p {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-contact h4,
.footer-links h4 {
  font-family: var(--font-title);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  position: relative;
}

.footer-contact h4::after,
.footer-links h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 30px;
  height: 2px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-radius: 1px;
}

.footer-contact ul,
.footer-links ul {
  list-style: none;
}

.footer-contact li,
.footer-links li {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.footer-contact li i {
  color: var(--accent-blue);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-contact li a,
.footer-links li a {
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-contact li a:hover,
.footer-links li a:hover {
  color: var(--accent-pink);
  transform: translateX(3px);
}

.footer-links li a {
  display: inline-block;
}

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-primary);
}

/* Admin Auth Panel Overlay */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(9, 11, 15, 0.95);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: var(--transition);
}

.auth-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.auth-card {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.auth-card h2 {
  font-family: var(--font-title);
  margin-bottom: 1rem;
}

.auth-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.auth-error {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  text-align: left;
  display: none;
}

/* Admin Dashboard Section */
.admin-dashboard {
  padding: 3rem 0;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.admin-header h1 {
  font-family: var(--font-title);
}

.admin-table-container {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 3rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}

th {
  background: var(--bg-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: var(--font-title);
}

td {
  font-size: 0.95rem;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

.td-img {
  width: 80px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  background-color: var(--bg-tertiary);
}

.td-actions {
  display: flex;
  gap: 0.5rem;
}

/* Modal Dialogs */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(9, 11, 15, 0.8);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  width: 100%;
  max-width: 550px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: translateY(20px);
  transition: var(--transition);
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.modal-header h2 {
  font-family: var(--font-title);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: #fff;
}

.image-preview-container {
  margin-top: 0.5rem;
  width: 100%;
  height: 150px;
  border: 2px dashed var(--glass-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-tertiary);
  position: relative;
}

.image-preview-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-preview-placeholder {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--accent-purple);
  border-left: 5px solid var(--accent-purple);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  z-index: 1001;
  transform: translateY(150%);
  transition: var(--transition);
}

.toast.show {
  transform: translateY(0);
}

.toast.success {
  border-color: #10b981;
  border-left-color: #10b981;
}

.toast.error {
  border-color: #ef4444;
  border-left-color: #ef4444;
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #25d366;
  color: #fff;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.1) rotate(8deg);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
  background-color: #128c7e;
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  animation: pulse-whatsapp 2s infinite;
}

@keyframes pulse-whatsapp {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

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

/* Responsive Rules */
@media (max-width: 768px) {
  header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }
  .logo {
    font-size: 1.35rem;
    gap: 0.6rem;
  }
  .logo-img {
    height: 48px; /* Larger logo on mobile */
  }
  .menu-toggle {
    display: block;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
  }
  .menu-toggle i, .menu-toggle svg {
    width: 28px;
    height: 28px;
  }
  .menu-toggle:hover {
    color: var(--accent-blue);
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(9, 11, 15, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    align-items: stretch;
    z-index: 99;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.8);
  }
  .nav-links.active {
    display: flex;
    animation: slideDown 0.3s ease-out forwards;
  }
  .nav-link {
    font-size: 1.05rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: block;
    text-align: center;
  }
  .nav-links .btn {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    margin-top: 0.5rem;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  th, td {
    padding: 0.8rem 1rem;
  }
  .whatsapp-float {
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
  }
  .whatsapp-float svg {
    width: 28px;
    height: 28px;
  }
  .toast {
    bottom: 2rem;
    left: 2rem;
  }
}
