/* CSS Variables */
:root {
    --primary-color: #1a1a1a;
    --primary-dark: #0a0a0a;
    --primary-light: #333333;
    --accent-color: #C8102E;
    --accent-dark: #a00d25;
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #666666;
    --background-light: #f8f8f8;
    --background-white: #ffffff;
    --border-color: #e8e8e8;
    --success-color: #1a1a1a;
    --error-color: #C8102E;
    
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--background-white);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Ensure consistent rendering across browsers */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Fix for iOS Safari */
input, textarea, select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
}

input[type="search"] {
    -webkit-appearance: textfield;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

p {
    font-size: 1.125rem;
    color: var(--text-medium);
    line-height: 1.8;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Red accent for main CTAs (like CRM "+ NEW LEAD" button) */
.btn-primary.btn-accent,
.hero-cta .btn-primary:first-child,
.btn-submit {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary.btn-accent:hover,
.hero-cta .btn-primary:first-child:hover,
.btn-submit:hover {
    background-color: var(--accent-dark);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-submit {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo img {
    height: 40px;
    width: auto;
    display: block !important;
    object-fit: contain;
    opacity: 1 !important;
    visibility: visible !important;
    max-width: none;
}

/* Ensure logo stays visible during page load */
.navbar .logo img {
    display: block !important;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-links a:not(.btn-nav-cta):hover {
    color: var(--primary-color);
}

.nav-links a:not(.btn-nav-cta)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:not(.btn-nav-cta):hover::after {
    width: 100%;
}

.btn-nav-cta {
    padding: 10px 24px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 6px;
}

.btn-nav-cta:hover {
    background-color: var(--accent-dark);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 160px 0 100px;
    background: linear-gradient(135deg, var(--background-light) 0%, #e8f4f1 100%);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: 
        radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 60% 80%, rgba(26, 95, 79, 0.05) 0%, transparent 50%);
}

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

.hero-title {
    font-size: 3.75rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.title-line {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.title-line:nth-child(1) {
    animation-delay: 0.2s;
}

.title-line:nth-child(2) {
    animation-delay: 0.4s;
}

.title-line:nth-child(3) {
    animation-delay: 0.6s;
}

.title-accent {
    color: var(--accent-color);
    position: relative;
    display: inline-block;
}

.title-accent::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    height: 12px;
    background-color: rgba(212, 175, 55, 0.2);
    z-index: -1;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 500px;
    animation: fadeInUp 0.8s ease 0.8s forwards;
    opacity: 0;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease 1s forwards;
    opacity: 0;
}

.hero-features {
    display: flex;
    gap: 2rem;
    animation: fadeInUp 0.8s ease 1.2s forwards;
    opacity: 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-medium);
}

.hero-image {
    animation: fadeInRight 1s ease 0.6s forwards;
    opacity: 0;
}

.image-placeholder {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    background: var(--background-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.image-placeholder img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    color: var(--text-light);
    text-align: center;
    width: 100%;
}

/* Services Section */
.services {
    padding: 100px 0;
    background-color: var(--background-white);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-light);
}

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

.service-card {
    position: relative;
    padding: 2.5rem 2rem;
    background-color: var(--background-white);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-color);
    border-radius: 12px;
    transition: var(--transition-smooth);
}

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

.service-card.featured {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, #fff9e6 0%, var(--background-white) 100%);
}

.featured-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background-color: var(--accent-color);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.service-icon {
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-card p {
    margin-bottom: 1.5rem;
}

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

.service-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-medium);
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* How It Works Section */
.how-it-works {
    padding: 100px 0;
    background-color: var(--background-light);
}

.steps-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-top: 3rem;
}

.step {
    flex: 1;
    text-align: center;
}

.step-number {
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    background-color: var(--background-white);
    border-radius: 50%;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.step-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.step-connector {
    width: 60px;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    align-self: center;
    margin-top: 40px;
}

/* Testimonials Section */
.testimonials {
    padding: 100px 0;
    background-color: var(--background-white);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    padding: 2rem;
    background-color: var(--background-light);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.testimonial-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.testimonial-rating {
    color: var(--accent-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--border-color);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.author-info p {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Application Form Section */
.application-form {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.form-wrapper {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--background-white);
    border-radius: 16px;
    padding: 3rem 2rem 2rem 2rem;
    box-shadow: var(--shadow-lg);
}

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

.form-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-light);
    font-size: 1rem;
}

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

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 79, 0.1);
}

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

.checkbox-group {
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: underline;
}

.form-disclaimer {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 1rem;
}

/* Breeze Financial Iframe Container */
.iframe-container {
    width: 100%;
    min-height: 600px;
    background-color: transparent;
    border: none;
    margin: 0;
    padding: 0;
}

.iframe-container iframe {
    width: 100%;
    min-height: 600px;
    border: none;
    display: block;
    background-color: transparent;
}

.form-message {
    display: none;
    text-align: center;
    padding: 2rem;
}

.form-message svg {
    margin: 0 auto 1rem;
}

.form-message h3 {
    margin-bottom: 0.5rem;
}

.form-message.success {
    color: var(--success-color);
}

.form-message.error {
    color: var(--error-color);
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: var(--background-light);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.footer-section p {
    color: #b0b0b0;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: #b0b0b0;
    text-decoration: none;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--background-white);
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

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

.social-links a:hover {
    background-color: var(--accent-color);
    color: var(--text-dark);
}

.contact-info li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.contact-info svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #7a7a7a;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.disclaimer {
    font-size: 0.75rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--background-white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-md);
        gap: 1rem;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-image {
        order: -1; /* Show image first on mobile */
    }
    
    .steps-container {
        flex-direction: column;
    }
    
    .step-connector {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    h2 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-wrapper {
        padding: 2rem 1.5rem;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .logo img {
        height: 32px;
    }
}

/* Large Desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Tablet Landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 32px;
    }
    
    .hero-content {
        gap: 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
