/* --- Root Variables & Base Styles --- */
:root {
    --snow-blue: #B3DAF1;
    --deep-blue: #1D3557;
    --white: #FFFFFF;
    --light-grey: #6D6D6D;
    --dark-grey: #333;
    --alert-red: #E63946;
    --success-green: #2A9D8F;
    --delay-yellow: #E9C46A;
    --font-main: 'Roboto', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--white);
    color: var(--dark-grey);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    color: var(--deep-blue);
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

section {
    padding: 4rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.hidden {
    display: none !important;
}

/* --- Header & Navigation --- */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .logo {
    display: flex;
    align-items: center;
}

header .logo i {
    color: var(--snow-blue);
    font-size: 2rem;
    margin-right: 0.5rem;
}

/* Replaced 'header .logo h1' with '.site-title' for better SEO */
header .logo .site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--deep-blue);
    line-height: 1.2;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

header nav a {
    text-decoration: none;
    color: var(--deep-blue);
    font-weight: 700;
    transition: color 0.3s;
}

header nav a:hover {
    color: var(--snow-blue);
}

/* --- Hero Section --- */
#hero {
    background-color: var(--deep-blue);
    color: var(--white);
    text-align: center;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

#hero h2 {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 0.5rem;
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

#zip-form {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 500px;
}

#zip-input {
    flex-grow: 1;
    padding: 1rem;
    border: 2px solid var(--snow-blue);
    border-radius: 8px;
    font-size: 1.1rem;
}

#check-button {
    padding: 1rem 1.5rem;
    background-color: var(--snow-blue);
    color: var(--deep-blue);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
}

#check-button:hover {
    background-color: #a2d0ee;
}

.example-zips {
    margin-top: 1rem;
    color: #ccc;
}

.example-zips a {
    color: var(--snow-blue);
    text-decoration: underline;
    margin: 0 0.5rem;
    cursor: pointer;
}

#error-message {
    margin-top: 1rem;
    color: var(--alert-red);
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

/* --- Results Section --- */
#results-container {
    background-color: #f8f9fa;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.result-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.result-card h3 {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--snow-blue);
    padding-bottom: 0.5rem;
}

.main-probability {
    text-align: center;
}

.probability-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 0 auto 1rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: conic-gradient(var(--snow-blue) 0%, #e9ecef 0%);
    transition: background 1s ease-in-out;
}

#probability-percent {
    font-size: 3rem;
    font-weight: 900;
    color: var(--deep-blue);
}

#probability-summary {
    font-size: 1.1rem;
    color: var(--light-grey);
}

#school-status-content {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 2rem;
    border-radius: 8px;
    transition: background-color 0.5s, color 0.5s;
}
#school-status-content.open { background-color: #d4edda; color: var(--success-green); }
#school-status-content.delayed { background-color: #fff3cd; color: var(--delay-yellow); }
#school-status-content.closed { background-color: #f8d7da; color: var(--alert-red); }

#school-status-content i {
    font-size: 2rem;
    margin-right: 1rem;
}

.data-source-note {
    font-size: 0.8rem;
    color: var(--light-grey);
    text-align: center;
    margin-top: 1rem;
}

.forecast-cards {
    display: flex;
    gap: 1rem;
    justify-content: space-around;
}

.forecast-card {
    text-align: center;
    flex-grow: 1;
}

.forecast-card h4 {
    font-size: 1rem;
    color: var(--light-grey);
}

.forecast-card i {
    font-size: 2.5rem;
    color: var(--snow-blue);
    margin: 0.5rem 0;
}

.forecast-card .temp {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--deep-blue);
}

.tips ul {
    list-style: none;
}

.tips li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.tips i {
    color: var(--snow-blue);
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* --- Historical Data --- */
#historical-data-section {
    background: var(--white);
}
.history-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}
.history-card {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    flex: 1;
}
.history-card h4 {
    color: var(--deep-blue);
    margin-bottom: 0.5rem;
}
.history-card p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light-grey);
}

/* --- Educational & Blog Sections --- */
#educational {
    background-color: #f8f9fa;
}

.educational-grid, .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

#educational article {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
}

.blog-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.blog-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.blog-card h4, .blog-card p, .blog-card .read-more {
    padding: 0 1.5rem;
}

.blog-card h4 {
    margin-top: 1rem;
    font-size: 1.25rem;
}

.blog-card p {
    color: var(--light-grey);
    flex-grow: 1;
}

.blog-card .read-more {
    display: inline-block;
    padding-bottom: 1.5rem;
    text-decoration: none;
    color: var(--deep-blue);
    font-weight: 700;
}

/* --- FAQ Section --- */
#faq {
    max-width: 800px;
    margin: 0 auto;
}

#faq details {
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #eee;
}

#faq summary {
    padding: 1rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none; /* Hide default arrow */
    position: relative;
    color: var(--deep-blue);
}

#faq summary::-webkit-details-marker { display: none; }
#faq summary::after {
    content: '+';
    position: absolute;
    right: 1rem;
    font-size: 1.5rem;
    font-weight: 400;
}
#faq details[open] summary::after { content: '−'; }

#faq details p {
    padding: 0 1rem 1rem 1rem;
    color: var(--light-grey);
}

/* --- Footer --- */
footer {
    background-color: var(--deep-blue);
    color: #ccc;
    padding: 3rem 2rem 1rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem auto;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col a { color: #ccc; text-decoration: none; }
.footer-col a:hover { color: var(--snow-blue); }

.data-logos span {
    background: #fff;
    color: var(--deep-blue);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    margin-right: 0.5rem;
}

.newsletter-form { display: flex; }
.newsletter-form input {
    flex-grow: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 4px 0 0 4px;
}
.newsletter-form button {
    padding: 0.5rem 1rem;
    background-color: var(--snow-blue);
    border: none;
    color: var(--deep-blue);
    cursor: pointer;
    border-radius: 0 4px 4px 0;
}

.social-icons { margin-top: 1rem; }
.social-icons a {
    color: var(--white);
    font-size: 1.5rem;
    margin-right: 1rem;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #4a6fa5;
    padding-top: 1rem;
    font-size: 0.9rem;
}

/* --- Animations --- */
.snowflakes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.snowflake {
    color: #fff;
    font-size: 1.5em;
    position: absolute;
    top: -10%;
    animation: fall linear infinite;
}
.snowflake:nth-of-type(1){ left: 10%; animation-duration: 12s; animation-delay: 0s; }
.snowflake:nth-of-type(2){ left: 20%; animation-duration: 8s; animation-delay: 1s; }
.snowflake:nth-of-type(3){ left: 30%; animation-duration: 14s; animation-delay: 2s; }
.snowflake:nth-of-type(4){ left: 40%; animation-duration: 7s; animation-delay: 3s; }
.snowflake:nth-of-type(5){ left: 50%; animation-duration: 11s; animation-delay: 0s; }
.snowflake:nth-of-type(6){ left: 60%; animation-duration: 9s; animation-delay: 1.5s; }
.snowflake:nth-of-type(7){ left: 70%; animation-duration: 15s; animation-delay: 2.5s; }
.snowflake:nth-of-type(8){ left: 80%; animation-duration: 6s; animation-delay: 4s; }
.snowflake:nth-of-type(9){ left: 90%; animation-duration: 10s; animation-delay: 0.5s; }
.snowflake:nth-of-type(10){ left: 95%; animation-duration: 8s; animation-delay: 1.8s; }

@keyframes fall {
    to { transform: translateY(105vh); opacity: 0; }
}

/* --- Responsive Design (Mobile First Approach) --- */
@media (max-width: 768px) {
    h2 { font-size: 2rem; }
    #hero h2 { font-size: 2.5rem; }

    header { flex-direction: column; gap: 1rem; }
    header nav ul { justify-content: center; flex-wrap: wrap; }
    
    #zip-form { flex-direction: column; }
    
    .forecast-cards { flex-direction: column; }
    .forecast-card { margin-bottom: 1rem; }
    
    .history-grid { flex-direction: column; }
}




/* --- Blog Page Styles --- */
.blog-post {
    padding-bottom: 2rem; /* Reduce bottom padding to not have huge space before calc */
}

.blog-article {
    max-width: 800px;
    margin: 0 auto;
}

.blog-article h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    color: var(--deep-blue);
}

.blog-meta {
    font-style: italic;
    color: var(--light-grey);
    margin-bottom: 2rem;
}

.intro-box {
    background-color: #f0f8ff;
    border-left: 5px solid var(--snow-blue);
    padding: 1.5rem;
    margin: 2rem 0;
    font-size: 1.1rem;
    border-radius: 8px;
}

.blog-article h2 {
    text-align: left;
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.blog-article h3 {
    text-align: left;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.blog-article p {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.blog-article ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.blog-article ul li {
    padding: 0.5rem 0;
    font-size: 1.1rem;
}

/* Style for the embedded calculator */
#hero.embedded-calculator {
    min-height: auto; /* Override the homepage hero height */
    padding: 3rem 2rem;
    border-radius: 12px;
    max-width: 1200px; /* Match other sections */
    margin: 2rem auto; /* Give it some space */
}

/* More Blogs Section */
#more-blogs {
    background-color: #f8f9fa;
}




.content-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
    color: #333;
    font-family: 'Arial', sans-serif;
    text-align: left; /* Explicit left alignment */
    direction: ltr; /* Explicit left-to-right */
}

/* Left-aligned headings */
.content-container h1,
.content-container h2,
.content-container h3,
.content-container h4 {
    margin: 1.5em 0 0.8em 0; /* Top Right Bottom Left */
    line-height: 1.3;
    color: #222;
    font-weight: 600;
    text-align: left; /* Force left alignment */
    clear: both; /* Prevent float interference */
}

.content-container h1 {
    font-size: 2.2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-left: 0; /* Remove any left margin */
}

.content-container h2 { font-size: 1.8rem; }
.content-container h3 { font-size: 1.5rem; }
.content-container h4 { font-size: 1.2rem; }

/* Left-aligned lists */
.content-container ul,
.content-container ol {
    margin: 1em 0 1em 1em; /* Top Right Bottom Left */
    padding-left: 1em; /* Standard bullet indentation */
    text-align: left;
}

.content-container ul { list-style-type: disc; }
.content-container ol { list-style-type: decimal; }
.content-container li { margin-bottom: 0.5em; }

/* Paragraphs and links */
.content-container p { margin: 1em 0; }
.content-container a {
    color: #0066cc;
    text-decoration: none;
}
.content-container a:hover { text-decoration: underline; }

.inline-blog-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}