/* Modernized CSS for Manish Dangi’s Portfolio */
/* Importing Google Fonts (Roboto is already in your HTML) */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

:root {
  --primary-color: #5d4037;      /* Rich brown for primary text and elements */
  --accent-color: #d81b60;       /* Deep pink for hover effects and highlights */
  --bg-color: #f5f5f5;           /* Soft off-white for the overall page */
  --card-bg: #ffffff;            /* Pure white for cards and content areas */
  --text-color: #3e2723;         /* Dark brown for standard text */
  --shadow-light: rgba(0, 0, 0, 0.08); /* Subtle shadow */
  --shadow-dark: rgba(0, 0, 0, 0.15);  /* Slightly stronger shadow */
  /* Top info bar variables */
  --top-info-bg: #8d6e63;        /* Muted brown for the top bar */
  --top-info-text: #ffffff;      /* White for top bar text */
}

a {
  text-decoration: none; /* Removes underline */
  color: inherit;
}


/* Global Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* ---------------------- */
/* Top Info Bar (Original) */
/* ---------------------- */
/* Force links in the top info bar to stay white */
.top-info a,
.top-info a:visited,
.top-info a:hover,
.top-info a:active {
  color: var(--top-info-text) !important;  /* or simply #ECF0F1 if you prefer a hard-coded color */
  text-decoration: none;
}

.top-info {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--top-info-bg);
  color: var(--top-info-text);
  padding: 10px 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 2000;
  flex-wrap: wrap;
}
.flag-container {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}
.flag-container img {
  width: 40px;
  height: auto;
}
.header-text {
  text-align: center;
}
.header-title {
  font-weight: bold;
  font-size: 1.4rem;
}
.header-location {
  font-size: 1.1rem;
  margin-top: 5px;
}
.header-contacts {
  font-size: 0.9rem;
  margin-top: 5px;
}

.profile-pic {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}
.profile-pic img {
  width: 100px;  /* adjust as needed */
  height: 100px; /* adjust as needed */
  border-radius: 0%; /* makes it circular */
  object-fit: cover;
  object-position: top center; /* Moves the visible area slightly upward */
}


/* ---------------------- */
/* Navigation */
/* ---------------------- */
nav {
  background-color: var(--bg-color);
  box-shadow: 0 2px 4px var(--shadow-light);
  position: fixed;
  top: 115px; /* Positioned below the top-info bar */
  width: 100%;
  z-index: 900;
}
nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  padding: 10px 0;
}
nav ul li {
  margin: 0 15px;
}
nav ul li a {
  font-weight: 700;
  color: var(--primary-color);
  transition: color 0.3s ease;
  text-decoration: none;
}
nav ul li a:hover {
  color: var(--accent-color);
}

/* ---------------------- */
/* Main Container */
/* ---------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 140px 20px 80px; /* Adjusted top padding to clear fixed header and nav */
}

/* ---------------------- */
/* Section Headings */
/* ---------------------- */
section h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

/* ---------------------- */
/* Recent Updates Slider */
/* ---------------------- */
/* Reduce space below the heading */
#recent-updates h2 {
  margin-bottom: 0px; /* was 20px or so before */
}

#recent-updates .container {
  padding-top: 170px; /* Increase from the default 120px */
  padding-bottom: 25px;
}

/* Reduce space above the slider */
.fullwidth-slider {
  margin-top: 5px;   /* was 20px before */
  padding: 5px 0;    /* was 20px 0 before */
}

.marquee-container {
  position: relative;
  overflow: hidden;
}
.slider {
  display: flex;
  align-items: center;
  transition: transform 0.5s linear;
}
.slide {
  flex: 0 0 auto;
  margin: 0 10px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform: scale(0.9);
  opacity: 0.7;
  cursor: pointer;
}
.slide.active {
  transform: scale(1);
  opacity: 1;
}
.slide img {
  width: 575px;  /* Increased as needed */
  height: 375px; /* Increased as needed */
  object-fit: cover;
  border-radius: 10px;
  display: block;
  box-shadow: 0 4px 8px var(--shadow-light);
}
.slide-caption {
  text-align: center;
  margin-top: 8px;
  background-color: rgba(44, 62, 80, 0.8);
  color: var(--bg-color);
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 0.9rem;
}

/* ---------------------- */
/* Timeline for Career Highlights */
/* ---------------------- */
.timeline {
  position: relative;
  padding: 40px 0;
}
.timeline:before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background-color: var(--accent-color);
  transform: translateX(-50%);
}
.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
}
.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}
.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}
.timeline-item:before {
  content: '';
  position: absolute;
  top: 24px;
  width: 20px;
  height: 20px;
  background-color: var(--bg-color);
  border: 3px solid var(--accent-color);
  border-radius: 50%;
  z-index: 1;
}
.timeline-item:nth-child(odd):before {
  right: -10px;
}
.timeline-item:nth-child(even):before {
  left: -10px;
}
.timeline-content {
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px var(--shadow-light);
}
.timeline-content h3 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  text-decoration: none;
}
.timeline-content p {
  font-size: 1rem;
  text-decoration: none;
}

/* ---------------------- */
/* Projects Grid */
/* ---------------------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}
.project-card {
  display: flex;
  flex-direction: column;
  height: 350px; /* Set a fixed height for all cards */
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 10px var(--shadow-dark);
}

.project-card img {
  width: 100%;
  height: 200px; /* Fixed height for the image area */
  object-fit: cover;
  display: block;
}

.project-content {
  padding: 20px;
  flex: 1; /* This makes the content area fill the remaining space */
  display: flex;
  flex-direction: column;
}

/* Ensure headings and paragraphs don't force extra height */
.project-content h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--primary-color);
  text-decoration: none;
}

.project-content p {
  font-size: 1rem;
  line-height: 1.4;
  text-decoration: none;
  overflow: hidden;  /* Optional: hide overflow text */
}

/* ========== Certifications Slider ========== */
.cert-slider-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-top: 20px;
}

.cert-slider {
  display: flex;
  transition: transform 0.3s ease-in-out;
}

.certification-card {
  min-width: 280px;
  height: 380px; /* Set fixed height to ensure uniformity */
  margin: 0 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: var(--secondary-color);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column; /* Ensures content stacks vertically */
}

.certification-card:hover {
  transform: translateY(-5px);
}

.certification-card img {
  width: 100%;
  height: 180px; /* Consistent image height */
  object-fit: cover;
  display: block;
}

.certification-content {
  flex-grow: 1; /* Ensures content area expands if needed */
  padding: 15px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Pushes title and text apart if needed */
  text-align: center; /* Optional - aligns content center */
}

.certification-content h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
  color: var(--primary-color);
}

.certification-content p {
  font-size: 1rem;
  line-height: 1.4;
  flex-grow: 1; /* Allows description to stretch to fit available space */
  display: flex;
  align-items: center; /* Vertically centers text if there's extra space */
  justify-content: center;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(44, 62, 80, 0.7);
  color: var(--secondary-color);
  border: none;
  padding: 10px;
  cursor: pointer;
  font-size: 1.5rem;
  z-index: 10;
}

.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

@media (max-width: 768px) {
  .certification-card {
    min-width: 90%;
    margin: 10px auto;
  }
  .slider-btn {
    padding: 8px;
    font-size: 1.2rem;
  }
}

/* ---------------------- */
/* Extra‑Curricular Activities Grid */
/* ---------------------- */
.eca-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 30px;
}
.eca-item {
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px var(--shadow-light);
  transition: transform 0.3s ease;
}
.eca-item:hover {
  transform: translateY(-5px);
}
.eca-item h3 {
  font-size: 1.3rem;
  text-align: center;
  margin: 10px 0;
  color: var(--primary-color);
  padding: 10px;
  text-decoration: none;
}
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  background-color: #000;
}
.video-container iframe,
.video-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-container a {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------------------- */
/* Additional Information Section */
/* ---------------------- */
#additional-info {
  background-color: var(--bg-color);
  padding: 40px 20px;
  text-align: center;
}
.info-box {
  background-color: var(--card-bg);
  padding: 30px 40px;
  border-radius: 10px;
  box-shadow: 0 6px 10px var(--shadow-light);
  display: inline-block;
  max-width: 400px;
}
.info-item {
  font-size: 1.2rem;
  margin: 10px 0;
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
}
.info-item:last-child {
  border-bottom: none;
}
.info-box a {
  color: var(--primary-color);
  font-weight: 700;
  transition: color 0.3s ease;
  text-decoration: none;
}
.info-box a:hover {
  color: var(--accent-color);
}

/* ---------------------- */
/* Footer */
/* ---------------------- */
footer {
  background-color: var(--primary-color);
  color: var(--bg-color);
  text-align: center;
  padding: 15px 20px;
  margin-top: 40px;
}

/* ---------------------- */
/* Responsive Adjustments */
/* ---------------------- */
@media (max-width: 768px) {
  .timeline:before {
    left: 8%;
  }
  .timeline-item {
    width: 90%;
    padding: 20px;
    left: 0 !important;
    text-align: left;
  }
  .timeline-item:before {
    left: -10px;
  }
  nav ul {
    flex-direction: column;
  }
  nav ul li {
    margin: 8px 0;
  }
}
