/* 
  Mania Technologies - Global Styles
  Theme: Modern Silicon Valley (Stripe/Linear inspired)
*/

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

:root {
  /* Color Palette */
  --primary: #0A2540;
  --primary-light: #183859;
  --accent: #2563EB;
  --accent-dark: #1D4ED8;
  --background: #F8FAFC;
  --surface: #FFFFFF;
  --text: #1E293B;
  --text-light: #64748B;
  --border: #E2E8F0;
  
  /* Spacing */
  --container-width: 1200px;
  --header-height: 70px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Transitions */
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(10, 37, 64, 0.03) 0px, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230A2540' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.5rem;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

/* Utility Classes */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%; /* Ensure container takes full available width */
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background-color: var(--accent);
  color: white;
  border: 2px solid var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

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

.section-padding {
  padding: 5rem 0;
}

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

.grid {
  display: grid;
  gap: 2rem;
}

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

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

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

/* Header & Navigation */
header {
  height: 70px; /* Reduced from 80px */
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  align-items: center; /* Vertically center content */
  justify-content: center; /* Horizontally center the container */
}

nav {
  display: flex;
  justify-content: space-between; /* Pushes logo to left, links to right */
  align-items: center;
  height: 100%;
  width: 100%;
}

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

.logo span {
  color: var(--accent);
}

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

.nav-links a {
  font-weight: 500;
  color: var(--text);
  font-size: 0.95rem;
}

.nav-links a:hover, .nav-links a.active, .dropbtn.active {
  color: var(--accent);
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
  height: 100%;
  display: flex;
  align-items: center;
}

.dropbtn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  height: 100%;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  min-width: 220px;
  box-shadow: var(--shadow-lg);
  border-radius: 8px;
  padding: 0.5rem 0;
  z-index: 1001;
  border: 1px solid var(--border);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.dropdown-content a {
  color: var(--text);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  display: block;
  transition: var(--transition);
}

.dropdown-content a:hover {
  background-color: #F1F5F9;
  color: var(--accent);
}

.dropdown:hover .dropdown-content {
  display: block;
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: 8rem 0 6rem;
  background-color: transparent;
  background-image: 
    linear-gradient(to bottom, rgba(248, 250, 252, 0.9), rgba(248, 250, 252, 0.8)),
    url("https://picsum.photos/seed/tech_architecture/1920/1080");
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Services Section */
.services {
  background-color: transparent; /* Let body pattern show through */
}

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

.section-header h2 {
  margin-bottom: 1rem;
}

.service-card {
  background: var(--background);
  padding: 2rem;
  border-radius: 16px;
  transition: var(--transition);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
  background: white;
}

.service-icon {
  width: 50px;
  height: 50px;
  background-color: #DBEAFE;
  color: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.service-link {
  margin-top: auto;
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-link:hover {
  gap: 0.75rem;
}

/* Why Choose Us */
.features {
  background-color: var(--primary);
  background-image: 
    linear-gradient(180deg, rgba(10, 37, 64, 0.92) 0%, rgba(15, 23, 42, 0.95) 100%),
    url("https://picsum.photos/seed/circuit_board/1920/1080");
  background-size: cover;
  background-position: center;
  color: white;
  position: relative;
}

.features h2, .features p {
  color: white;
  position: relative;
  z-index: 1;
}

.features p {
  opacity: 0.8;
}

.feature-item {
  padding: 1.5rem;
  border-left: 1px solid rgba(255,255,255,0.1);
}

.feature-item h3 {
  font-size: 1.25rem;
  color: white;
}

/* Stats / Client Impact */
.stats {
  background-color: transparent;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}

.stat-label {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--primary);
}

/* CTA Section */
.cta {
  background-color: var(--primary);
  background-image: 
    linear-gradient(135deg, rgba(10, 37, 64, 0.9) 0%, rgba(10, 37, 64, 0.95) 100%),
    url("https://picsum.photos/seed/server_room/1920/800");
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 6rem 0;
  position: relative;
}

.cta h2 {
  color: white;
  margin-bottom: 1.5rem;
}

.cta .btn {
  background-color: white;
  color: var(--primary);
  border: none;
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
}

.cta .btn:hover {
  background-color: #f1f5f9;
  transform: scale(1.05);
}

/* Footer */
footer {
  background-color: #020617;
  background-image: 
    radial-gradient(at 50% 0%, rgba(37, 99, 235, 0.05) 0px, transparent 50%);
  color: #94a3b8;
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  color: white;
  margin-bottom: 1rem;
}

.footer-col h4 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

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

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

/* Sub-page Specific Styles */
.page-header {
  background-color: var(--primary);
  background-image: 
    linear-gradient(135deg, rgba(10, 37, 64, 0.9) 0%, rgba(37, 99, 235, 0.85) 100%),
    url("https://picsum.photos/seed/digital_network/1920/600");
  background-size: cover;
  background-position: center;
  color: white;
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header h1 {
  color: white;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.page-header p {
  color: rgba(255,255,255,0.9);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.expertise-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  border: 1px solid var(--border);
}

.expertise-card h3 {
  color: var(--accent);
}

.project-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: var(--transition);
}

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

.project-content {
  padding: 2rem;
}

.project-tag {
  display: inline-block;
  background-color: #DBEAFE;
  color: var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.testimonial {
  background-color: var(--primary);
  color: white;
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  position: relative;
}

.testimonial quote {
  font-size: 1.5rem;
  font-style: italic;
  display: block;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.testimonial cite {
  font-weight: 600;
  font-style: normal;
  opacity: 0.9;
}

/* Contact Form */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  background: white;
  padding: 3rem;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  margin-top: -3rem;
}

.contact-info-item {
  margin-bottom: 2rem;
}

.contact-info-item h4 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

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

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  h1 { font-size: 2.5rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { 
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: white;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--border);
    align-items: flex-start;
    gap: 1rem;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }
  
  .nav-links.active {
    display: flex;
  }

  .mobile-menu-btn { display: block; }
  
  /* Mobile Dropdown Reset */
  .dropdown {
    display: block;
    width: 100%;
    height: auto;
  }

  .dropbtn {
    width: 100%;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-weight: 600;
    color: var(--primary);
  }

  .dropdown-content {
    display: block; /* Always show in mobile or toggle with JS if preferred, keeping simple for now */
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    width: 100%;
    animation: none;
    background-color: transparent;
  }

  .dropdown-content a {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
  }

  .dropdown-content a:hover {
    background-color: transparent;
    color: var(--accent);
  }
  
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  
  .contact-container { grid-template-columns: 1fr; }
  
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  
  .hero { padding: 6rem 0 4rem; }
  
  .feature-item { border-left: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
}
