/* ============================================
   AlgoTech IT — Reusable Components
   Nav, Footer, Buttons, Cards, Team
   ============================================ */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(37, 99, 235, 0.35);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-outline:hover {
  border-color: var(--accent-primary);
  color: var(--accent-glow);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 22px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.05rem;
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition-base);
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  padding: 10px 0;
  background: rgba(10, 14, 26, 0.95);
  border-bottom-color: var(--border-color);
  box-shadow: var(--shadow-md);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}

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

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
}

.nav-logo span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width var(--transition-base);
  border-radius: 1px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  width: 100%;
}

.nav-cta {
  margin-left: 8px;
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-base);
}

.card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  background: var(--bg-card-hover);
}

.card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  color: var(--accent-glow);
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.card h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.card p {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Featured Card (Web Dev) */
.card-featured {
  border-color: rgba(37, 99, 235, 0.2);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(6, 182, 212, 0.05));
  position: relative;
  overflow: hidden;
}

.card-featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

/* ---------- Service List ---------- */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.service-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.service-list li svg {
  width: 18px;
  height: 18px;
  color: var(--accent-cyan);
  flex-shrink: 0;
  margin-top: 3px;
}

/* ---------- Check Items ---------- */
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.check-item:hover {
  border-color: rgba(37, 99, 235, 0.3);
  background: var(--bg-card-hover);
}

.check-item svg {
  width: 22px;
  height: 22px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.check-item span {
  font-weight: 500;
  font-size: 0.95rem;
}

/* ---------- Project Cards ---------- */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.project-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.project-card-image {
  width: 100%;
  height: 220px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.project-card-image .placeholder-icon {
  color: var(--text-muted);
}

.project-card-image .placeholder-icon svg {
  width: 48px;
  height: 48px;
}

.project-card-body {
  padding: 24px;
}

.project-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.project-card-body .tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tech-tag {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-glow);
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.project-card-body p {
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* ---------- Blog Cards ---------- */
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.blog-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-body {
  padding: 24px;
}

.blog-card .category-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.blog-card-body .blog-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.blog-card-body p {
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* ---------- Team Cards ---------- */
.team-section-ceo {
  text-align: center;
  padding: 60px 0;
}

.ceo-card {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 48px;
  background: var(--bg-card);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-xl);
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.ceo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

.ceo-photo {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid rgba(37, 99, 235, 0.3);
  box-shadow: 0 0 40px rgba(37, 99, 235, 0.15);
}

.ceo-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ceo-photo .photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 3rem;
  font-weight: 700;
}

.ceo-info {
  text-align: left;
}

.ceo-info h3 {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.ceo-info .ceo-title {
  color: var(--accent-glow);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.ceo-info blockquote {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  font-style: italic;
  margin-bottom: 24px;
  position: relative;
  padding-left: 20px;
  border-left: 3px solid var(--accent-primary);
}

.ceo-signature {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.ceo-signature span {
  display: block;
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.85rem;
}

/* Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition-base);
}

.team-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.team-card-photo {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 0 auto 20px;
  border: 2px solid var(--border-color);
  transition: border-color var(--transition-base);
}

.team-card:hover .team-card-photo {
  border-color: var(--accent-primary);
}

.team-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card-photo .photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 1.8rem;
  font-weight: 700;
}

.team-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.team-card .role {
  color: var(--accent-glow);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ---------- Filter Tabs ---------- */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 10px 24px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

/* ---------- CTA Section ---------- */
.cta-section {
  text-align: center;
  padding: 100px 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(6, 182, 212, 0.05));
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.cta-section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.cta-section p {
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Page Header (Inner Pages) ---------- */
.page-header {
  padding: 140px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.page-header p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.page-header .breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.page-header .breadcrumb a {
  color: var(--text-secondary);
}

.page-header .breadcrumb span {
  color: var(--accent-glow);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 16px;
  line-height: 1.7;
}

.footer-brand .tagline {
  color: var(--accent-glow);
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-glow);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  color: var(--accent-glow);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

.footer-socials a:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.footer-socials a svg {
  width: 18px;
  height: 18px;
}

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

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-group select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.form-error {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 6px;
  display: none;
}

.form-group.error input,
.form-group.error textarea,
.form-group.error select {
  border-color: #ef4444;
}

.form-group.error .form-error {
  display: block;
}

.form-success {
  padding: 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-sm);
  color: #22c55e;
  text-align: center;
  display: none;
  margin-top: 16px;
}

/* ---------- Contact Info ---------- */
.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-info-item:last-child {
  margin-bottom: 0;
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  border-radius: var(--radius-md);
  color: var(--accent-glow);
  flex-shrink: 0;
}

.contact-info-icon svg {
  width: 20px;
  height: 20px;
}

.contact-info-item h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.contact-info-item p {
  font-size: 0.9rem;
}

/* ---------- Values Cards ---------- */
.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  transition: all var(--transition-base);
}

.value-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.value-card .value-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  border-radius: var(--radius-md);
  margin: 0 auto 20px;
  color: var(--accent-glow);
}

.value-card .value-icon svg {
  width: 28px;
  height: 28px;
}

.value-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.value-card p {
  font-size: 0.9rem;
}

/* ---------- Service Detail ---------- */
.service-detail {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-color);
}

.service-detail:last-child {
  border-bottom: none;
}

.service-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.service-detail-header .service-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  border-radius: var(--radius-md);
  color: var(--accent-glow);
}

.service-detail-header .service-icon svg {
  width: 26px;
  height: 26px;
}

.service-detail h2 {
  font-size: 1.75rem;
}

.service-detail > p {
  font-size: 1.05rem;
  margin-bottom: 30px;
  max-width: 700px;
}

.service-sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.service-sub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--transition-base);
}

.service-sub-card:hover {
  border-color: rgba(37, 99, 235, 0.2);
  background: var(--bg-card-hover);
}

.service-sub-card h4 {
  font-size: 1rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-sub-card h4 svg {
  width: 18px;
  height: 18px;
  color: var(--accent-cyan);
}

.service-sub-card p {
  font-size: 0.9rem;
}

/* ---------- Mission/Vision Cards ---------- */
.mv-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.mv-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

.mv-card .mv-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-glow);
  font-weight: 600;
  margin-bottom: 12px;
}

.mv-card h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.mv-card p {
  font-size: 1rem;
  line-height: 1.8;
}

/* ---------- Responsive Components ---------- */
@media (max-width: 768px) {
  .navbar .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    background: var(--bg-secondary);
    padding: 80px 32px 32px;
    gap: 24px;
    transition: right var(--transition-base);
    border-left: 1px solid var(--border-color);
    z-index: 999;
  }

  .navbar .nav-links.active {
    right: 0;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-cta {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }

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

  .ceo-card {
    flex-direction: column;
    text-align: center;
    padding: 36px 24px;
    gap: 24px;
  }

  .ceo-info {
    text-align: center;
  }

  .ceo-info blockquote {
    text-align: left;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-section h2 {
    font-size: 1.75rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  /* Contact page responsive */
  #contact-form [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .ceo-photo {
    width: 150px;
    height: 150px;
  }

  .filter-tabs {
    gap: 6px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}
