/* Portfolio page specific styles */

/* Portfolio section styling */
.portfolio-section {
  padding: 120px 0 80px; /* Increased top padding to move content down */
}

/* Center the portfolio subtitle and its line */
.portfolio-section .section-subtitle {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.portfolio-section .section-subtitle::after {
  width: 80px; /* Width to match "Portfolio" text */
  left: 50%;
  transform: translateX(-50%);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.portfolio-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-12);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
}

.card-banner {
  position: relative;
  overflow: hidden;
}

.card-banner img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-card:hover .card-banner img {
  transform: scale(1.05);
}

.card-content {
  padding: 20px;
}

.card-title {
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--color-primary);
}

.card-description {
  color: var(--color-secondary);
  font-size: var(--fs-5);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* CTA Section */
.cta-section {
  background: var(--bg-secondary);
  padding: 60px 0;
  text-align: center;
  margin-top: 40px;
}

.cta-section h2 {
  color: var(--color-primary);
  margin-bottom: 15px;
}

.cta-section p {
  color: var(--color-secondary);
  max-width: 700px;
  margin: 0 auto 25px auto;
}

.cta-section .btn {
  font-size: var(--fs-5);
  padding: 12px 30px;
}

/* Active link styling */
.navbar-link.active {
  color: var(--raw-seinna);
  font-weight: 600;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
}

@media screen and (max-width: 480px) {
  .portfolio-section {
    padding: 100px 0 60px; /* Adjusted for smaller screens while maintaining extra space at top */
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* Dark and light mode specific styles */
/* Dark theme styles - exactly matching index.html */
body.dark_theme {
  --bg-primary: var(--black);
  --bg-secondary: var(--black);
  --color-primary: hsl(103, 41%, 69%);
  --color-secondary: hsl(0, 0%, 62%);
  --card-shadow: hsla(0, 0%, 0%, 0.4);
  --input-bg: hsl(0, 0%, 16%);
  --shadow-1: 10px 10px 40px var(--card-shadow);
  --shadow-2: 15px 15px 50px var(--card-shadow);
  --shadow-3: 20px 20px 60px var(--card-shadow);
  --header-bg: #555555;
}

body.dark_theme .portfolio-section {
  color: var(--color-primary);
  background: var(--bg-primary);
}

body.dark_theme .card-title,
body.dark_theme .title-wrapper .section-title,
body.dark_theme h1,
body.dark_theme h2,
body.dark_theme h3 {
  color: hsl(103, 41%, 69%);
}

body.dark_theme .card-description,
body.dark_theme p {
  color: hsl(0, 0%, 62%);
}

/* Updated portfolio description text to match heading color in dark mode */
body.dark_theme .title-wrapper .section-text {
  color: hsl(103, 41%, 69%);
}

body.dark_theme .title-wrapper .section-subtitle {
  color: var(--raw-seinna);
}

body.dark_theme .title-wrapper .section-subtitle::after {
  width: 80px; /* Adjusted to match width of Portfolio text */
  left: 50%;
  transform: translateX(-50%);
}

body.dark_theme .portfolio-card {
  background: hsl(0, 0%, 16%);
  box-shadow: var(--shadow-1);
}

body.dark_theme .portfolio-card:hover {
  box-shadow: var(--shadow-2);
}

body.dark_theme .cta-section {
  background: var(--bg-secondary);
}

body.dark_theme .cta-section h2 {
  color: hsl(103, 41%, 69%);
}

body.dark_theme .cta-section p {
  color: hsl(103, 41%, 69%); /* Updated to match the heading color in dark mode */
}

/* Light theme styles - exactly matching index.html */
body.light_theme {
  --bg-primary: hsl(0, 0%, 90%);
  --bg-secondary: hsl(32, 89%, 82%);
  --color-primary: hsl(0, 0%, 12%);
  --color-secondary: hsl(0, 0%, 37%);
  --card-shadow: hsla(0, 0%, 0%, 0.1);
  --input-bg: hsl(0, 0%, 93%);
  --shadow-1: 10px 10px 40px var(--card-shadow);
  --shadow-2: 15px 15px 50px var(--card-shadow);
  --shadow-3: 20px 20px 60px var(--card-shadow);
  --header-bg: #fff;
}

body.light_theme .portfolio-section {
  color: var(--color-primary);
  background: var(--bg-primary);
}

body.light_theme .card-title,
body.light_theme .title-wrapper .section-title,
body.light_theme h1,
body.light_theme h2,
body.light_theme h3 {
  color: hsl(0, 0%, 12%);
}

body.light_theme .card-description,
body.light_theme .title-wrapper .section-text,
body.light_theme p {
  color: hsl(0, 0%, 37%);
}

body.light_theme .title-wrapper .section-subtitle {
  color: var(--raw-seinna);
}

body.light_theme .title-wrapper .section-subtitle::after {
  width: 80px; /* Adjusted to match width of Portfolio text */
  left: 50%;
  transform: translateX(-50%);
}

body.light_theme .portfolio-card {
  background: hsl(32, 89%, 82%);
  box-shadow: var(--shadow-1);
}

body.light_theme .portfolio-card:hover {
  box-shadow: var(--shadow-2);
}

body.light_theme .cta-section {
  background: var(--bg-secondary);
}

body.light_theme .cta-section h2 {
  color: hsl(0, 0%, 12%);
}

body.light_theme .cta-section p {
  color: hsl(0, 0%, 37%);
}
