/* ===============
   Egtech — Modern Startup Look
   Blue & Violet tech waves + spiritual aura
   =============== */
:root{
  --bg:#0b0f19;
  --fg:#ffffff;
  --violet:#7c3aed;
  --blue:#3b82f6;
  --indigo:#4f46e5;
  --card:#111827cc;
  --accent: #60a5fa;
}

* {
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE10+/Edge */
  user-select: none;         /* Standard */
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,'Helvetica Neue',Arial;
  color:var(--fg);
  background: radial-gradient(1200px 800px at 80% -10%, rgba(124,58,237,.25), transparent 60%),
              radial-gradient(1000px 600px at 0% 100%, rgba(59,130,246,.20), transparent 60%),
              var(--bg);
  overflow-x:hidden;
  line-height:1.6;
}

/* --- Animated Background: tech waves + subtle grid --- */
.bg{position:fixed; inset:0; z-index:-1; overflow:hidden;}
.wave{position:absolute; width:120%; left:-10%; opacity:.35; filter:blur(0.3px);}
.wave1{bottom:-5vh; fill:var(--indigo);}
.wave2{bottom:8vh;  fill:var(--violet); mix-blend-mode:screen; animation: drift 16s ease-in-out infinite alternate;}

.grid{
  position:absolute; inset:-20% -20% -20% -20%;
  background-image: linear-gradient(transparent 97%, rgba(96,165,250,.08) 98%),
                    linear-gradient(90deg, transparent 97%, rgba(167,139,250,.08) 98%);
  background-size: 40px 40px, 40px 40px;
  transform: rotate(-2deg);
  animation: gridPan 30s linear infinite;
  mask-image: radial-gradient(60% 60% at 50% 40%, #000 60%, transparent 100%);
}

@keyframes gridPan{to{transform: rotate(-2deg) translateX(-40px);}}
@keyframes drift{from{transform:translateX(0)}to{transform:translateX(40px)}}

/* --- Hero --- */
.hero{
  position:relative;
  padding: clamp(96px, 18vh, 180px) 20px 80px;
  text-align:center;
}
.container{max-width:1100px; margin:0 auto; padding:0 16px;}
.hero-title{
  font-size:clamp(2.2rem, 6vw, 4rem);
  font-weight:800;
  letter-spacing:.2px;
  position:relative;
  display:inline-block;
  isolation:isolate;
}
.chakra-aura{
  position:absolute; inset:-30% -25% -35% -25%;
  background:
    radial-gradient(closest-side, rgba(124,58,237,.35), transparent 70%),
    radial-gradient(closest-side, rgba(59,130,246,.30), transparent 70%);
  filter: blur(32px);
  border-radius:50%;
  z-index:-1;
  animation: auraPulse 6s ease-in-out infinite;
}
@keyframes auraPulse{
  0%{transform: scale(0.98); opacity:.7}
  50%{transform: scale(1.04); opacity:.9}
  100%{transform: scale(0.98); opacity:.7}
}
.hero-sub{
  margin-top:14px;
  font-size:clamp(1.05rem, 2.5vw, 1.3rem);
  opacity:.92;
}
.cta{
  display:inline-block;
  margin-top:28px;
  padding:14px 22px;
  border-radius:14px;
  background: linear-gradient(90deg, var(--indigo), var(--blue));
  color:white; text-decoration:none; font-weight:700;
  box-shadow: 0 10px 30px rgba(79,70,229,.35);
  transform: translateZ(0);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.cta:hover{transform: translateY(-2px); box-shadow:0 14px 36px rgba(59,130,246,.45); filter:brightness(1.05)}

/* --- Sections --- */
.section{padding:80px 0}
.section h2{
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom:18px;
  background: linear-gradient(90deg, var(--blue), #9aa7ff);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  text-align: center;
}
.section p{max-width:860px; margin:0 auto; opacity:.92; text-align: center;}
.section-subtitle {
  font-size: 1.1rem;
  opacity: 0.8;
  margin-bottom: 40px;
}

.cards{
  display:grid; gap:26px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top:36px;
}
.card{
  background: var(--card);
  padding:26px 22px;
  border-radius:16px;
  border:1px solid rgba(99,102,241,.22);
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position:relative; overflow:hidden;
}
.card::after{
  content:""; position:absolute; inset:-30% -20% auto auto; height:160px; width:160px;
  background: radial-gradient(circle at 30% 30%, rgba(96,165,250,.35), transparent 60%);
  filter: blur(22px); transform: rotate(25deg);
}
.card h3{color:#9ab6ff; margin-bottom:10px}
.card:hover{ transform: translateY(-6px); box-shadow:0 16px 44px rgba(59,130,246,.35); border-color:rgba(96,165,250,.45)}

/* --- Portfolio Section --- */
.portfolio-container { 
  position: relative; 
  margin-top: 40px; 
  width: 100%;
  padding: 0 40px; /* Add padding to make space for arrows */
}

.portfolio-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 20px 0; /* Remove side padding since container has it */
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.portfolio-scroll::-webkit-scrollbar { display: none; }
.portfolio-scroll:active { cursor: grabbing; }

/* Scroll Arrows - Fixed Positioning */
.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--indigo), var(--blue));
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  opacity: 0.8;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-container:hover .scroll-arrow {
  opacity: 1;
}

.scroll-arrow:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(59,130,246,.5);
  opacity: 1;
}

.scroll-arrow-left { 
  left: 0; /* Position inside the container */
}

.scroll-arrow-right { 
  right: 0; /* Position inside the container */
}

.scroll-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: translateY(-50%) scale(1);
}

.scroll-arrow:disabled:hover {
  transform: translateY(-50%) scale(1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  opacity: 0.3;
}

/* --- App Cards --- */
.app-card {
  flex: 0 0 320px;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(99,102,241,.22);
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  transition: all 0.3s ease;
  position: relative;
}
.app-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(59,130,246,.35);
  border-color: rgba(96,165,250,.45);
}

/* ✅ Responsive 3:2 aspect ratio maintained for banner */
.app-banner {
  width: 100%;
  position: relative;
  overflow: hidden;
}
.app-banner::before {
  content: "";
  display: block;
  padding-top: 66.66%; /* height = 2/3 of width (3:2 ratio) */
}
.app-banner img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.app-card:hover .app-banner img { transform: scale(1.05); }

.app-info {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.app-icon-name {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.app-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}
.app-details { flex: 1; min-width: 0; }
.app-title {
  color: #9ab6ff;
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}
.app-category {
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.3;
}
.play-store-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--indigo), var(--blue));
  color: white;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s ease;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}
.play-store-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(59,130,246,.4);
  filter: brightness(1.1);
}
.play-store-btn i { font-size: 1.4rem; }

/* --- Footer --- */
.footer{ 
  background:#0f172a; 
  padding:48px 0; 
  text-align:center; 
  margin-top:40px;
}
.footer a{
  color:var(--accent); 
  text-decoration:none; 
  font-weight:600;
}
.footer a:hover{
  text-decoration:underline;
}

/* --- Scroll reveal animations --- */
.reveal{
  opacity:0; 
  transform: translateY(24px); 
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible{
  opacity:1; 
  transform:none;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
  .portfolio-container {
    padding: 0 20px; /* Reduce padding on mobile */
  }
  
  .portfolio-scroll {
    flex-direction: column;
    overflow-x: visible;
    gap: 20px;
    padding: 10px 0;
    cursor: default;
  }
  
  .app-card { 
    flex: 1; 
    max-width: 100%; 
    width: 100%; 
  }
  
  .section { 
    padding: 60px 0; 
  }
  
  .container { 
    padding: 0 20px; 
  }
  
  .app-info { 
    padding: 20px; 
  }
  
  .app-icon { 
    width: 60px; 
    height: 60px; 
    border-radius: 14px; 
  }
  
  .app-title { 
    font-size: 1.2rem; 
    -webkit-line-clamp: 2; 
  }
  
  .app-category { 
    font-size: 0.9rem; 
  }
  
  .play-store-btn { 
    width: 50px; 
    height: 50px; 
  }
  
  .play-store-btn i { 
    font-size: 1.6rem; 
  }
  
  .scroll-arrow { 
    display: none; 
  }
}

@media (max-width: 480px) {
  .hero { 
    padding: 80px 20px 60px; 
  }
  
  .app-card { 
    margin: 0 auto; 
    max-width: 100%; 
  }
  
  .app-info { 
    padding: 18px; 
  }
  
  .app-icon { 
    width: 55px; 
    height: 55px; 
  }
  
  .app-title { 
    font-size: 1.15rem; 
  }
  
  .app-category { 
    font-size: 0.85rem; 
  }
  
  .play-store-btn { 
    width: 48px; 
    height: 48px; 
  }
}

/* Tablet specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .app-card { 
    flex: 0 0 300px; /* Slightly smaller cards on tablet */
  }
  
  .portfolio-container {
    padding: 0 30px; /* Adjust padding for tablet */
  }
}

/* Large desktop adjustments */
@media (min-width: 1200px) {
  .portfolio-container {
    padding: 0 50px; /* More space for arrows on large screens */
  }
}

/* Ensure 3:2 aspect ratio is maintained across all desktop sizes */
@media (min-width: 769px) {
  .app-banner::before { 
    padding-top: 66.66%; /* Keep 3:2 ratio on all desktop devices */
  }
}