/* ========================================
   CSS VARIABLES - Florida State Style
   ======================================== */
:root {
    --primary: #245693;
    --primary-dark: #1a4170;
    --primary-light: #2c68b2;
    --link-color: #2276cc;
    --text-dark: #444444;
    --text-body: #555555;
    --text-light: #666666;
    --bg-light: #f7f7f7;
    --bg-white: #ffffff;
    --bg-banner: #d5e8f9;
    --border: #dddddd;
    --border-light: #eeeeee;
    --accent: #09c;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --max-width: 1200px;
    --content-width: 800px;
}

/* ========================================
   RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-body);
    background-color: var(--bg-white);
}

a {
    color: var(--link-color);
    text-decoration: underline;
}

a:hover {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   HEADER - Florida Government Style
   ======================================== */
.header {
    background-color: var(--primary);
    padding: 12px 0;
    border-bottom: none;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 26px;
    font-weight: 400;
    color: var(--bg-white);
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
    color: var(--bg-white);
    opacity: 0.9;
}

.logo span {
    color: var(--bg-white);
    font-weight: 400;
}

/* ========================================
   NAVIGATION - Florida Style
   ======================================== */
.nav {
    display: flex;
    gap: 0;
    background-color: var(--primary-dark);
    border-radius: 3px;
}

.nav a {
    padding: 9px 18px;
    color: var(--bg-white);
    font-weight: 400;
    font-size: 15px;
    text-decoration: none;
    border-radius: 0;
    transition: background-color 0.2s;
}

.nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.nav a.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--bg-white);
}

.nav a::before {
    content: "» ";
    opacity: 0.7;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    color: var(--bg-white);
}

/* ========================================
   BREADCRUMBS
   ======================================== */
.breadcrumbs {
    padding: 15px 0;
    font-size: 14px;
    color: var(--text-light);
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border);
}

.breadcrumbs a {
    color: var(--link-color);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs span {
    margin: 0 8px;
    color: var(--text-light);
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.main {
    padding: 25px 0 40px;
    background-color: var(--bg-white);
}

.content-section {
    background-color: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 25px 30px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.content-section h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2em;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.4;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 12px;
}

.content-section h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.5em;
    font-weight: 400;
    color: var(--text-dark);
    margin: 25px 0 15px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.content-section h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.content-section h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.25em;
    font-weight: 400;
    color: var(--text-dark);
    margin: 20px 0 10px;
}

.content-section p {
    margin-bottom: 15px;
    color: var(--text-body);
    line-height: 1.6;
}

.content-section p:last-child {
    margin-bottom: 0;
}

/* ========================================
   STATS BOX - Featured Section Style
   ======================================== */
.stats-box {
    background-color: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 20px 25px;
    margin: 25px 0;
}

.stats-box h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.25em;
    font-weight: 400;
    margin-bottom: 15px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background-color: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 3px;
}

.stat-number {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2em;
    font-weight: 400;
    color: var(--primary);
    display: block;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 5px;
}

/* ========================================
   INFO TABLE
   ======================================== */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border: 1px solid var(--border);
}

.info-table th,
.info-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.info-table th {
    background-color: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
    width: 40%;
}

.info-table td {
    color: var(--text-body);
}

.info-table tr:last-child th,
.info-table tr:last-child td {
    border-bottom: none;
}

/* ========================================
   LINK GRID (Counties, Cities)
   ======================================== */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.link-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 12px 15px;
    text-align: left;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s;
}

.link-card:hover {
    text-decoration: none;
    background-color: var(--bg-light);
    border-color: var(--primary);
}

.link-card::before {
    content: "» ";
    color: var(--primary);
}

.link-card-title {
    font-weight: 400;
    color: var(--link-color);
    font-size: 15px;
}

.link-card:hover .link-card-title {
    color: var(--primary);
    text-decoration: underline;
}

/* Compact grid for large lists */
.link-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}

.link-grid-compact .link-card {
    padding: 10px 12px;
}

/* ========================================
   BUTTONS - Florida Style
   ======================================== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 400;
    text-align: center;
    border-radius: 3px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--bg-white);
}

.btn-secondary {
    background-color: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--border);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ========================================
   FOOTER - Florida Style
   ======================================== */
.footer {
    background-color: var(--bg-light);
    border-top: 3px solid var(--primary);
    padding: 25px 0;
    margin-top: 30px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 25px;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--link-color);
    font-size: 14px;
    text-decoration: underline;
}

.footer-links a:hover {
    color: var(--primary);
    text-decoration: none;
}

.footer-disclaimer {
    max-width: 600px;
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
}

.footer-copyright {
    width: 100%;
    text-align: center;
    padding-top: 20px;
    margin-top: 15px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-light);
}

/* ========================================
   SEARCH FORM COMPONENT (Original)
   ======================================== */
.search-form {
    max-width: 500px;
    margin: 0 auto;
}

.search-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.search-form-row.stacked {
    flex-direction: column;
}

.search-form input[type="text"],
.search-form select {
    flex: 1;
    padding: 10px 12px;
    font-size: 15px;
    font-family: 'Open Sans', sans-serif;
    border: 1px solid var(--border);
    border-radius: 3px;
    background-color: var(--bg-white);
}

.search-form input[type="text"]:focus,
.search-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 3px rgba(36, 86, 147, 0.3);
}

.search-form button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
    background-color: var(--primary);
    color: var(--bg-white);
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-form button:hover {
    background-color: var(--primary-dark);
}

/* Sidebar version */
.search-form-sidebar {
    max-width: 300px;
}

.search-form-sidebar .search-form-row {
    flex-direction: column;
}

/* ========================================
   SEARCH WIDGET (JS Generated - Horizontal)
   ======================================== */
.search-widget {
    width: 100%;
}

.search-widget .search-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.search-widget .search-input,
.search-widget .search-select,
.search-widget .search-button {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: 'Open Sans', sans-serif;
    border: 1px solid var(--border);
    border-radius: 3px;
    background-color: var(--bg-white);
    box-sizing: border-box;
}

.search-widget .search-button {
    background-color: var(--primary);
    color: var(--bg-white);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-widget .search-input:focus,
.search-widget .search-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 3px rgba(36, 86, 147, 0.3);
}

.search-widget .search-button:hover {
    background-color: var(--primary-dark);
}

/* Search Embed Box */
.search-embed {
    background-color: var(--bg-banner);
    border: 2px solid var(--accent);
    border-radius: 4px;
    padding: 30px;
    padding-bottom: 75px;
    margin: 25px 0;
    position: relative;
}

.search-embed h3 {
    font-family: Georgia, 'Times New Roman', serif;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.25em;
    font-weight: 400;
    color: var(--text-dark);
}

/* Sponsored Results - Light gray, bottom left corner */
.search-embed p.search-form-note {
    position: absolute;
    left: 25px;
    bottom: 15px;
    font-size: 14px;
    color: #ccc;
    margin: 0;
}

/* ========================================
   UTILITIES
   ======================================== */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-light);
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        text-align: center;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        background-color: transparent;
    }

    .nav a {
        padding: 8px 14px;
        font-size: 14px;
        background-color: var(--primary-dark);
        margin: 2px;
        border-radius: 3px;
    }

    .content-section {
        padding: 20px;
    }

    .content-section h1 {
        font-size: 1.6em;
    }

    .content-section h2 {
        font-size: 1.3em;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-disclaimer {
        text-align: center;
    }

    .search-form-row {
        flex-direction: column;
    }

    .link-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile - Search Widget Stacks Vertically */
@media (max-width: 700px) {
    .search-widget .search-form {
        grid-template-columns: 1fr;
    }
    
    .search-embed {
        padding: 25px 20px;
        padding-bottom: 45px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .container {
        padding: 0 15px;
    }

    .logo {
        font-size: 22px;
    }

    .content-section {
        padding: 15px;
        margin-bottom: 15px;
    }

    .content-section h1 {
        font-size: 1.4em;
    }

    .link-grid {
        grid-template-columns: 1fr;
    }

    .link-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-table th,
    .info-table td {
        padding: 10px;
        font-size: 14px;
    }

    .info-table th {
        width: 45%;
    }
}
