/* =====================================
   Base Styles and Font Imports
   ===================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&family=Open+Sans:wght@400;600&display=swap');

:root {
    /* --- Your Provided Color Palette --- */
    --yinmn-blue: #3d5a80ff;
    --powder-blue: #98c1d9ff;
    --light-cyan: #e0fbfcff;
    --burnt-sienna: #ee6c4dff;
    --gunmetal: #293241ff;

    /* --- Mapped to Website Elements --- */
    --primary-color: var(--yinmn-blue); /* Strong, professional blue for main branding and actions */
    --secondary-color: var(--powder-blue); /* Lighter blue for secondary elements/accents */
    --accent-color: var(--burnt-sienna); /* Vibrant orange for highlights and calls-to-action */

    --light-bg: var(--light-cyan); /* Very light, almost white, background for overall site */
    --dark-bg: var(--gunmetal); /* Deep, dark blue/gray for footer and strong contrasts */

    --text-color: var(--gunmetal); /* Dark text for readability on light backgrounds */
    --light-text: var(--light-cyan); /* For text on dark backgrounds */

    /* Generic element colors (adjusted for new palette) */
    --border-color: var(--powder-blue); /* Soft blue for form borders */
    --card-shadow-color: rgba(41, 50, 65, 0.1); /* Subtle shadow based on gunmetal */
    --hover-shadow-color: rgba(41, 50, 65, 0.2); /* Stronger shadow on hover */

    /* Typography */
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Open Sans', sans-serif;
}

body {
    font-family: var(--body-font);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-bg); /* Overall light background for the site */
}

/* =====================================
   Typography Enhancements
   ===================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color); /* Headings use the primary blue */
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 175px; /* Increased width for the underline */
    height: 3px;
    background-color: var(--accent-color); /* Accent color for the underline */
    margin: 15px auto 0;
    border-radius: 2px;
}

p {
    font-size: 1.1em;
    margin-bottom: 1rem;
}

/* =====================================
   Navigation Bar
   ===================================== */
.navbar {
    padding-top: 1rem;
    padding-bottom: 1rem;
    box-shadow: 0 2px 10px var(--card-shadow-color);
    background-color: var(--light-bg) !important;
}

.navbar-brand {
    font-family: var(--heading-font);
    font-weight: 700;
    font-size: 1.5rem; /* Default font size for larger screens */
    color: var(--primary-color) !important;
    white-space: nowrap; /* Prevent brand from wrapping onto multiple lines */
}

.navbar-brand img {
    margin-right: 10px;
    height: 35px;
}

.navbar-nav .nav-link {
    font-weight: 600;
    color: var(--text-color) !important;
    margin-right: 20px; /* Space out links on larger screens */
    transition: color 0.3s ease, border-bottom 0.3s ease;
    padding-bottom: 8px;
    border-bottom: 3px solid transparent;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
    border-bottom-color: var(--accent-color);
}

.navbar-nav .nav-item.active .nav-link {
    color: var(--primary-color) !important;
    border-bottom-color: var(--primary-color);
}

/* --- Responsive adjustments for Navbar --- */

/* Adjustments for medium and smaller devices (e.g., tablets, phones) */
@media (max-width: 991.98px) { /* Bootstrap's 'lg' breakpoint for navbar collapse */
    .navbar-brand {
        font-size: 1.2rem; /* Reduce brand font size on smaller screens */
    }

    .navbar-brand img {
        height: 28px; /* Slightly smaller logo on smaller screens */
    }

    .navbar-toggler {
        /* Ensure the toggler is always visible and positioned correctly */
        /* If it's not showing, you might need to adjust its color */
        border-color: rgba(0,0,0,.1); /* Example: Add a subtle border */
    }

    .navbar-nav {
        text-align: center; /* Center align collapsed nav items */
        margin-top: 15px; /* Add some space above collapsed items */
    }

    .navbar-nav .nav-item {
        margin-bottom: 8px; /* Space between vertical links */
    }

    .navbar-nav .nav-link {
        margin-right: 0; /* Remove horizontal margin when stacked vertically */
        padding-bottom: .5rem;
        border-bottom: none; /* Remove underline on mobile */
    }
    .navbar-nav .nav-item.active .nav-link {
        border-bottom: none; /* Ensure no underline on active link when collapsed */
    }
}

/* Further adjustments for extra small devices (e.g., phones) */
@media (max-width: 575.98px) { /* Bootstrap's 'sm' breakpoint */
    .navbar-brand {
        font-size: 1rem; /* Even smaller brand font size */
    }
    .navbar-brand img {
        height: 25px; /* Even smaller logo */
    }
}


/* Your existing media queries for other elements */
@media (max-width: 767.98px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }
    .jumbotron {
        padding: 80px 0;
    }
    section {
        padding: 60px 0;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* =====================================
   Hero Section (Jumbotron)
   ===================================== */
.jumbotron {
    /* ... existing background-image, padding, etc. ... */
    
    /* Ensure text can wrap */
    word-wrap: break-word; /* For older browsers */
    overflow-wrap: break-word; /* Modern standard */

    padding: 120px 0;
    margin-bottom: 0;
    border-radius: 0;
    text-align: center;
    color: var(--light-text);
}

.jumbotron .display-4,
.jumbotron .lead {
    color: var(--light-text);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    /* Add max-width to constrain text width if needed, though Bootstrap's container usually handles this */
    /* max-width: 90%; */
    /* margin-left: auto; */
    /* margin-right: auto; */
}

/* Adjust font sizes more aggressively for smaller screens */
@media (max-width: 767.98px) { /* Medium devices like tablets and up */
    .jumbotron .display-4 {
        font-size: 2rem; /* Reduce significantly for smaller screens */
    }
    .jumbotron .lead {
        font-size: 1.1rem; /* Adjust lead text size */
    }
    .jumbotron {
        padding: 60px 0; /* Reduce padding for smaller jumbotron */
    }
}

@media (max-width: 575.98px) { /* Small devices like phones */
    .jumbotron .display-4 {
        font-size: 1.75rem; /* Even smaller for very small phones */
    }
    .jumbotron .lead {
        font-size: 1rem; /* Standard body text size */
    }
    .jumbotron {
        padding: 40px 0; /* Further reduce padding */
    }
}

/* =====================================
   Buttons
   ===================================== */
.btn {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px var(--card-shadow-color);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--light-text); /* Ensure text is visible on primary button */
}

.btn-primary:hover {
    background-color: #314a6b; /* Slightly darker primary blue on hover */
    border-color: #314a6b;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--hover-shadow-color);
}

.btn-success { /* Used for the Sign Up button */
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--light-text); /* Light text on vibrant orange button */
}

.btn-success:hover {
    background-color: #ce5d3f; /* Slightly darker burnt sienna on hover */
    border-color: #ce5d3f;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--hover-shadow-color);
}

/* =====================================
   Sections and Cards
   ===================================== */
/* Removed the invalid .section rule. Apply padding to specific sections or use Bootstrap's py- classes. */

section { /* Default padding for all sections */
    padding: 80px 0;
}

#features {
    background-color: var(--light-bg); /* Consistent light background for features */
}

#features .card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--card-shadow-color);
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    background-color: #fff; /* White card background to stand out slightly */
}

#features .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px var(--hover-shadow-color);
}

#features .card-title {
    font-family: var(--heading-font);
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

#signup, #login {
    background-color: var(--powder-blue); /* Powder blue background for forms */
}

#signup .card, #contact .card, #login .card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 20px var(--card-shadow-color);
    padding: 40px;
    background-color: var(--light-bg); /* Light cyan card background for forms */
}

/* Form Group styling */
.form-group label {
    font-weight: 600;
    margin-bottom: .5rem;
    color: var(--text-color);
}

.form-control {
    border-radius: 5px;
    padding: 10px 15px;
    border: 1px solid var(--border-color); /* Powder blue for form borders */
    box-shadow: inset 0 1px 2px rgba(0,0,0,.03);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(61, 90, 128, 0.25); /* Primary color focus ring with transparency */
}

/* Placeholder styling - this assumes you're using Material Icons/Symbols for placeholders */
input::-webkit-input-placeholder {
    font-family: 'Open Sans', sans-serif; /* Use your body font for placeholders if not an icon */
    font-style: italic; /* Optional: Make placeholders italic */
    color: rgba(41, 50, 65, 0.6); /* Softer color for placeholders */
}
input:-moz-placeholder { /* Firefox 18- */
    font-family: 'Open Sans', sans-serif;
    font-style: italic;
    color: rgba(41, 50, 65, 0.6);
}
input::-moz-placeholder { /* Firefox 19+ */
    font-family: 'Open Sans', sans-serif;
    font-style: italic;
    color: rgba(41, 50, 65, 0.6);
}
input:-ms-input-placeholder { /* IE 10+ */
    font-family: 'Open Sans', sans-serif;
    font-style: italic;
    color: rgba(41, 50, 65, 0.6);
}

/* Material Icons/Symbols specific styling */
/* These rules are for icons within content, not typically for placeholders */
.material-icons.md-18 { font-size: 18px; }
.material-icons.md-24 { font-size: 24px; }
.material-icons.md-36 { font-size: 36px; }
.material-icons.md-48 { font-size: 48px; }
.material-icons.md-56 { font-size: 56px; }
.material-icons.md-72 { font-size: 72px; }

.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 700,
  'GRAD' 0,
  'opsz' NaN /* 'opsz' value should be a number, not NaN. Adjust if needed. */
}

/* Corrected use of #icon::after - ensures it's tied to a specific element */
.feature-icon::after { /* Target the new class */
    content: '';
    display: block;
    width: 175px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* =====================================
   Custom Spacing Div
   ===================================== */
.my-custom-spacer {
    height: 80px; /* Fixed height for spacing */
    /* If you want to use padding/margin instead, uncomment and remove height */
    /* padding-top: 60px; */
    /* padding-bottom: 60px; */
    /* margin-top: 40px; */
    /* margin-bottom: 40px; */

    /* If you want it to have a background color for visual separation */
    /* background-color: var(--light-bg); */

    /* You can also use it to create a visual divider */
    /* border-top: 1px solid var(--border-color); */
}

/* Responsive adjustments for the spacer */
@media (max-width: 767.98px) {
    .my-custom-spacer {
        height: 40px; /* Adjust spacing for smaller screens */
    }
}
@media (max-width: 575.98px) {
    .my-custom-spacer {
        height: 20px; /* Adjust spacing for smaller screens */
    }
}

/* =====================================
   Contact Section
   ===================================== */
#contact {
    background-color: var(--powder-blue); /* Powder blue background for forms */
}

/* =====================================
   Footer
   ===================================== */
footer {
    background-color: var(--dark-bg); /* Deep gunmetal for the footer */
    color: var(--light-text);
    padding: 40px 0;
    font-size: 0.95em;
}

footer a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-color); /* Highlight footer links with burnt sienna */
    text-decoration: underline;
}

/* =====================================
   Utility & Responsive Adjustments
   ===================================== */
.text-center {
    text-align: center;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

@media (max-width: 767.98px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }
    .jumbotron {
        padding: 80px 0;
    }
    section {
        padding: 60px 0;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}