:root {
    --primary: #8B4513;
    --secondary: #FF6347;
    --background: #F5F5F5;
    --text: #1A1A1A;
    --success: #32CD32;
    --error: #FF4500;
}

/* Brown background class for alternating sections */
.bg-brown {
    background-color: #8B4513 !important;
    background: #8B4513 !important;
}

.bg-brown,
section.bg-brown {
    background-color: #8B4513 !important;
    background: #8B4513 !important;
}

/* Only apply white text to direct children of brown sections, not nested cards */
.bg-brown > .container h1, 
.bg-brown > .container h2, 
.bg-brown > .container h3, 
.bg-brown > .container h4, 
.bg-brown > .container h5, 
.bg-brown > .container h6 {
    color: white !important;
}

.bg-brown > .container > .text-center h1,
.bg-brown > .container > .text-center h2,
.bg-brown > .container > .text-center h3,
.bg-brown > .container > .text-center h4,
.bg-brown > .container > .text-center h5,
.bg-brown > .container > .text-center h6 {
    color: white !important;
}

.bg-brown > .container p, 
.bg-brown > .container .text-muted,
.bg-brown > .container .fs-5 {
    color: rgba(255, 255, 255, 0.9) !important;
}

.bg-brown > .container > .text-center p,
.bg-brown > .container > .text-center .text-muted,
.bg-brown > .container > .text-center .fs-5 {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Ensure cards and their content maintain normal colors */
.bg-brown .card,
.bg-brown .card-body {
    background-color: white !important;
}

.bg-brown .card h1, 
.bg-brown .card h2, 
.bg-brown .card h3, 
.bg-brown .card h4, 
.bg-brown .card h5, 
.bg-brown .card h6 {
    color: var(--primary) !important;
}

.bg-brown .card p, 
.bg-brown .card .text-muted,
.bg-brown .card small {
    color: #6c757d !important;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Removed fixed-navbar offset styles */

/* Legacy hero spacing (was used with fixed nav + trust banner).
   Keep padding modest now that header is static to avoid large mobile gap. */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, #A0522D 100%);
    padding-top: 24px;
    padding-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero-section::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 100 100"><defs><pattern id="dots" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.business-input-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.input-group-custom {
    position: relative;
    margin-bottom: 1rem;
}        

/* Style the Google Places autocomplete component */
gmpx-place-picker {
    --gmpx-color-surface: white;
    --gmpx-color-on-surface: #1A1A1A;
    --gmpx-color-on-surface-variant: #666;
    --gmpx-color-primary: var(--secondary);
    --gmpx-color-outline-variant: var(--secondary);
    --gmpx-font-family-base: 'Inter', sans-serif;
    --gmpx-font-size-base: 1.1rem;
    --gmpx-border-radius: 12px;
    border-radius: 12px !important;
    transition: all 0.3s ease;
}

gmpx-place-picker:focus-within {
    --gmpx-color-outline-variant: var(--secondary);
}

/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 9999;
}

.popup-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Popup Container */
.popup {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    min-width: 300px;
    min-height: 200px;
    overflow: auto;
    padding: 20px;
    position: relative;
}

.popup-header {
    position: relative;
    padding: 0 40px 20px 0; /* Add right padding to make room for close button */
}

.popup-header h3 {
    margin: 0;
    color: #1A1A1A;
    font-size: 24px;
    font-weight: 600;
}

.btn-magic {
    background: linear-gradient(45deg, var(--secondary), #FF7F50);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 99, 71, 0.3);
}

.btn-magic:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 99, 71, 0.4);
    color: white;
}

.btn-magic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-magic:hover::before {
    left: 100%;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--secondary), #FF7F50);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.template-preview {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background: white;
}

.template-preview:hover {
    transform: scale(1.02);
}

.template-preview img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.stats-section {
    background: var(--background);
    padding: 4rem 0;
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary);
    font-family: 'Playfair Display', serif;
}

.navbar-custom {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 3rem;
}

.loading-spinner {
    display: none;
    width: 24px;
    height: 24px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    width: 60px;
    height: 60px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    width: 40px;
    height: 40px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}        #autocomplete {
    width: 100%; 
    padding: 1rem 1.2rem; 
    font-size: 1.1rem;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

#autocomplete:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 99, 71, 0.1);
}

#autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
}

#autocomplete-results.show {
    display: block;
}

#autocomplete-results li {
    padding: 0.75rem 1.2rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1rem;
    color: var(--text);
    transition: background-color 0.2s ease;
}

#autocomplete-results li:last-child {
    border-bottom: none;
}

#autocomplete-results li:hover {
    background-color: #f8f9fa;
    color: var(--secondary);
}

#autocomplete-results li:active {
    background-color: var(--secondary);
    color: white;
}

/* Special styling for "not listed" option */
#autocomplete-results li.not-listed-option {
    background-color: #f8f9fa;
    color: var(--primary);
    font-weight: 500;
    border-top: 1px solid #e9ecef;
    font-style: italic;
}

#autocomplete-results li.not-listed-option:hover {
    background-color: var(--primary);
    color: white;
}

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

/* Site Exists Modal Styling */
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, var(--background) 0%, #ffffff 100%);
    border-radius: 20px 20px 0 0;
    padding: 1.5rem 2rem;
}

.modal-body {
    padding: 2rem;
}

.modal-title {
    font-size: 1.25rem;
    margin: 0;
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
    transform: translateY(-1px);
}

/* Close button styling */
.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #8B4513;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close:hover,
.close:focus {
    background-color: #8B4513;
    color: white;
    transform: scale(1.1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.close-btn svg {
    width: 20px;
    height: 20px;
}

/* End of close button styling */

/* Popup styling for proper close button positioning */
.popup {
    position: relative;
}

.popup-header {
    position: relative;
    padding: 0 40px 20px 0; /* Add right padding to make room for close button */
}

.popup-header h3 {
    margin: 0;
    color: #1A1A1A;
    font-size: 24px;
    font-weight: 600;
}

/* Search result notification animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
}


/* Legacy mobile offset for fixed header + trust banner (no longer needed). */
@media (max-width: 768px) {
    main {
        margin-top: 0;
    }
}
