/*
Theme Name: Macro India Safe
Author: Santosh Shinde
Description: Safe, error-free WordPress theme for Macro India Engineering Technologies.
Version: 1.0
License: GPL v2 or later
*/

:root {
  --color-primary: #1e40af;
  --color-secondary: #64748b;
  --color-white: #ffffff;
  --color-text: #333333;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background: linear-gradient(135deg, #1e40af 0%, #64748b 50%, #ffffff 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Welcome Animation */
.welcome-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.8s ease-out;
}

.welcome-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.welcome-content {
  text-align: center;
  color: white;
  max-width: 800px;
  padding: 2rem;
}

.logo-container {
  margin-bottom: 2rem;
}

/* FIXED: Logo only spins during welcome animation */
.welcome-screen .miet-logo {
  background: #ffffff;
  color: #1e40af;
  padding: 20px 40px;
  border-radius: 15px;
  font-weight: bold;
  font-size: 2.5rem;
  display: inline-block;
  animation: logoSpin 2s ease-in-out infinite;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@keyframes logoSpin {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
}

.welcome-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease-out 0.5s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2rem;
}

.loading-progress {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #3b82f6, #1e40af);
  border-radius: 2px;
  animation: loadingProgress 3.5s ease-in-out forwards;
}

@keyframes loadingProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* Main Site */
.main-site {
  transition: opacity 0.8s ease-in;
}

.main-site.hidden {
  opacity: 0;
}

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

/* Header */
.header {
  background: rgba(30, 64, 175, 0.95);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Header logo doesn't spin */
.miet-logo.small {
  background: #ffffff;
  color: #1e40af;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.2rem;
  transition: transform 0.3s;
}

.miet-logo.small:hover {
  transform: scale(1.05);
}

.company-info h1 {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.company-info p {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Navigation */
.nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav a {
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  transition: all 0.3s;
  font-weight: 500;
  cursor: pointer;
}

.nav a:hover,
.nav a.active {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: white;
  margin: 3px 0;
  transition: 0.3s;
}

/* Page content */
.page {
  display: none;
  min-height: calc(100vh - 200px);
  padding: 3rem 0;
}

.page.active {
  display: block;
  animation: pageSlideIn 0.5s ease-out;
}

@keyframes pageSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Section */
.hero {
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  padding: 4rem 2rem;
  border-radius: 20px;
  margin-bottom: 3rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.hero h1 {
  font-size: 3rem;
  color: #1e40af;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.3rem;
  color: #64748b;
  margin-bottom: 1rem;
}

.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  padding: 15px 35px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 2rem;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(30, 64, 175, 0.3);
  cursor: pointer;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(30, 64, 175, 0.4);
}

/* Features Grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature-card {
  background: rgba(255, 255, 255, 0.95);
  padding: 2.5rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  border: 1px solid rgba(30, 64, 175, 0.1);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: block;
}

.feature-card h3 {
  color: #1e40af;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.feature-card p {
  color: #64748b;
  line-height: 1.6;
}

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

.team-card {
  background: rgba(255, 255, 255, 0.95);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  border-left: 4px solid #1e40af;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.team-header {
  margin-bottom: 1.5rem;
}

.team-name {
  color: #1e40af;
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.team-role {
  color: #64748b;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.team-experience {
  color: #059669;
  font-weight: 500;
  font-size: 0.95rem;
}

.team-description {
  color: #374151;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.gallery-item {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.gallery-image {
  width: 100%;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  padding: 1rem;
  flex-direction: column;
}

.gallery-info {
  padding: 1.5rem;
}

.gallery-info h3 {
  color: #1e40af;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.gallery-info p {
  color: #64748b;
  font-size: 0.95rem;
}

.gallery-category {
  display: inline-block;
  background: rgba(30, 64, 175, 0.1);
  color: #1e40af;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-top: 1rem;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10001;
  backdrop-filter: blur(5px);
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-content {
  background: white;
  border-radius: 15px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-image {
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  flex-direction: column;
}

.lightbox-info {
  padding: 2rem;
}

.lightbox-info h3 {
  color: #1e40af;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.lightbox-info p {
  color: #64748b;
  margin-bottom: 1rem;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  color: #333;
  transition: all 0.3s;
}

.lightbox-close:hover {
  background: white;
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  color: #333;
  transition: all 0.3s;
}

.lightbox-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* Contact Form */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.contact-card {
  background: rgba(255, 255, 255, 0.95);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.contact-card h3 {
  color: #1e40af;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.contact-card p {
  color: #64748b;
  margin-bottom: 0.5rem;
}

.contact-card a {
  color: #1e40af;
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

.contact-form {
  background: rgba(255, 255, 255, 0.95);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 2rem auto;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #1e40af;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s;
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.submit-button {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(30, 64, 175, 0.3);
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

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

.footer-section h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-section p,
.footer-section a {
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-section a:hover {
  color: white;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

/* Watermark */
.watermark {
  position: fixed;
  bottom: 8px;
  right: 12px;
  font-size: 0.7rem;
  color: rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.8);
  padding: 4px 8px;
  border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .welcome-title {
    font-size: 1.8rem;
  }

  .welcome-screen .miet-logo {
    font-size: 2rem;
    padding: 15px 30px;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav ul {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .nav.active ul {
    display: flex;
  }

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

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

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

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

  .lightbox-content {
    max-width: 95vw;
    margin: 2rem;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}

@media (max-width: 480px) {
  .welcome-title {
    font-size: 1.5rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

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

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

  .watermark {
    font-size: 0.6rem;
    bottom: 5px;
    right: 8px;
  }
}
