/* Base Styles & Resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Colors & Typography */
h1, h2, h3 {
    font-family: "Arial Black", Gadget, sans-serif;
    color: #008EF5;
    text-transform: uppercase;
    margin-bottom: 0px;
}

h2 { color: #000; font-size: 1.8rem; text-align: center; margin: 20px 0; }
a { color: #B5461A; font-weight: bold; text-decoration: none; transition: 0.3s; }
a:hover { color: #008EF5; }

/* Header Stripe */
.top-stripe {
    height: 10px;
    background: url('images/900x9stripe.jpg') repeat-x;
    background-size: contain;
}

/* Navigation */
.navbar {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 15px 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: #333;
    font-size: 1.1rem;
}

/* Dropdown Logic */
.dropdown { position: relative; }
.dropdown-content {
    display: none;
    position: absolute;
    background: #fff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 10;
    list-style: none;
}
.dropdown:hover .dropdown-content { display: block; }
.dropdown-content li a {
    padding: 10px;
    display: block;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
}

/* Hero Image */
.responsive-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Layout Grid */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.content-box {
    background: #fff;
    padding-top: 5px;
    padding-right: 25px;
    padding-left: 25px;
    padding-bottom: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.highlight {
    border-top: 4px solid #008EF5;
}

/* Elements */
.quote-bar { text-align: center; margin-bottom: 20px; }
.cert-header { display: flex; 
    flex-direction: column; /* This forces the stack */
    align-items: flex-start; 
    gap: 10px; 
    margin-bottom: 2px; }
.styled-list { margin-left: 20px; margin-bottom: 20px; }
.usa-logo { width: 100px; margin-top: 20px; }

.btn {
    display: inline-block;
    background: #008EF5;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 4px;
    margin-top: 10px;
}

.btn:hover { background: #0066B1; }

/* Responsive Media Queries */
@media (max-width: 768px) {
    .grid-layout {
        grid-template-columns: 1fr; /* Stack columns on mobile */
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    h2 { font-size: 1.4rem; }
}

.footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 50px;
    background: #eee;
}

/* Specific responsiveness for the Quote GIF */
.quote-bar {
    width: 100%;
    text-align: center;
    margin: 20px 0;
    padding: 0 10px; /* Prevents the image from touching the screen edges */
}

.quote-bar img {
    max-width: 100%; /* Ensures the GIF never exceeds the screen width */
    height: auto;    /* Maintains the original aspect ratio so it doesn't look squished */
    display: inline-block;
}

/* Optional: If the GIF looks too small on mobile, 
   you can set a minimum width or scale it differently */
@media (max-width: 480px) {
    .quote-bar {
        margin: 10px 0;
    }
}

/* This forces everything inside the box to stay in a vertical stack */
.content-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Keeps text left-aligned */
    background: #fff;
    padding-top: 5px;
    padding-right: 25px;
    padding-left: 25px;
    padding-bottom: 5px;
    border-radius: 8px;
    gap: 1px; /* Adds consistent spacing between the image and the headings */
}

/* Ensure images don't try to float */
.content-box img {
    display: block;
    float: none;   /* Overrides any old floating rules */
    clear: both;   /* Ensures no elements sit beside it */
    margin-bottom: 0px;
    max-width: 100%;
    height: auto;
}

/* Ensure headings stay in the flow */
.content-box h1, 
.content-box h2, 
.content-box h3 {
    display: block;
    width: 100%;
    clear: both;
    margin-top: 0; /* Let the 'gap' property handle spacing */
}

/* Form Container Styles */
.quote-form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Label & Input Styling */
.quote-form label {
    font-weight: bold;
    font-size: 0.9rem;
    color: #515151;
}

.quote-form input, 
.quote-form textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
}

.quote-form input:focus, 
.quote-form textarea:focus {
    outline: none;
    border-color: #008EF5;
    box-shadow: 0 0 5px rgba(0, 142, 245, 0.2);
}

/* Button Styling */
.submit-btn {
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 15px;
    text-align: center;
    width: 100%;
    margin-top: 10px;
}

/* Responsive adjustment for the First/Last Name row */
@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr; /* Stack names on very small phones */
    }
}
