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

:root {
    /* Premium Color Palette */
    --primary-blue: #0f172a; /* Deep charcoal/slate blue */
    --secondary-blue: #1e293b;
    --primary-orange: #f97316; /* Vibrant modern orange */
    --orange-hover: #ea580c;
    --text-dark: #334155;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --white: #ffffff;
    --error: #ef4444;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
}

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

/* NAVBAR */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-blue);
    font-size: 24px;
    font-weight: 800;
}

.logo span {
    color: var(--primary-orange);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s;
}

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

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
}

/* HERO SECTION */
.hero {
    background: linear-gradient(rgba(17, 43, 78, 0.7), rgba(17, 43, 78, 0.7)), url('https://images.unsplash.com/photo-1542282088-fe8426682b8f?auto=format&fit=crop&q=80&w=1920') center/cover no-repeat;
    height: 60vh;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    color: var(--white);
    animation: heroZoom 20s infinite alternate ease-in-out;
}

@keyframes heroZoom {
    0% { background-size: 100%; }
    100% { background-size: 110%; }
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 48px;
    max-width: 800px;
    margin-bottom: 30px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-orange), var(--orange-hover));
    color: var(--white);
    padding: 15px 40px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    padding: 12px 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-radius: 8px;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
}

.btn-primary:hover, .btn-orange:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.3);
}

/* SECTION HEADERS */
.section-title {
    text-align: center;
    font-size: 32px;
    color: var(--primary-blue);
    margin: 50px 0 30px;
    text-transform: uppercase;
}

/* SERVICES CARDS */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.service-card {
    background: var(--white);
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eaeaea;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.service-card h3 {
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 20px;
}

.service-card p {
    color: var(--text-light);
    font-size: 14px;
}

/* ESTIMATE & WHY CHOOSE US (HOME) */
.split-section {
    display: flex;
    margin: 60px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.about-text {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.about-image {
    flex: 1;
    display: flex;
}

.estimate-form {
    flex: 1;
    background: linear-gradient(145deg, var(--primary-blue), var(--secondary-blue));
    padding: 50px 40px;
    color: var(--white);
}

.estimate-form h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    letter-spacing: 0.5px;
}

.estimate-form input, .estimate-form select, .estimate-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--white);
    font-size: 16px;
    transition: all 0.3s ease;
}

.estimate-form input:focus, .estimate-form select:focus, .estimate-form textarea:focus,
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.3);
}

.estimate-form input::placeholder, .estimate-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.estimate-form option {
    color: var(--text-dark);
}

.estimate-form button {
    width: 100%;
    margin-top: 15px;
}

/* Math Challenge & Form Errors */
.math-challenge {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.math-challenge label {
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
}

.math-challenge input {
    margin-bottom: 0 !important;
}

.form-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 14px;
    display: none;
}

.success-message {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

.success-message h3 {
    color: #4ade80;
    margin-bottom: 10px;
    font-size: 24px;
}

.why-choose {
    flex: 1;
    background-color: var(--white);
    padding: 40px;
}

.why-choose h2 {
    color: var(--primary-blue);
    margin-bottom: 25px;
}

.why-list {
    list-style: none;
}

.why-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--text-dark);
}

.why-list li::before {
    content: '✔';
    color: var(--primary-orange);
    font-size: 20px;
    margin-right: 15px;
}

/* REVIEWS CAROUSEL */
.reviews-section {
    padding: 60px 0;
    overflow: hidden;
    background-color: #f8fafc;
    margin: 60px 0;
}

.reviews-section h2 {
    text-align: center;
    color: var(--primary-blue);
    margin-bottom: 40px;
}

.marquee-container {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}

.marquee-track {
    display: inline-flex;
    animation: marquee 60s linear infinite;
    gap: 30px;
    padding-left: 30px;
}

.marquee-container:hover .marquee-track {
    animation-play-state: paused;
}

.review-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
    width: 350px;
    white-space: normal;
    display: flex;
    flex-direction: column;
}

.review-stars {
    color: #fbbf24;
    font-size: 20px;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.review-text {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.6;
    flex-grow: 1;
    font-style: italic;
    margin-bottom: 20px;
}

.review-author {
    font-weight: 600;
    color: var(--primary-blue);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* HOW IT WORKS */
.how-it-works {
    text-align: center;
    margin: 80px auto;
}

.steps-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.step-card {
    flex: 1;
    min-width: 250px;
    background: var(--white);
    padding: 30px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
    position: relative;
    border: 1px solid #eaeaea;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.step-number {
    background-color: var(--primary-orange);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    margin: 0 auto 15px auto;
}

.step-card h3 {
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.step-card p {
    color: var(--text-light);
    font-size: 15px;
}

/* SERVICE AREA */
.service-area {
    text-align: center;
    margin: 60px auto;
    max-width: 800px;
}

.map-placeholder {
    background: #e0e0e0;
    height: 300px;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* FOOTER */
footer {
    background-color: var(--primary-blue);
    color: var(--white);
    text-align: center;
    padding: 40px 20px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
}

.footer-logo span { color: var(--primary-orange); }

.footer-phone {
    font-size: 24px;
    color: var(--primary-orange);
    font-weight: bold;
    margin: 15px 0;
    display: block;
    text-decoration: none;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
}

/* SOCIAL LINKS */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.social-links a {
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

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

.contact-layout .social-links a {
    color: var(--primary-blue);
    background: #f1f5f9;
}

.contact-layout .social-links a:hover {
    background: var(--primary-orange);
    color: var(--white);
}

/* PAGE HEADERS */
.page-header {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 40px 20px;
    text-align: center;
}

.page-header h1 {
    font-size: 36px;
    text-transform: uppercase;
}

/* SERVICES PAGE SPECIFIC */
.detailed-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.detailed-card {
    background: var(--white);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detailed-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    margin: 0 auto 20px auto;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-orange);
    border-radius: 50%;
}

.detailed-card h3 {
    margin-bottom: 15px;
    color: var(--primary-blue);
}

.detailed-card ul {
    list-style: none;
    margin-bottom: 25px;
}

.detailed-card .btn-primary {
    margin-top: auto;
}

.detailed-card ul li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    color: var(--text-light);
}

.detailed-card ul li::before {
    content: '•';
    color: var(--primary-orange);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 18px;
}

.detailed-card .btn-primary {
    width: 100%;
    text-align: center;
    padding: 10px;
    font-size: 16px;
}

/* ABOUT PAGE SPECIFIC */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.team-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    text-align: center;
}

.team-img {
    width: 100%;
    height: 250px;
    background-color: #ddd;
    object-fit: cover;
}

.team-info {
    padding: 20px;
}

.team-info h3 {
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.team-info span {
    color: var(--primary-orange);
    font-size: 14px;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.team-info p {
    font-size: 14px;
    color: var(--text-light);
}

.community-section {
    background: #e8edf5;
    padding: 50px;
    border-radius: 8px;
    margin: 50px 0;
}

.community-section h2 {
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.community-section p {
    margin-bottom: 15px;
    color: var(--text-dark);
}

/* CONTACT PAGE SPECIFIC */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin: 50px 0;
}

.contact-details h2 {
    color: var(--primary-blue);
    margin-bottom: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    background-color: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.contact-info {
    display: block;
}

.contact-icon {
    font-size: 24px;
    color: var(--primary-orange);
    margin-right: 15px;
    min-width: 30px;
}

.contact-info strong {
    display: block;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.contact-info p {
    color: var(--text-light);
}

.hours-table {
    width: 100%;
    max-width: 300px;
}

.hours-table td {
    padding: 5px 0;
    color: var(--text-light);
}

.hours-table td:last-child {
    text-align: right;
    font-weight: bold;
    color: var(--text-dark);
}

.map-full {
    height: 400px;
    background: #ddd;
    margin: 0;
    width: 100%;
}

.rate-table {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    border-collapse: collapse;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.rate-table th, .rate-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #eaeaea;
}

.rate-table th {
    background-color: var(--primary-blue);
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 18px;
}

.rate-table td:last-child {
    font-weight: bold;
    color: var(--primary-orange);
}

.rate-dropdown {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
}

.rate-dropdown summary {
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-blue);
    cursor: pointer;
    background: #fdfdfd;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.rate-dropdown summary:hover {
    background: #f8f8f8;
}

.rate-dropdown summary::-webkit-details-marker {
    display: none;
}

.rate-dropdown summary::after {
    content: '▼';
    font-size: 16px;
    color: var(--primary-orange);
    transition: transform 0.3s ease;
}

.rate-dropdown[open] summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 1px solid #eaeaea;
}

.rate-dropdown[open] summary::after {
    transform: rotate(180deg);
}

.rate-dropdown .dropdown-content {
    padding: 20px;
    border: 1px solid #eaeaea;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* FORM VALIDATION & ACCESSIBILITY */
.form-group {
    margin-bottom: 15px;
    position: relative;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.inline-error {
    color: #ffcccc;
    font-size: 13px;
    margin-top: 5px;
    display: none;
    text-align: left;
}

input.invalid, select.invalid, textarea.invalid, input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
    border: 2px solid var(--error) !important;
    background-color: #fff5f5;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }

    .regulations-callout {
        padding: 30px 20px !important;
        flex-direction: column;
        text-align: center;
        gap: 20px !important;
    }

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

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 20px;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 28px;
    }

    .split-section {
        flex-direction: column;
    }
    
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

/* GLOBAL ANIMATIONS */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    will-change: opacity, transform;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
