* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Subtle background pattern for professionalism */
    background-color: #f0fdf4; /* Very light mint tint */
    background-image: radial-gradient(#dcfce7 1px, transparent 1px);
    background-size: 24px 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* --- Header --- */
.site-header {
    background-color: #ffffff;
    /* Fixed: 45px padding from left */
    padding: 15px 45px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.15); 
    height: 80px; 
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1100; /* Header stays ON TOP of ribbon */
    width: 100%;
}

.logo-container {
    width: 100%;
    /* Fixed: Left alignment with no centering */
    max-width: 100%; 
    margin: 0; 
    display: flex;
    justify-content: flex-start; 
    align-items: center;
    /* Fixed: Tab-width gap */
    gap: 50px; 
}

.logo-img {
    max-height: 45px; 
    width: auto;
    display: block;
}

/* --- Celebration Ribbon (Left Sidebar) --- */
.celebration-ribbon {
    position: absolute; 
    left: 20px; 
    top: 0;
    height: 100%; 
    /* Fixed: Min-height to prevent overlap on small screens */
    min-height: 600px; 
    width: 240px; 
    background: linear-gradient(160deg, #1e3a8a 0%, #2563eb 100%); 
    color: white;
    padding: 100px 20px 50px 20px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 1000; 
    
    /* "M" / Swallowtail Cut at Bottom */
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 95%, 0 100%);
    
    filter: drop-shadow(4px 4px 15px rgba(0,0,0,0.4));
}

/* Badge Container - WAX SEAL / BANNER STYLE */
.ribbon-badge {
    position: relative;
    width: 140px; 
    height: 140px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0; 
}

/* Gold Circle for Logo -> Embossed Coin/Seal Look */
.logo-circle {
    background: radial-gradient(circle, #14289c, #4b4444); 
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px; 
    
    /* 3D Embossed Effect Frame */
    border: 3px solid #d4af37; 
    box-shadow: 
        inset 2px 2px 5px rgba(0,0,0,0.2), 
        0 5px 15px rgba(0,0,0,0.3),
        0 0 0 2px #b8860b; 
    
    z-index: 2;
    position: relative;
    overflow: hidden;
}

/* Shimmer Overlay on the Seal */
.logo-circle::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    transform: rotate(30deg);
    animation: seal-shimmer 6s infinite ease-in-out; 
    pointer-events: none;
}

@keyframes seal-shimmer {
    0% { transform: translateX(-150%) rotate(30deg); }
    50% { transform: translateX(150%) rotate(30deg); }
    100% { transform: translateX(150%) rotate(30deg); }
}

/* Banner Ribbons Behind the Seal */
.ribbon-badge::before {
    content: "";
    position: absolute;
    bottom: 8px;
    z-index: 0;
    width: 120%;
    height: 35px; 
    background: #b8860b; 
    transform: rotate(-15deg);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border-radius: 4px;
}

.ribbon-badge::after {
    content: "";
    position: absolute;
    bottom: 8px;
    z-index: 0;
    width: 120%;
    height: 35px; 
    background: #d4af37; 
    transform: rotate(15deg);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border-radius: 4px;
}


.ribbon-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    transform: rotate(0deg); 
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); 
}

/* Gold Flare Effect */
.gold-flare {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px; 
    height: 160px;
    background: radial-gradient(circle, rgba(255,215,0,0.3) 0%, rgba(255,215,0,0) 70%);
    border-radius: 50%;
    animation: pulse-gold 4s infinite ease-in-out;
    z-index: 1;
}

@keyframes pulse-gold {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
}

.celebration-title {
    font-family: 'Georgia', serif;
    font-size: 1.8rem; 
    color: #ffd700; 
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-weight: bold;
}

.ribbon-content p {
    font-size: 0.95rem; 
    line-height: 1.5;
    margin: 0;
    font-weight: 300;
    opacity: 0.95;
}

.ribbon-content strong {
    font-weight: 700;
    color: #fff;
    text-decoration: underline;
    text-decoration-color: #ffd700;
}

.ribbon-footer {
    margin-top: auto; /* Push to bottom */
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.2);
    width: 100%;
    flex-shrink: 0; 
    margin-bottom: 45px;
}

.ribbon-footer i {
    font-size: 1.3rem; 
    color: #ef4444; 
    margin-bottom: 8px;
    display: block;
    filter: drop-shadow(0 0 5px rgba(239,68,68,0.5));
}

.slogan {
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 0.9rem; 
    opacity: 0.9;
    color: #ffffff; 
}

/* --- Main Content --- */
.main-wrapper {
    flex: 1; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; 
    padding: 30px 20px; 
    position: relative; 
    width: 100%; 
}

/* --- Responsive Adjustments --- */
@media (min-width: 1200px) {
    /* No special offset logic needed as per user preference, keep centered */
}

@media (max-width: 1199px) {
    .celebration-ribbon {
        display: none;
    }
}

/* --- The Card --- */
.card {
    background-color: #ffffff;
    width: 100%;
    max-width: 800px; 
    padding: 60px 40px; 
    border-radius: 20px; 
    text-align: center;
    box-shadow: 
        0 20px 40px -10px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    z-index: 900; 
}

.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px; 
    background: linear-gradient(90deg, #00a651, #10b981);
}

.card h1 {
    font-size: 2.8rem; 
    margin-bottom: 15px;
    font-weight: 800;
    color: #111827; 
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.card p {
    font-size: 1.1rem; 
    line-height: 1.5;
    margin-bottom: 40px;
    color: #4b5563; 
    max-width: 600px; 
    margin-left: auto;
    margin-right: auto;
}

/* --- Search Container (Query Page) --- */
.search-container {
    display: flex;
    gap: 12px; 
    max-width: 700px; 
    margin: 0 auto;
    background-color: #446b50; 
    border: 1px solid #07a152; 
    padding: 15px; 
    border-radius: 16px; 
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03); 
}

.input-group {
    flex-grow: 1;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 20px; 
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.1rem; 
}

#address-input {
    width: 100%;
    border: 2px solid #e5e7eb;
    font-size: 1.1rem; 
    padding: 16px 20px 16px 50px; 
    border-radius: 12px; 
    color: #1f2937;
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

#address-input:focus {
    background-color: #fff;
    border-color: #00a651;
    box-shadow: 0 0 0 4px rgba(0, 166, 81, 0.15); 
}

#check-btn {
    background-color: #00a651; 
    color: white;
    border: none;
    padding: 0 35px; 
    font-size: 1.1rem; 
    font-weight: 700;
    border-radius: 12px; 
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 8px 16px rgba(0, 166, 81, 0.2); 
}

#check-btn:hover {
    background-color: #008c44;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 166, 81, 0.3);
}

/* --- Lead Form Styles (Sorry Page) --- */
.contact-form {
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    color: #1f2937;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: #00a651;
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.1);
}

.form-group input:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
    color: #6b7280;
}

#submit-lead-btn {
    width: 100%;
    background-color: #00a651;
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(0, 166, 81, 0.2);
}

#submit-lead-btn:hover:not(:disabled) {
    background-color: #008c44;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 166, 81, 0.3);
}

#submit-lead-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.g-recaptcha {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

/* --- Business Inquiry Section --- */
.business-inquiry {
    margin-top: 35px; 
    padding-top: 25px; 
    border-top: 1px dashed #e5e7eb;
    color: #6b7280;
}

.business-inquiry p {
    font-size: 0.95rem; 
    margin-bottom: 0;
    line-height: 1.4;
}

.business-inquiry i {
    color: #9ca3af;
    margin-right: 6px;
}

.business-inquiry a {
    color: #00a651;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.business-inquiry a:hover {
    color: #008c44;
    border-bottom-color: #008c44;
}

/* --- Unavailable State Overrides --- */
.card.unavailable {
    border-top: none; 
}
.card.unavailable::before {
    background: linear-gradient(90deg, #dc2626, #ef4444); 
}

.card.unavailable #check-btn { 
    background-color: #dc2626; 
    box-shadow: 0 8px 16px rgba(220, 38, 38, 0.2);
}
.card.unavailable #check-btn:hover {
    background-color: #b91c1c;
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.3);
}

/* --- Footer --- */
.footer-container {
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 30px 20px; 
    text-align: center;
    position: relative;
    z-index: 900; 
}

.footer-container p {
    margin: 8px 0;
    color: #9ca3af;
    font-size: 0.9rem;
}

.footer-container a {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    margin: 0 12px;
    transition: color 0.2s;
}

.footer-container a:hover {
    color: #00a651;
}

/* --- Result Area --- */
.hidden { display: none !important; }

#result-container {
    margin-top: 40px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    padding-top: 30px;
    border-top: 1px dashed #e5e7eb;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

#result-icon-wrapper {
    font-size: 3.5rem; 
    margin-bottom: 15px;
}

#result-status {
    font-size: 2rem; 
    margin-bottom: 10px;
    font-weight: 800;
}

#result-detail {
    font-size: 1.1rem; 
}

#reset-btn {
    margin-top: 25px;
    background: white;
    border: 2px solid #e5e7eb;
    color: #4b5563;
    padding: 12px 30px; 
    font-size: 1rem; 
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

#reset-btn:hover {
    border-color: #d1d5db;
    background-color: #f9fafb;
    color: #1f2937;
    transform: translateY(-2px);
}

/* --- Autocomplete --- */
.pac-container {
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    border: 1px solid #f3f4f6;
    margin-top: 8px;
    font-family: 'Segoe UI', sans-serif;
    overflow: hidden; 
}
.pac-item {
    padding: 12px 20px; 
    font-size: 1rem; 
    cursor: pointer;
    border-top: 1px solid #f9fafb;
}
.pac-item:hover { background-color: #f0fdf4; }
.pac-item-query { font-size: 1rem; color: #111827; font-weight: 600; }

/* --- Mobile Responsiveness --- */
@media (max-width: 900px) {
    .card h1 { font-size: 2.4rem; } 
}

@media (max-width: 768px) {
    .main-wrapper {
        padding: 25px 15px; 
    }

    .card {
        padding: 30px 20px; 
    }

    .card h1 {
        font-size: 2rem; 
        margin-bottom: 15px;
    }
    
    .card p {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .search-container {
        flex-direction: column;
        gap: 12px;
        padding: 12px; 
    }
    
    .input-group {
        width: 100%;
    }

    #address-input {
        font-size: 1rem;
        padding: 14px 20px 14px 45px; 
    }
    
    #check-btn {
        width: 100%;
        padding: 16px; 
        font-size: 1rem;
    }
    
    .pac-container {
        width: 100% !important;
        left: 0 !important;
        position: absolute !important;
    }
}