/* ==========================================================================
   Modern UI/UX Overhaul CSS - US Zip Codes Directory
   ========================================================================== */

   @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

   :root {
       /* Color Palette (Slate & Indigo) */
       --bg-body: #f8fafc;
       --bg-surface: #ffffff;
       --text-main: #1e293b;
       --text-muted: #64748b;
       --primary: #4f46e5;
       --primary-hover: #4338ca;
       --border-light: #e2e8f0;
       --glass-bg: rgba(255, 255, 255, 0.85);
       
       /* Shadows */
       --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
       --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
       --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
       --shadow-glow: 0 0 0 3px rgba(79, 70, 229, 0.3);
       
       /* Radius */
       --radius-md: 0.5rem;
       --radius-lg: 1rem;
       --radius-full: 9999px;
   }
   
   /* ---- Global Resets ---- */
   body {
       margin: 0;
       font-family: 'Inter', sans-serif;
       background-color: var(--bg-body);
       color: var(--text-main);
       line-height: 1.6;
       -webkit-font-smoothing: antialiased;
   }
   
   a {
       color: var(--primary);
       text-decoration: none;
       transition: color 0.2s ease;
   }
   
   a:hover {
       color: var(--primary-hover);
   }
   
   h1, h2, h3, h4, h5, h6 {
       font-weight: 600;
       color: var(--text-main);
       margin-bottom: 1rem;
   }
   
   /* ---- Layout ---- */
   .main {
       max-width: 1200px;
       margin: 100px auto 40px auto;
       padding: 0 20px;
   }
   
   /* ---- Navbar (Glassmorphism) ---- */
   .navbar {
       position: fixed;
       top: 0;
       width: 100%;
       background: var(--glass-bg);
       backdrop-filter: blur(12px);
       -webkit-backdrop-filter: blur(12px);
       border-bottom: 1px solid var(--border-light);
       padding: 15px 30px;
       display: flex;
       justify-content: center;
       align-items: center;
       transition: all 0.3s ease;
       z-index: 1000;
       box-sizing: border-box;
   }
   
   .navbar.scrolled {
       box-shadow: var(--shadow-sm);
       padding: 10px 30px;
   }
   
   .logo {
       position: absolute;
       left: 30px;
       font-size: 22px;
       font-weight: 700;
       color: var(--primary);
       letter-spacing: -0.5px;
   }
   
   .nav-links {
       list-style: none;
       display: flex;
       gap: 35px;
       margin: 0;
       padding: 0;
   }
   
   .nav-links li {
       position: relative;
   }
   
   .nav-links li a {
       color: var(--text-muted);
       font-size: 15px;
       font-weight: 500;
   }
   
   .nav-links li a:hover {
       color: var(--text-main);
   }
   
   .nav-links li::after {
       content: "";
       position: absolute;
       left: 50%;
       bottom: -6px;
       width: 0%;
       height: 2px;
       background: var(--primary);
       transition: all 0.3s ease;
       transform: translateX(-50%);
   }
   
   .nav-links li:hover::after {
       width: 100%;
   }
   
   .menu-toggle {
       display: none;
       font-size: 26px;
       cursor: pointer;
       position: absolute;
       right: 30px;
       color: var(--text-main);
   }
   
   /* ---- Data Tables (Replaces .blueTable) ---- */
   table.blueTable {
       width: 100%;
       max-width: 900px;
       margin: 20px auto;
       border-collapse: separate;
       border-spacing: 0;
       background-color: var(--bg-surface);
       border-radius: var(--radius-lg);
       box-shadow: var(--shadow-md);
       overflow: hidden;
       text-align: left;
   }
   
   table.blueTable thead {
       background-color: #f1f5f9;
   }
   
   table.blueTable thead th {
       font-weight: 600;
       font-size: 14px;
       color: var(--text-muted);
       padding: 16px 20px;
       text-transform: uppercase;
       letter-spacing: 0.5px;
       border-bottom: 1px solid var(--border-light);
   }
   
   table.blueTable tbody td {
       padding: 16px 20px;
       font-size: 15px;
       border-bottom: 1px solid var(--border-light);
       color: var(--text-main);
   }
   
   table.blueTable tbody tr:last-child td {
       border-bottom: none;
   }
   
   table.blueTable tbody tr:hover {
       background-color: #f8fafc;
   }

   /* ---- Blog ---- */
   .blog-page,
   .blog-article {
       max-width: 960px;
       margin: 0 auto;
       text-align: left;
   }

   .blog-header,
   .blog-article-header {
       margin: 20px 0 30px;
   }

   .blog-kicker,
   .blog-article-header time,
   .blog-card time {
       color: #0f766e;
       font-size: 13px;
       font-weight: 700;
       letter-spacing: 0.08em;
       text-transform: uppercase;
   }

   .blog-header h1,
   .blog-article-header h1 {
       max-width: 760px;
       margin: 8px 0 12px;
       font-size: 38px;
       line-height: 1.15;
   }

   .blog-header p,
   .blog-article-header p {
       max-width: 720px;
       color: var(--text-muted);
       font-size: 18px;
   }

   .blog-grid {
       display: grid;
       grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
       gap: 18px;
       margin: 28px 0;
   }

   .blog-card,
   .blog-empty {
       background: var(--bg-surface);
       border: 1px solid var(--border-light);
       border-radius: 8px;
       box-shadow: var(--shadow-sm);
       padding: 24px;
   }

   .blog-card h2 {
       margin: 10px 0;
       font-size: 22px;
       line-height: 1.25;
   }

   .blog-card p,
   .blog-empty p {
       color: var(--text-muted);
   }

   .blog-read-more,
   .blog-back {
       display: inline-flex;
       align-items: center;
       margin-top: 10px;
       font-weight: 700;
   }

   .blog-back {
       margin-bottom: 20px;
   }

   .blog-content {
       max-width: 760px;
       color: var(--text-main);
       font-size: 18px;
       line-height: 1.8;
   }

   .blog-content p {
       margin: 0 0 22px;
   }

   .blog-content h1,
   .blog-content h2,
   .blog-content h3,
   .blog-content h4,
   .blog-content h5,
   .blog-content h6 {
       margin: 32px 0 14px;
       line-height: 1.25;
   }

   .blog-content h1 {
       font-size: 32px;
   }

   .blog-content h2 {
       font-size: 26px;
   }

   .blog-content h3 {
       font-size: 22px;
   }

   .blog-content ul,
   .blog-content ol {
       margin: 0 0 22px 24px;
       padding: 0;
   }

   .blog-content li {
       margin: 6px 0;
   }

   .blog-content blockquote {
       margin: 26px 0;
       border-left: 4px solid #0f766e;
       background: #f0fdfa;
       color: #115e59;
       padding: 14px 18px;
   }

   .blog-content blockquote p {
       margin: 0;
   }

   .blog-content pre {
       max-width: 100%;
       overflow-x: auto;
       margin: 24px 0;
       border: 1px solid var(--border-light);
       border-radius: 8px;
       background: #0f172a;
       color: #e2e8f0;
       padding: 16px;
       font-size: 14px;
       line-height: 1.6;
   }

   .blog-content code {
       border-radius: 5px;
       background: #f1f5f9;
       color: #be123c;
       font-size: 0.9em;
       padding: 2px 5px;
   }

   .blog-content pre code {
       background: transparent;
       color: inherit;
       padding: 0;
   }

   .blog-content img {
       max-width: 100%;
       height: auto;
       border-radius: 8px;
       margin: 22px 0;
   }

   .blog-pagination {
       display: flex;
       align-items: center;
       justify-content: center;
       gap: 18px;
       margin: 30px 0 10px;
       color: var(--text-muted);
       font-weight: 600;
   }

   .blog-pagination a {
       background: var(--bg-surface);
       border: 1px solid var(--border-light);
       border-radius: 8px;
       padding: 9px 14px;
       box-shadow: var(--shadow-sm);
   }

   /* ---- Blog Admin ---- */
   .admin-page {
       max-width: 1040px;
       margin: 0 auto;
       text-align: left;
   }

   .admin-header {
       display: flex;
       align-items: center;
       justify-content: space-between;
       gap: 20px;
       margin: 20px 0 24px;
   }

   .admin-header h1 {
       margin: 6px 0 0;
       font-size: 34px;
       line-height: 1.15;
   }

   .admin-actions {
       display: flex;
       align-items: center;
       gap: 10px;
   }

   .admin-card {
       background: var(--bg-surface);
       border: 1px solid var(--border-light);
       border-radius: 8px;
       box-shadow: var(--shadow-sm);
       padding: 24px;
   }

   .admin-login {
       max-width: 420px;
   }

   .admin-button {
       display: inline-flex;
       align-items: center;
       justify-content: center;
       min-height: 40px;
       padding: 9px 16px;
       border: 1px solid var(--primary);
       border-radius: 8px;
       background: var(--primary);
       color: #ffffff;
       font-weight: 700;
       line-height: 1;
       cursor: pointer;
   }

   .admin-button:hover {
       color: #ffffff;
       background: var(--primary-hover);
       border-color: var(--primary-hover);
   }

   .admin-button-secondary {
       background: #ffffff;
       color: var(--text-main);
       border-color: var(--border-light);
   }

   .admin-button-secondary:hover {
       background: #f8fafc;
       color: var(--text-main);
       border-color: #cbd5e1;
   }

   .admin-alert,
   .admin-notice {
       border-radius: 8px;
       margin-bottom: 16px;
       padding: 12px 14px;
       font-weight: 600;
   }

   .admin-alert {
       background: #fef2f2;
       border: 1px solid #fecaca;
       color: #991b1b;
   }

   .admin-notice {
       background: #ecfdf5;
       border: 1px solid #bbf7d0;
       color: #166534;
   }

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

   .admin-table {
       width: 100%;
       border-collapse: collapse;
   }

   .admin-table th,
   .admin-table td {
       border-bottom: 1px solid var(--border-light);
       padding: 14px 12px;
       vertical-align: top;
   }

   .admin-table th {
       color: var(--text-muted);
       font-size: 12px;
       letter-spacing: 0.06em;
       text-transform: uppercase;
   }

   .admin-table td span {
       display: block;
       color: var(--text-muted);
       font-size: 13px;
       margin-top: 4px;
   }

   .admin-table tr:last-child td {
       border-bottom: 0;
   }

   .admin-row-actions {
       white-space: nowrap;
   }

   .admin-row-actions a {
       display: inline-flex;
       margin-left: 12px;
       font-weight: 700;
   }

   .admin-status {
       display: inline-flex;
       align-items: center;
       border-radius: 999px;
       padding: 4px 10px;
       font-size: 12px;
       font-weight: 700;
       text-transform: capitalize;
   }

   .admin-status-published {
       background: #ecfdf5;
       color: #047857;
   }

   .admin-status-draft {
       background: #f1f5f9;
       color: #475569;
   }

   .admin-form {
       display: grid;
       gap: 18px;
   }

   .admin-form-grid {
       display: grid;
       grid-template-columns: repeat(2, minmax(0, 1fr));
       gap: 18px;
   }

   .admin-field label,
   .admin-login label {
       display: block;
       margin-bottom: 7px;
       color: var(--text-main);
       font-weight: 700;
   }

   .admin-field input,
   .admin-field select,
   .admin-field textarea,
   .admin-login input {
       width: 100%;
       border: 1px solid var(--border-light);
       border-radius: 8px;
       color: var(--text-main);
       font: inherit;
       padding: 11px 12px;
       box-sizing: border-box;
       background: #ffffff;
   }

   .admin-field textarea {
       min-height: 98px;
       resize: vertical;
   }

   .admin-field .EasyMDEContainer {
       color: var(--text-main);
   }

   .admin-field .EasyMDEContainer .CodeMirror,
   .admin-field .EasyMDEContainer .editor-preview {
       border-color: var(--border-light);
       font-family: 'Inter', sans-serif;
   }

   .admin-field .EasyMDEContainer .CodeMirror {
       min-height: 360px;
       line-height: 1.6;
   }

   .admin-field .editor-toolbar {
       border-color: var(--border-light);
       border-radius: 8px 8px 0 0;
   }

   .admin-field input:focus,
   .admin-field select:focus,
   .admin-field textarea:focus,
   .admin-login input:focus {
       outline: none;
       border-color: var(--primary);
       box-shadow: var(--shadow-glow);
   }

   .admin-submit {
       display: flex;
       justify-content: flex-end;
   }
   
   /* ---- State Grid (Replaces old table in content.php) ---- */
   .state-grid {
       display: grid;
       grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
       gap: 20px;
       width: 100%;
       max-width: 1000px;
       margin: 30px auto;
   }
   
   .state-card {
       background: var(--bg-surface);
       border-radius: var(--radius-lg);
       padding: 20px;
       display: flex;
       align-items: center;
       gap: 15px;
       box-shadow: var(--shadow-sm);
       border: 1px solid var(--border-light);
       transition: all 0.3s ease;
       text-decoration: none;
   }
   
   .state-card:hover {
       transform: translateY(-3px);
       box-shadow: var(--shadow-md);
       border-color: var(--primary-hover);
   }
   
   .state-card img {
       width: 60px;
       height: auto;
       border-radius: 4px;
       box-shadow: 0 1px 3px rgba(0,0,0,0.1);
   }
   
   .state-card span {
       font-weight: 600;
       font-size: 16px;
       color: var(--text-main);
   }
   
   /* ---- Search Forms ---- */
   .search-form {
       display: flex;
       justify-content: center;
       max-width: 600px;
       margin: 0 auto;
       position: relative;
   }
   
   .search-form input[type="search"] {
       width: 100%;
       padding: 15px 25px;
       font-size: 16px;
       border: 1px solid var(--border-light);
       border-radius: var(--radius-full);
       box-shadow: var(--shadow-sm);
       transition: all 0.3s ease;
       font-family: inherit;
       background: var(--bg-surface);
   }
   
   .search-form input[type="search"]:focus {
       outline: none;
       border-color: var(--primary);
       box-shadow: var(--shadow-glow);
   }
   
   .search-form button {
       position: absolute;
       right: 6px;
       top: 6px;
       bottom: 6px;
       background-color: var(--primary);
       color: white;
       border: none;
       border-radius: var(--radius-full);
       padding: 0 25px;
       font-weight: 600;
       cursor: pointer;
       transition: background-color 0.2s ease;
   }
   
   .search-form button:hover {
       background-color: var(--primary-hover);
   }
   
   /* ---- Footer ---- */
   footer {
       background-color: var(--bg-surface);
       border-top: 1px solid var(--border-light);
       padding: 40px 20px;
       margin-top: 60px;
   }
   
   .footer-content {
       max-width: 1200px;
       margin: 0 auto;
       display: flex;
       flex-direction: column;
       align-items: center;
       text-align: center;
   }
   
   .company-info h2 {
       color: var(--primary);
       margin-bottom: 5px;
   }
   
   .company-info p {
       color: var(--text-muted);
       font-size: 14px;
   }
   
   .social-links {
       display: flex;
       gap: 20px;
       margin-top: 20px;
   }
   
   .social-links a {
       color: var(--text-muted);
       transition: color 0.2s ease;
   }
   
   .social-links a:hover {
       color: var(--primary);
   }
   
   .copyright {
       margin-top: 30px;
       color: var(--text-muted);
       font-size: 13px;
   }
   
   /* ================= MOBILE ================= */
   @media (max-width: 768px) {
       .nav-links {
           position: absolute;
           top: 70px;
           left: 0;
           width: 100%;
           background: var(--glass-bg);
           backdrop-filter: blur(12px);
           -webkit-backdrop-filter: blur(12px);
           flex-direction: column;
           align-items: center;
           max-height: 0;
           overflow: hidden;
           transition: max-height 0.4s ease;
           border-bottom: 1px solid var(--border-light);
       }
   
       .nav-links.active {
           max-height: 400px;
           padding: 20px 0;
       }
   
       .nav-links li {
           margin: 15px 0;
       }
   
       .menu-toggle {
           display: block;
       }
       
       table.blueTable {
           display: block;
           overflow-x: auto;
           white-space: nowrap;
       }

       .blog-header h1,
       .blog-article-header h1 {
           font-size: 30px;
       }

       .blog-header p,
       .blog-article-header p,
       .blog-content {
           font-size: 16px;
       }

       .admin-header,
       .admin-actions {
           align-items: stretch;
           flex-direction: column;
       }

       .admin-header h1 {
           font-size: 30px;
       }

       .admin-form-grid {
           grid-template-columns: 1fr;
       }

       .admin-table {
           display: block;
           overflow-x: auto;
           white-space: nowrap;
       }
   }
