/* Root Variables */
:root {
    --white: #FFFFFF;
    --black: #000000;
    --dark-gray: #333333;
    --bright-blue: #1A73E8;
    --custom-light-gray: #a09e9e;
    --custom-red: #eb392e; /* Brand color from brochure */
}

/* Global Styles */
body {
    background-color: var(--white);
    color: var(--black);
    font-family: 'Roboto', sans-serif;
}

/* Hero Section Styles */
.hero-bg {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('resources/images/Welcome Container Images/Heat Treatment Copy.jpeg');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    position: relative;
    width: 100%;
}

.hero-bg .absolute {
    position: absolute;
    inset: 0;
}

.hero-bg .bg-black {
    background-color: #000000;
}

.hero-bg .bg-opacity-50 {
    background-color: rgba(0, 0, 0, 0.5);
}

@media (max-width: 639px) {
    .hero-bg {
        min-height: 70vh;
    }
}

.hero-bg h1 {
    margin-top: 2rem; /* Added margin above "Innovate with Prime India International" */
}

/* Navigation Styles */
.nav-bg {
    background-color: var(--custom-red);
    border-bottom: 1px solid var(--dark-gray);
    position: relative;
}

.logo {
    height: calc(4rem - 0.5rem);   /* 4rem = py-8 (2rem top + 2rem bottom) */
    width: auto;
    max-height: 100%;            /* never overflow */
    object-fit: contain;         /* keep proportions */
    transition: height 0.2s ease;
}

@media (max-width: 639px) {
  .logo {
    height: calc(3rem - 0.75rem);   /* py-8 becomes ~1.5rem each side on small screens */
  }
}

h2 {
    font-size: 1.5rem;
}

@media (max-width: 639px) {
    h2 {
        font-size: 1.2rem !important;
    }
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s ease, padding 0.3s ease-in-out;
}

.nav-link:hover {
    padding: 0 0.5rem;
    opacity: 70%;
}

.nav-links {
    display: flex;
}

.nav-links li {
    list-style-type: none; /* Remove bullets from nav links */
}

@media (max-width: 639px) {
    .nav-links {
        display: none;
    }
    .nav-links.active {
        display: flex;
    }
    .nav-menu {
        display: none;
    }
    .nav-menu.active {
        display: block;
        max-height: 300px; /* Increased to ensure all links fit */
        opacity: 1;
        transform: scale(1);
        padding: 1rem 0; /* Added padding for better spacing */
    }
    .menu-toggle {
        display: block;
    }
}

@media (min-width: 640px) {
    .nav-menu {
        display: none !important;
    }
    .menu-toggle {
        display: none;
    }
}

.nav-menu {
    position: relative; /* Push content down */
    width: 100%;
    background-color: var(--custom-red);
    z-index: 10;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: scale(0.95);
    transition: max-height 0.4s ease-out, opacity 0.3s ease-in, transform 0.3s ease-in;
}

.nav-menu ul {
    padding: 0;
    margin: 0;
    list-style-type: none; /* Ensure no bullets in mobile menu */
}

.nav-menu a {
    width: 100%;
    text-align: center;
    display: block;
    padding: 0.5rem 0; /* Added padding for each link */
}

/* Tagline Boxes */
#home .card {
    background-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
    height: 12rem;
}

@media (max-width: 639px) {
    #home .card {
        height: 8rem;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    #home .card {
        height: 10rem;
    }
}

@media (min-width: 1024px) {
    #home .card {
        height: 14rem;
    }
}

#home .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

#home .card i {
    font-size: 2rem;
}

@media (min-width: 640px) {
    #home .card i {
        font-size: 3rem;
    }
}

#home .card h3 {
    font-size: 0.875rem;
    line-height: 1.5;
    text-align: center;
    color: var(--white);
    padding: 0 0.5rem 0.5rem 0.5rem;
    white-space: normal;
}

@media (min-width: 640px) {
    #home .card h3 {
        font-size: 1rem;
    }
}

/* Section General Styles */
.section-bg {
    background-color: var(--white);
}

/* About Us Section Styles */
#about .heading-container {
    text-align: center;
}

#about ul {
    max-width: 600px;
    margin: 1rem auto 2rem; /* Top and bottom margin for spacing, centered */
    text-align: left;
    padding-left: 2rem; /* Adjust to align bullets nicely */
    list-style-position: outside; /* Ensures bullets are outside the text flow */
}

@media (max-width: 639px) {
    #about ul {
        max-width: 90%;
        padding-left: 1.5rem; /* Reduced padding for mobile */
    }
}

/* Button Styles */
.btn-primary {
    background-color: var(--custom-red);
    color: var(--white);
    transition: transform 0.2s ease, opacity 0.2s ease;
    padding: 0.75rem 1.5rem; /* Adjusted padding to a reasonable value */
    max-width: 300px; /* Constrain width to prevent excessive expansion */
    margin: 0 auto; /* Center the button if it’s block-level */
    display: inline-block; /* Revert to inline-block to avoid full width */
}

.btn-primary:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Text and Color Utility Styles */
.text-primary {
    color: var(--black);
}

.text-secondary, .text-dark-gray {
    color: var(--dark-gray);
}

.text-custom-red {
    color: var(--custom-red);
}

.text-bright-blue {
    color: var(--bright-blue);
}

.bg-custom-red {
    background-color: var(--custom-red);
}

.hover:bg-custom-red:hover {
    background-color: var(--custom-red);
}

.hover:bg-custom-red-opacity:hover {
    background-color: rgba(235, 57, 46, 0.1);
}

.border-custom-red {
    border-color: var(--custom-red);
}

/* Card Styles */
.card {
    background-color: var(--white);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Animation Styles */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Heading Container Styles */
.heading-container {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.heading-box {
    background-color: var(--custom-red);
    padding: 0.5rem 2rem;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 20px;
}

.heading-box h2, .heading-box h3 {
    color: var(--white);
    margin: 0;
}

@media (max-width: 639px) {
    .heading-box {
        padding: 0.5rem 1rem;
    }
    .heading-box h2 {
        font-size: 1.5rem;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .heading-box {
        padding: 0.5rem 3rem;
    }
    .heading-box h2 {
        font-size: 2rem;
    }
}

@media (min-width: 1024px) {
    .heading-box {
        padding: 0.5rem 10rem;
    }
    .heading-box h2 {
        font-size: 2.5rem;
    }
}

/* L-Shape Decorative Elements */
.l-shape {
    position: absolute;
    width: 40px;
    height: 40px;
    clip-path: polygon(0 0, 100% 0, 100% 20%, 20% 20%, 20% 100%, 0 100%);
    z-index: 0;
}

@media (max-width: 639px) {
    .l-shape {
        width: 30px;
        height: 30px;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .l-shape {
        width: 50px;
        height: 50px;
    }
}

.l-shape.top-0.left-0 {
    top: 20px;
    left: 20px;
}

.l-shape.bottom-0.right-0 {
    bottom: 20px;
    right: 20px;
    transform: rotate(180deg);
}

.rotate-180 {
    transform: rotate(180deg);
}

/* Footer Styles */
footer {
    background-color: var(--custom-red);
    padding: 2rem 0;
}

footer p, footer ul {
    font-size: 1rem;
}

@media (max-width: 639px) {
    footer p, footer ul {
        font-size: 0.75rem; /* Slightly smaller for mobile */
    }
}

/* FAQ Styles */
.accordion-question {
    background-color: var(--white);
    color: var(--dark-gray);
    transition: background-color 0.3s ease, color 0.3s ease;
}

@media (min-width: 640px) {
    .accordion-question:hover {
        background-color: var(--custom-red);
        color: var(--white);
    }
}

.accordion-answer {
    background-color: var(--white);
    color: var(--dark-gray);
}

/* Thank You Page Styles */
.thank-you-section {
  background-color: var(--white);
  padding: 4rem 0;
  text-align: center; /* Center all text by default */
}

.thank-you-section h2 {
  color: var(--custom-red) !important;
  font-size: 2.5rem !important; /* Base size for larger screens */
  font-weight: 700 !important;
  margin-bottom: 1.5rem !important;
}

.thank-you-section p {
  color: var(--dark-gray);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

.thank-you-section .btn-primary {
  background-color: var(--custom-red);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  border: none; /* Explicitly remove any border */
}

.thank-you-section .btn-primary:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

@media (max-width: 639px) {
  .thank-you-section h2 {
    font-size: 2rem !important; /* Mobile size */
  }
  .thank-you-section p {
    font-size: 1rem;
  }
}

/* Ensure this rule overrides any global h2 styles */
.thank-you-section h2 {
  font-size: 2.5rem !important; /* Reiterate base size */
}

/* Scroll Arrows */
.scroll-arrow {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  outline: none;
  cursor: pointer;
}

.scroll-arrow i {
  pointer-events: none;
}

/* Hide scroll-to-top when at top, scroll-to-bottom when at bottom */
#scroll-to-top.hidden,
#scroll-to-bottom.hidden {
  display: none;
}

/* Responsive: smaller on mobile */
@media (max-width: 639px) {
  .scroll-arrow {
    width: 40px;
    height: 40px;
  }
  .scroll-arrow i {
    font-size: 1rem;
  }
}