/**
 * Ron Gilad Portfolio - Main Stylesheet
 * Minimalist design with Bootstrap 5 integration
 */

/* ===== CSS Custom Properties ===== */
:root {
  --color-primary: #1a1a1a;
  --color-text: #333333;
  --color-text-muted: #888888;
  --color-text-light: #ffffff;
  --color-accent: #EE6D00;
  --color-border: #e5e5e5;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  --transition-fast: 150ms ease;
  --transition: 300ms ease;
  --transition-slow: 500ms ease;
}

/* ===== Font Face Definitions ===== */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/Inter-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ===== Base Styles ===== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  line-height: 1.7;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--space-sm);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

@media (min-width: 768px) {
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 1.75rem; }
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

/* ===== Layout ===== */
section {
  padding: var(--space-lg) 0;
}

@media (min-width: 992px) {
  section {
    padding: var(--space-xl) 0;
  }
}

.site-header {
  position: relative;
  z-index: 1000;
}

/* ===== Navigation ===== */
.navbar {
  padding: var(--space-sm) 0;
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.navbar-nav .nav-link {
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm) !important;
  transition: color var(--transition-fast);
}

.navbar-nav .nav-link:hover {
  color: var(--color-accent) !important;
}

/* ===== Hero Section ===== */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-lg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
}

.hero-with-image {
  background-image: url('../../RGBG2_500w.jpg');
}

.hero-content {
  max-width: 900px;
  padding-top: 200px;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

/* ===== Portfolio Grid ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition), box-shadow var(--transition);
}

.portfolio-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.portfolio-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition);
}

.portfolio-item:hover img {
  transform: scale(1.03);
}

.portfolio-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-sm);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: var(--color-text-light);
  opacity: 0;
  transition: opacity var(--transition);
}

.portfolio-item:hover .portfolio-item-overlay {
  opacity: 1;
}

/* ===== Buttons ===== */
.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  padding: 0.75rem 2rem;
  font-weight: 500;
  transition: all var(--transition);
}

.btn-primary:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.btn-outline-dark {
  border-width: 2px;
  font-weight: 500;
  padding: 0.75rem 2rem;
  transition: all var(--transition);
}

.btn-outline-dark:hover {
  transform: translateY(-2px);
}

/* ===== Feature Cards ===== */
.feature-card {
  text-align: center;
  padding: var(--space-md);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.feature-card img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: var(--space-sm);
}

.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-xs);
}

/* ===== Footer ===== */
.site-footer {
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.9);
}

/* ===== Homepage Specific ===== */
#HomePage .site-header {
  background: transparent;
}

#HomePage .navbar-brand,
#HomePage .nav-link {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

#HomePage .site-footer {
  background: rgba(0, 0, 0, 0.7);
  color: rgba(255, 255, 255, 0.7);
  border-top: none;
}

#HomePage .site-footer a {
  color: rgba(255, 255, 255, 0.7);
}

.bg-light-subtle {
  background-color: rgba(250, 250, 250, 0.9);
}

.site-footer a {
  color: var(--color-text-muted);
}

.site-footer a:hover {
  color: var(--color-accent);
}

/* ===== Back to Top Button ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-text-light);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 999;
  cursor: pointer;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--color-accent);
  transform: translateY(-4px);
}

/* ===== Utility Classes ===== */
.text-accent {
  color: var(--color-accent);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

[data-animate] {
  opacity: 0;
}

[data-animate].animated {
  animation: fadeInUp 0.6s ease forwards;
}

/* ===== Video Container ===== */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.video-container video,
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ===== Award Badge ===== */
.award-badge {
  max-width: 200px;
  transition: transform var(--transition);
}

.award-badge:hover {
  transform: scale(1.05);
}

/* ===== Featured Promo ===== */
.featured-promo {
  transition: transform var(--transition), box-shadow var(--transition);
}

.featured-promo:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* ===== Responsive Adjustments ===== */

/* Large tablets and below */
@media (max-width: 991.98px) {
  .hero-content {
    padding-top: 120px;
  }

  .navbar-brand {
    font-size: 1rem;
  }

  .navbar-brand .fw-light {
    display: none;
  }
}

/* Tablets */
@media (max-width: 767.98px) {
  .hero {
    min-height: auto;
    padding: var(--space-md) var(--space-sm);
    background-size: cover;
    background-position: center top;
  }

  .hero-content {
    padding-top: 80px;
    padding-bottom: var(--space-md);
  }

  .feature-card {
    padding: var(--space-sm);
  }

  .feature-card img {
    max-width: 150px;
  }

  .feature-card h3 {
    font-size: 1rem;
  }

  .award-badge {
    max-width: 120px;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .site-footer {
    text-align: center;
  }

  .site-footer .text-md-end {
    text-align: center !important;
  }
}

/* Small phones */
@media (max-width: 575.98px) {
  .hero {
    min-height: auto;
    padding: var(--space-sm);
  }

  .hero-content {
    padding-top: 60px;
  }

  .feature-card {
    padding: var(--space-sm);
    margin-bottom: 0;
  }

  .feature-card img {
    max-width: 100px;
  }

  .feature-card h3 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
  }

  .feature-card p {
    font-size: 0.75rem;
  }

  .award-badge {
    max-width: 80px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  section {
    padding: var(--space-md) 0;
  }

  .navbar {
    padding: 0.5rem 0;
  }

  .navbar-brand {
    font-size: 0.9rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .featured-promo {
    padding: 1.5rem !important;
  }

  .featured-promo .display-1 {
    font-size: 3rem;
  }

  .featured-promo .lead {
    font-size: 1rem;
  }

  .featured-promo .btn-lg {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 1rem;
    right: 1rem;
  }
}

/* Very small phones */
@media (max-width: 374px) {
  .navbar-brand {
    font-size: 0.8rem;
  }

  .feature-card img {
    max-width: 70px;
  }

  .hero-content .row {
    gap: 0.5rem;
  }
}
