/* =========================================
   BASE ATS STYLES
========================================= */
body{
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
}
header{
    background-color: white;
    margin: 0;
    height: 72px;
}
header .logo a{
    background-image: url("../images/logo.png");
    background-size: 300px;
    background-repeat: no-repeat;
    position: relative;
    top: -18px;
    display: inline-block;
    width: 300px;
    height: 50px;
    text-indent: -99999999999px;
}
ul.top-menu{
    margin: 0;
    padding: 0;
    position: relative;
    top: 30px;
    list-style-type: none;
}
ul.top-menu li{
    display: inline-block;
    margin-right: 25px;
    margin-left: 20px;
}
ul.top-menu li:hover{
    color: aqua;
}
header a{
    color:black;
    text-decoration: none;
    transition: all 0.4s ease-in;
}
header a:hover{
    color: blue;
    transition: all 0.4s ease-out;
}
section.head{
    background-color: #d9d9d9;
    margin: 0;
}
section.head h2{
    margin: 0;
}
section.hero img{
    width: 100%;
    height: 100%;
    z-index: 0;
    margin: 0;
    padding: 0;
}
footer{
    background-color: white;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding-bottom: 50px;
    width: 100%;
    margin: 0;
}
footer div.footer-heading{
    display: flex;
    flex-direction: column;
    margin-right: 60px;
}
footer a{
    text-decoration: none;
    color: gray;
    transition: all 0.3s ease-in;
}
footer a:hover{
    color: black;
    transition: all 0.3s ease-out;
}
.one{
    background-color: white;
}
.button-styling{
    border-radius: 10px;
    font-size: 16px;
    padding: 5px 25px 5px 25px;
    background-color: white;
    transition-duration: 0.5s;
    text-decoration: none;
}
.button-styling:hover{
    background-color: rgb(64, 133, 224);
    color: white;
}
.header-decor{
    position: absolute;
    top: 72px;
    height: 4px;
    width: 100%;
}
.bottom-styling{
    text-decoration: none;
    color: black;
    display: block;
    width: fit-content;
}
.bottom-styling::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #000;
    transition: width .3s;
}
.bottom-styling:hover::after {
    width: 100%;
}
.decor{
    height: 56px;
    position: absolute;
    right: 16px;
    top: 8px;
}

/* =========================================
   1. PROJECT GRID & CARDS (Height-Locked Horizontal)
========================================= */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); 
  gap: 24px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  
  /* Flexbox Layout */
  display: flex;
  flex-direction: row;
  align-items: center; 
  
  /* THE FIX: Lock the height of the card */
  height: 240px; 
}

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

.project-card img {
  /* THE FIX: Force the image to match the card height, not width */
  height: 100%; 
  width: auto; /* Let the browser calculate width automatically */
  aspect-ratio: 9 / 16; /* Keeps your portrait shape */
  object-fit: cover;
  display: block;
}

.card-text {
  flex: 1; /* Tells the text to take up exactly whatever space is left over */
  padding: 24px;
  box-sizing: border-box;
}

.card-text h3 {
  margin: 0 0 10px 0;
  font-size: 1.2rem;
  color: #333;
  line-height: 1.3;
}

.card-text p {
  margin: 0 0 15px 0;
  color: #666;
  font-size: 0.95rem;
}

.view-details {
  color: #4CAF50;
  font-weight: bold;
  font-size: 0.9rem;
}

/* =========================================
   2. MODAL BACKGROUND & OVERLAY
========================================= */
.modal-container {
  display: none; 
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

/* =========================================
   3. MODAL CONTENT & SPLIT LAYOUT
========================================= */
.modal-content {
  position: relative;
  background: #fff;
  width: 90%;
  max-width: 900px;
  border-radius: 12px;
  z-index: 1001;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease;
}

.modal-body {
  display: flex;
  flex-direction: row;
  padding: 0; /* Padding removed so image touches edges */
  max-height: 85vh; /* Stops modal from getting too tall */
}

/* Image Container (Left Side) */
.modal-image-container {
  flex: 1;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image-container img {
  width: 100%;
  height: 100%;
  max-height: 85vh;
  object-fit: contain; /* Prevents portrait stretching/cropping */
}

/* Text Container (Right Side) */
.modal-info {
  flex: 1;
  padding: 40px;
  overflow-y: auto; /* Allows long text to scroll */
}

.modal-info h2 {
  margin-top: 0;
  color: #222;
}

.modal-info p {
  color: #555;
  line-height: 1.6;
}

/* =========================================
   4. MODAL CONTROLS & ANIMATIONS
========================================= */
.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #f1f1f1;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  width: 35px;
  height: 35px;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 2;
}

.close-btn:hover {
  background: #e0e0e0;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: scale(0.95) translateY(-10px); 
  }
  to { 
    opacity: 1; 
    transform: scale(1) translateY(0); 
  }
}