/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-dark: #1f2937;
    --border-color: #e5e7eb;
    --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);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
    --animation-delay: 0s;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

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

/* Header */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

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

.cta-button {
    background: var(--primary-color) !important;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.cta-button:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h2 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.hero-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    position: relative;
}

.floating-icons {
    position: relative;
    width: 200px;
    height: 200px;
}

.floating-icons .icon {
    position: absolute;
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
    background: white;
    border-radius: 50%;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
}

.floating-icons .icon:nth-child(1) {
    top: 0;
    left: 0;
    animation-delay: 0s;
}

.floating-icons .icon:nth-child(2) {
    top: 0;
    right: 0;
    animation-delay: 0.5s;
}

.floating-icons .icon:nth-child(3) {
    bottom: 0;
    left: 0;
    animation-delay: 1s;
}

.floating-icons .icon:nth-child(4) {
    bottom: 0;
    right: 0;
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

/* Services Section */
.services {
    padding: 5rem 0;
    background: var(--bg-primary);
}

.services h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

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

/* Service Cards (both div and article) */
.service-card,
article.service-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before,
article.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover,
article.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.service-card:hover::before,
article.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.price-range {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.price-note {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.service-features li::before {
    content: '✓';
    color: var(--secondary-color);
    font-weight: bold;
}

/* Add-ons Section */
.addons-section,
aside.addons-section {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-top: 2rem;
}

.addons-section h3,
aside.addons-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-primary);
}

.addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.addon-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.addon-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

.addon-item span {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

.addon-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background: var(--bg-dark);
    color: white;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact > .container > p {
    text-align: center;
    font-size: 1.25rem;
    color: #d1d5db;
    margin-bottom: 3rem;
}

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

.contact-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.contact-link:hover {
    text-decoration: underline;
}

/* Enhanced Quote Form Styles */
.quote-form {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

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

.form-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-header p {
    color: #d1d5db;
    font-size: 0.9rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Fieldset and Legend styling for form sections */
.form-section {
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    border: none;
    padding: 0;
}

/* Service Selection Grid */
.service-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.service-option {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: block;
}

.service-option:hover {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.1);
    transform: translateY(-2px);
}

.service-option.selected {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.15);
}

.service-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.service-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.service-option .service-icon {
    font-size: 1.5rem;
    width: auto;
    height: auto;
    margin: 0;
    background: none;
}

.service-title {
    font-weight: 600;
    font-size: 1.1rem;
    flex: 1;
}

.service-price {
    color: #10b981;
    font-weight: 700;
    font-size: 1rem;
}

.service-description {
    color: #d1d5db;
    font-size: 0.85rem;
    line-height: 1.4;
    display: block;
}

/* Form Controls */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    color: #f3f4f6;
    font-size: 0.9rem;
}

.required {
    color: #f87171;
}

.optional {
    color: #9ca3af;
    font-weight: 400;
}

.contact-form input,
.contact-form textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #10b981;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #9ca3af;
}

.contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

.character-count {
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: right;
}

/* Urgency Options */
.urgency-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.urgency-option {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
    display: block;
}

.urgency-option:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.urgency-option.selected {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.urgency-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Submit Section */
.submit-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.submit-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-note {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--border-radius);
    padding: 1rem;
    font-size: 0.85rem;
    color: #93c5fd;
    line-height: 1.4;
    text-align: center;
}

/* Legacy form styles (for backward compatibility) */
.form-group select,
.form-row input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    color: white;
    font-size: 1rem;
}

.form-group select:focus,
.form-row input:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.15);
}

.form-group select option {
    background: var(--bg-dark);
    color: white;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Footer */
.footer {
    background: #111827;
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.footer p {
    color: #9ca3af;
    max-width: 400px;
}

.footer a {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-disclaimer {
    color: #6b7280;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.mobile-break {
    display: none;
}

.footer-disclaimer small {
    color: #9ca3af;
    font-size: 0.8rem;
    line-height: 1.5;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .desktop-separator {
        display: none;
    }

    .mobile-break {
        display: inline;
    }
}

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

/* Scroll animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--animation-delay, 0s);
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.card-active {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1) !important;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

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

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

    .contact-methods {
        grid-template-columns: 1fr;
    }

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

    .nav {
        gap: 1rem;
    }

    .floating-icons {
        width: 150px;
        height: 150px;
    }

    .floating-icons .icon {
        font-size: 2rem;
        padding: 0.5rem;
    }

    /* Enhanced form responsive styles */
    .service-selection-grid {
        grid-template-columns: 1fr;
    }

    .urgency-options {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .services {
        padding: 3rem 0;
    }

    .contact {
        padding: 3rem 0;
    }

    .container {
        padding: 0 0.5rem;
    }

    .quote-form {
        padding: 1.5rem;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll,
    .card-active,
    .header {
        transition: none !important;
        animation: none !important;
    }

    .floating-icons .icon {
        animation: none !important;
    }
}

/* Error states for form fields */
.field-error {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.fieldset-error .service-option,
.fieldset-error .urgency-option {
    border-color: rgba(239, 68, 68, 0.5) !important;
    background: rgba(239, 68, 68, 0.05) !important;
}

/* Error message styling */
.error-message {
    color: #fca5a5;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    animation: slideInError 0.3s ease-out;
}

.error-message::before {
    font-size: 0.9rem;
}

.fieldset-error-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    text-align: center;
}

/* Shake animation for validation errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success states */
.field-success {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Better focus states that work with validation */
.contact-form input:not(.field-error):focus,
.contact-form textarea:not(.field-error):focus {
    border-color: #10b981;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Hide browser validation tooltips */
input:invalid,
select:invalid,
textarea:invalid {
    box-shadow: none;
}

/* Improve visual hierarchy for required fields */
.required {
    color: #fca5a5;
    font-weight: 600;
}

/*!* Better styling for fieldset errors *!*/
/*.fieldset-error .section-title {*/
/*    color: #fca5a5 !important;*/
/*}*/

/* Smooth transitions for validation states */
.contact-form input,
.contact-form textarea,
.service-option,
.urgency-option {
    transition: all 0.3s ease, box-shadow 0.2s ease;
}

/* Loading state improvements */
.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Better error spacing */
.form-group .error-message {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.contact-extra {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 0.5rem;
    margin-bottom: 0;
}