/* ================================================
   Snow Day Calculator - Main Stylesheet
   Theme: Red & Black
   ================================================ */

/* ================================================
   CSS Variables & Reset
   ================================================ */
:root {
    --primary-red: #DC2626;
    --secondary-red: #EF4444;
    --dark-red: #991B1B;
    --black: #000000;
    --dark-gray: #1F2937;
    --light-gray: #F3F4F6;
    --white: #FFFFFF;
    --text-gray: #6B7280;
    --border-gray: #E5E7EB;
    --success-green: #10B981;
    --warning-yellow: #F59E0B;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    overflow-x: hidden;
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ================================================
   Navigation Bar
   ================================================ */
.navbar {
    background: linear-gradient(135deg, var(--black) 0%, var(--dark-gray) 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.logo i {
    color: var(--secondary-red);
    font-size: 1.8rem;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logo:hover {
    transform: scale(1.05);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-toggle:hover {
    color: var(--secondary-red);
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--white);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary-red);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::before,
.nav-links a.active::before {
    width: 80%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-red);
}

/* ================================================
   Hero Section
   ================================================ */
.hero {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--black) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.badge i {
    color: var(--secondary-red);
}

/* ================================================
   Calculator Section
   ================================================ */
.calculator-section {
    padding: 4rem 0;
    background: linear-gradient(to bottom, var(--light-gray), var(--white));
}

.calculator-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    padding: 3rem;
    max-width: 700px;
    margin: 0 auto;
    animation: scaleIn 0.6s ease;
    border: 2px solid var(--border-gray);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calculator-header i {
    font-size: 3rem;
    color: var(--primary-red);
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.calculator-header h2 {
    font-size: 2rem;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.calculator-header p {
    color: var(--text-gray);
    font-size: 1rem;
}

.calculator-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-group label i {
    color: var(--primary-red);
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-gray);
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--light-gray);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-red);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.error-message {
    display: block;
    color: var(--primary-red);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    min-height: 1.5rem;
}

.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    margin-top: 1rem;
}

.btn-secondary:hover {
    background: var(--primary-red);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ================================================
   Results Container
   ================================================ */
.results-container {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
    border-radius: 15px;
    border: 2px solid var(--border-gray);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-content h3 {
    text-align: center;
    color: var(--black);
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.probability-display {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.probability-circle {
    position: relative;
    width: 200px;
    height: 200px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--border-gray);
    stroke-width: 12;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--primary-red);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 534;
    stroke-dashoffset: 534;
    transition: stroke-dashoffset 2s ease, stroke 1s ease;
}

.probability-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.percentage {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-red);
    display: inline-block;
}

.result-message {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.weather-item {
    text-align: center;
    padding: 1rem;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.weather-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.weather-item i {
    font-size: 2rem;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
    display: block;
}

.weather-item span {
    display: block;
    font-weight: 600;
    color: var(--dark-gray);
}

/* ================================================
   How It Works Section
   ================================================ */
.how-it-works {
    padding: 4rem 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--black);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--secondary-red));
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.step-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    border: 2px solid var(--border-gray);
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--secondary-red));
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.step-card:hover::before {
    transform: scaleX(1);
}

.step-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.step-icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    box-shadow: var(--shadow-md);
}

.step-number {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--black);
    color: var(--white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    border: 3px solid var(--white);
}

.step-card h3 {
    font-size: 1.5rem;
    color: var(--black);
    margin-bottom: 1rem;
}

.step-card p {
    color: var(--text-gray);
    line-height: 1.8;
}

/* ================================================
   Features Section
   ================================================ */
.features {
    padding: 4rem 0;
    background: linear-gradient(to bottom, var(--light-gray), var(--white));
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-red);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--black);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-gray);
    line-height: 1.8;
}

/* ================================================
   Content Section (SEO)
   ================================================ */
.content-section {
    padding: 4rem 0;
    background: var(--white);
}

.content-article {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.content-article h2 {
    font-size: 2rem;
    color: var(--black);
    margin-bottom: 1.5rem;
    margin-top: 2rem;
}

.content-article h3 {
    font-size: 1.5rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.content-article p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.content-article strong {
    color: var(--primary-red);
    font-weight: 600;
}

/* ================================================
   Footer
   ================================================ */
.footer {
    background: linear-gradient(135deg, var(--black) 0%, var(--dark-gray) 100%);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--secondary-red);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer-logo i {
    color: var(--secondary-red);
    font-size: 1.8rem;
}

.footer-description,
.footer-social-text,
.footer-cta-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a::before {
    content: '▶';
    font-size: 0.7rem;
    color: var(--secondary-red);
}

.footer-links a:hover {
    color: var(--secondary-red);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    border: 2px solid transparent;
}

.social-links a:hover {
    background: var(--primary-red);
    transform: translateY(-5px);
    border-color: var(--white);
}

.footer-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-red);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    margin-top: 1rem;
}

.footer-cta-btn:hover {
    background: var(--secondary-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.footer-contact {
    margin-top: 1rem;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact i {
    color: var(--secondary-red);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* ================================================
   Back to Top Button
   ================================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* ================================================
   Responsive Design
   ================================================ */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark-gray);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-links.active {
        max-height: 500px;
    }

    .nav-links li {
        padding: 0.5rem 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .calculator-card {
        padding: 2rem 1.5rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .steps-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .weather-details {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo,
    .social-links {
        justify-content: center;
    }

    .footer-links a::before {
        display: none;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .calculator-header h2 {
        font-size: 1.5rem;
    }

    .probability-circle {
        width: 150px;
        height: 150px;
    }

    .percentage {
        font-size: 2rem;
    }

    .btn-primary,
    .btn-secondary {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
}

/* ================================================
   Animations & Effects
   ================================================ */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Smooth transitions for all interactive elements */
button, a, input, .card {
    transition: var(--transition);
}

/* Loading spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Success/Error states */
.input-success {
    border-color: var(--success-green) !important;
}

.input-error {
    border-color: var(--primary-red) !important;
}

/* Disabled state */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .back-to-top,
    .mobile-toggle {
        display: none;
    }
}