/* Base Styles & Variables */
:root {
    --primary-color: #3f51b5;
    --secondary-color: #ff6e40;
    --accent-color: #2e7d32;
    --dark-color: #333;
    --light-color: #f9f9f9;
    --gray-color: #eee;
    --text-color: #333;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    max-width: 100%;
    overflow-wrap: break-word;
    hyphens: auto;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
    position: relative;
}

h2:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin-top: 0.5rem;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
    margin-bottom: 1.5rem;
}

.section-intro {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
    text-align: center;
}

/* Container & Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
    position: relative;
}

section.bg-alt {
    background-color: var(--gray-color);
}

.section-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.text-content, .image-content {
    flex: 1;
}

/* Buttons & Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: #2c3e99;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #ff5722;
    transform: translateY(-2px);
    color: white;
}

.btn-large {
    padding: 12px 30px;
    font-size: 1rem;
}

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: white;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.main-navigation a {
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.main-navigation a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-navigation a:hover:after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 22px;
    position: relative;
    z-index: 1100;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    margin-bottom: 5px;
    position: relative;
    background: var(--dark-color);
    border-radius: 3px;
    transform-origin: center;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.mobile-menu-toggle span:last-child {
    margin-bottom: 0;
}

.mobile-menu-toggle.active span:first-child {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:last-child {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: white;
    box-shadow: var(--shadow-lg);
    padding: 80px 20px 20px;
    z-index: 1000;
    transition: right 0.3s ease-out;
    overflow-y: auto;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav li {
    margin-bottom: 15px;
}

.mobile-nav a {
    display: block;
    padding: 10px 0;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-dropdown {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.current-lang {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-options {
    position: absolute;
    top: 100%;
    right: 0;
    list-style: none;
    background-color: white;
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius);
    padding: 10px 0;
    min-width: 130px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.lang-dropdown.active .lang-options,
.lang-dropdown:focus .lang-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-options li {
    margin: 0;
}

.lang-options a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    transition: var(--transition);
}

.lang-options a:hover {
    background-color: var(--gray-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(120deg, #e0f7fa, #bbdefb);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 100% 100%;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-image {
    flex: 1;
    transform: perspective(800px) rotateY(-10deg);
    transition: transform 0.5s ease;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.hero-image:hover {
    transform: perspective(800px) rotateY(0);
}

/* ZIP Code Search Form */
.zip-search-container {
    margin-top: 30px;
    margin-bottom: 30px;
    background-color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.zip-search-container.centered {
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.zip-search-form .form-group {
    display: flex;
    gap: 10px;
}

.zip-search-form input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

.zip-search-form input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.2);
}

.zip-search-form button {
    white-space: nowrap;
}

/* Cards and Grids */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 25px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.card ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.card li {
    margin-bottom: 10px;
}

/* Provider Cards */
.provider-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.provider-card {
    display: flex;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.provider-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.provider-logo {
    width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 20px;
}

.provider-details {
    flex: 1;
}

.provider-details h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.provider-details p {
    margin-bottom: 15px;
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.tip-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--primary-color);
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 40px auto;
}

.faq-item {
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    background-color: white;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-item summary {
    padding: 15px 20px;
    cursor: pointer;
    position: relative;
    font-weight: 600;
    list-style: none;
    background-color: white;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    transition: var(--transition);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-content {
    padding: 0 20px 20px;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h4 {
    color: white;
    font-size: 1.5rem;
}

.footer-links h4, .footer-contact h4 {
    color: white;
    margin-bottom: 15px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.copyright {
    margin-bottom: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

#search-status, #search-result {
    transition: var(--transition);
}

.company-logos-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.company-logos-container img {
    object-fit: contain;
    transition: var(--transition);
}

.loader {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 20px 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Utility Classes */
.desktop-only {
    display: block;
}

/* Media Queries */
@media (max-width: 992px) {
    section {
        padding: 60px 0;
    }
    
    .section-content {
        flex-direction: column-reverse;
    }
    
    .text-content, .image-content {
        width: 100%;
    }
    
    .image-content {
        margin-bottom: 30px;
    }
    
    .hero-content {
        flex-direction: column;
    }
    
    .hero-text {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .desktop-nav, .desktop-only {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .provider-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .provider-logo {
        margin-bottom: 20px;
        padding-right: 0;
    }
    
    .zip-search-form .form-group {
        flex-direction: column;
    }
    
    .zip-search-form input, .zip-search-form button {
        width: 100%;
    }
}

@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.card, .provider-card, .tip-card {
    animation: fadeIn 0.5s ease-out, slideUp 0.5s ease-out;
}

/* Neumorphism effect */
.zip-search-container {
    background: #f0f0f0;
    box-shadow: 8px 8px 16px #d1d1d1, -8px -8px 16px #ffffff;
}

/* Accessibility focus styles */
a:focus, button:focus, input:focus, summary:focus {
    outline: 2px dashed var(--primary-color);
    outline-offset: 2px;
}