/* ===========================
   AI Foundry - Modern Professional Design
   ========================== */

/* CSS Variables */
:root {
  --primary-color: #0066FF;
  --secondary-color: #00D4FF;
  --dark-bg: #0A1128;
  --dark-card: #1A2642;
  --text-primary: #FFFFFF;
  --text-secondary: #B0B8C8;
  --accent-gradient: linear-gradient(135deg, #0066FF 0%, #00D4FF 100%);
  --shadow-sm: 0 2px 8px rgba(0, 102, 255, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 102, 255, 0.15);
  --shadow-lg: 0 8px 32px rgba(0, 102, 255, 0.2);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 17, 40, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 102, 255, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-menu a {
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width 0.3s;
  pointer-events: none;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--text-primary);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  padding: 5px;
}

.mobile-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  transition: var(--transition);
  pointer-events: none;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 120px 20px 60px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(0, 212, 255, 0.05) 100%);
  z-index: 0;
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #FFFFFF 0%, #00D4FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
  pointer-events: none;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(0, 102, 255, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(0, 102, 255, 0.6);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
section {
  padding: 80px 20px;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--accent-gradient);
  border-radius: 2px;
  pointer-events: none;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.2rem;
  max-width: 700px;
  margin: 1.5rem auto 0;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.card {
  background: var(--dark-card);
  border-radius: 16px;
  padding: 2rem;
  transition: var(--transition);
  border: 1px solid rgba(0, 102, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform 0.3s;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.card p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* Team Cards */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.team-card {
  text-align: center;
  background: var(--dark-card);
  border-radius: 16px;
  padding: 2rem;
  transition: var(--transition);
  border: 1px solid rgba(0, 102, 255, 0.1);
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.team-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  object-fit: cover;
  border: 4px solid var(--primary-color);
}

.team-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.team-card .role {
  color: var(--secondary-color);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.team-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Blog Cards */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.blog-card {
  background: var(--dark-card);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid rgba(0, 102, 255, 0.1);
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.blog-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.blog-content {
  padding: 2rem;
}

.blog-meta {
  display: flex;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.blog-content h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.blog-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.read-more {
  color: var(--secondary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.read-more:hover {
  gap: 0.75rem;
}

/* Article Page */
.article-hero {
  padding: 140px 20px 60px;
  text-align: center;
  background: var(--dark-card);
}

.article-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 20px;
}

.article-featured-img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  margin-bottom: 3rem;
}

.article-content h2 {
  font-size: 2rem;
  margin: 2.5rem 0 1rem;
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

.article-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.article-content ul,
.article-content ol {
  color: var(--text-secondary);
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.article-content li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

/* Contact Form */
.contact-section {
  background: var(--dark-card);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.contact-item h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.contact-item p {
  color: var(--text-secondary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 102, 255, 0.2);
  background: rgba(26, 38, 66, 0.5);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

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

/* Map */
.map-container {
  width: 100%;
  height: 400px;
  border-radius: 16px;
  overflow: hidden;
  margin-top: 3rem;
  border: 1px solid rgba(0, 102, 255, 0.2);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Stats Section */
.stats {
  background: var(--dark-card);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stat-card {
  text-align: center;
  padding: 2rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Footer */
footer {
  background: rgba(10, 17, 40, 0.95);
  padding: 60px 20px 20px;
  border-top: 1px solid rgba(0, 102, 255, 0.1);
}

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

.footer-col h3 {
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.footer-col p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

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

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--secondary-color);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 102, 255, 0.1);
  color: var(--text-secondary);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: var(--dark-card);
  padding: 1.5rem 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: none;
  align-items: center;
  gap: 2rem;
  z-index: 1001;
  border: 1px solid rgba(0, 102, 255, 0.2);
  max-width: 600px;
  margin: 0 auto;
}

.cookie-banner.show {
  display: flex;
}

.cookie-banner p {
  flex: 1;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.cookie-banner button {
  padding: 0.75rem 1.5rem;
  background: var(--accent-gradient);
  color: var(--text-primary);
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    flex-direction: column;
    background: rgba(10, 17, 40, 0.98);
    width: 100%;
    padding: 2rem;
    gap: 1rem;
    transition: left 0.3s;
    border-bottom: 1px solid rgba(0, 102, 255, 0.2);
  }

  .nav-menu.active {
    left: 0;
  }

  .mobile-toggle {
    display: flex;
  }

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

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

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

  .hero {
    min-height: 80vh;
    padding: 100px 20px 40px;
  }

  .btn-group {
    flex-direction: column;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .card-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .cookie-banner {
    flex-direction: column;
    gap: 1rem;
    bottom: 10px;
    left: 10px;
    right: 10px;
  }

  .cookie-banner button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.2rem;
  }

  .logo img {
    width: 40px;
    height: 40px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .card,
  .team-card {
    padding: 1.5rem;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mt-4 {
  margin-top: 4rem;
}

.hidden {
  display: none;
}
