/* Reset default margins and paddings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Style the innerpage wrapper */
.innerpage-wrapper {
    padding: 50px 0;
    background-color: #f8f9fa;
}

/* Ensure the container takes full width */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Center the main heading and paragraphs */
.page-heading {
    text-align: center;
    margin-bottom: 30px;
}

.page-heading p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    text-align: justify;
}

/* Style the special offer sidebar */
.side-bar-block.special-offer {
    background-color: #000;
    color: #fff;
    padding: 20px;
    margin: 20px auto;
    border-radius: 8px;
    text-align: center;
    max-width: 600px;
}

.side-bar-block.special-offer p {
    margin-bottom: 15px;
}

.side-bar-block.special-offer #offer-text span {
    font-size: 25px;
    color: #fff; /* Corrected from black to white for visibility on black background */
}

.side-bar-block.special-offer .btn {
    display: inline-block;
    margin: 10px;
    padding: 10px 20px;
    background-color: #28a745;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.side-bar-block.special-offer .btn:hover {
    background-color: #218838;
}

/* Style the section heading */
#team-2 h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #000;
    background-color: #ffc107; /* Matches inline yellow background */
    padding: 10px;
    text-align: center;
}

/* Style the paragraph under the section heading */
#team-2 p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 30px;
    text-align: justify;
}

/* Target the specific products row (last direct child .row inside .col-12) */
#team-2 .col-12 > .row:last-child {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Forces exactly 3 columns, wrapping the 4th item to a new row */
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* Override Bootstrap column classes inside the products row to fit the grid */
#team-2 .col-12 > .row:last-child .col-12,
#team-2 .col-12 > .row:last-child .col-md-6,
#team-2 .col-12 > .row:last-child .col-lg-4,
#team-2 .col-12 > .row:last-child .col-xl-4 {
    grid-column: auto;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* Style for each product card */
.member-block-2 {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 100%; /* Ensures equal height in grid */
}

.member-block-2:hover {
    transform: translateY(-5px);
}

.member-img-2 {
    position: relative;
    overflow: hidden;
}

.member-img-2 img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.member-block-2:hover .member-img-2 img {
    transform: scale(1.05);
}

.member-title-2 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 15px;
    text-align: center;
}

.member-title-2 h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #fff;
}

.member-title-2 p {
    font-size: 1rem;
    color: #ccc;
}

.member-title-2 a {
    text-decoration: none;
    color: inherit;
}

.member-mask-2 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.member-block-2:hover .member-mask-2 {
    background: rgba(0, 0, 0, 0.5);
}

/* Remove any default Bootstrap gutters if needed */
.row {
    --bs-gutter-x: 0; /* Overrides Bootstrap's default gutter for non-targeted rows */
}

/* Responsive adjustments - Maintain 3 columns even on small screens, but scale down elements */
@media (max-width: 992px) {
    #team-2 .col-12 > .row:last-child {
        grid-template-columns: repeat(3, 1fr); /* Still 3 columns on medium screens */
        gap: 15px;
    }

    .member-title-2 h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .side-bar-block.special-offer {
        max-width: 100%;
    }

    .page-heading p,
    #team-2 p {
        font-size: 1rem;
    }

    #team-2 h2 {
        font-size: 1.8rem;
    }

    #team-2 .col-12 > .row:last-child {
        grid-template-columns: repeat(3, 1fr); /* Force 3 columns */
        gap: 10px;
    }

    .member-title-2 h3 {
        font-size: 1.1rem;
    }

    .member-title-2 p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    #team-2 .col-12 > .row:last-child {
        grid-template-columns: repeat(3, 1fr); /* Strictly 3 columns even on mobile - may cause horizontal scroll if too cramped */
        gap: 10px;
    }

    .member-title-2 h3 {
        font-size: 0.9rem;
    }

    .member-title-2 p {
        font-size: 0.8rem;
    }

    .side-bar-block.special-offer {
        padding: 15px;
    }

    .side-bar-block.special-offer #offer-text span {
        font-size: 20px;
    }
}

/* ========== NEWSLETTER SECTION ========== */
#newsletter {
  background: linear-gradient(135deg, #0062ff, #33ccff);
  color: #fff;
  padding: 80px 0;
}

#newsletter h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#newsletter p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #e5e5e5;
}

#newsletter .form-group {
  max-width: 600px;
  margin: 0 auto;
}

#newsletter .input-group {
  display: flex;
  align-items: stretch;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#newsletter .form-control {
  flex: 1;
  border: none;
  padding: 15px 20px;
  font-size: 1rem;
  border-radius: 0;
  outline: none;
}

#newsletter .form-control::placeholder {
  color: #aaa;
}

#newsletter .btn {
  background-color: #fff;
  color: #0062ff;
  border: none;
  padding: 0 25px;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

#newsletter .btn:hover {
  background-color: #0062ff;
  color: #fff;
  transform: translateY(-2px);
}

#newsletter .fa-paper-plane {
  margin: 0;
}

/* ======= Responsive ======= */
@media (max-width: 768px) {
  #newsletter h2 {
    font-size: 2rem;
  }

  #newsletter p {
    font-size: 1rem;
  }

  #newsletter .input-group {
    flex-direction: column;
    border-radius: 12px;
  }

  #newsletter .btn {
    width: 100%;
    padding: 12px 0;
    border-radius: 0;
  }
}
