/* Referral Program Page CSS */
/* Import Google Fonts - Same as other pages */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&family=Montserrat:wght@300;400;500;600;700;800&display=swap');

/* Reset and Base Styles */
.referral-program-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* FULL WIDTH OVERRIDE - Same as other pages */
.referral-program-page {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
}

/* Force all sections to take full width */
.referral-program-page section {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    position: relative !important;
    box-sizing: border-box !important;
}

/* Container styles - Consistent padding */
.referral-program-page .container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 40px !important;
    width: 100% !important;
    position: relative !important;
    box-sizing: border-box !important;
}

/* Typography - Same fonts as other pages */
.referral-program-page h1,
.referral-program-page h2,
.referral-program-page h3,
.referral-program-page h4 {
    font-family: 'Lora', serif;
}

.referral-program-page p,
.referral-program-page span,
.referral-program-page div {
    font-family: 'Montserrat', sans-serif;
}

/* Hero Section */
.referral-hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    width: 100vw !important;
    max-width: 100vw !important;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.35)), url('https://demo.bharatvillaprojects.com/wp-content/uploads/2025/05/2313.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-text h1 {
    font-family: 'Lora', serif;
    font-size: 5.5rem;
    font-weight: 300;
    color: white;
    line-height: 1.1;
    margin-bottom: 60px;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-subheading {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    max-width: 600px;
}

/* Hero Background - Legacy support */
.hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-bg-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.35));
    z-index: 2;
}

.hero-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Section Headers - Consistent styling */
.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-family: 'Lora', serif;
    font-size: 4rem;
    font-weight: 300;
    color: #333;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.section-title .italic {
    font-style: italic;
    font-weight: 400;
    color: #125849;
}

.section-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    color: #999;
    font-weight: 400;
}

/* How It Works Section */
.how-it-works {
    background: white !important;
    padding: 120px 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.step-card {
    background: white;
    padding: 50px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid #f8f9fa;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.step-card:nth-child(1) { animation-delay: 0.1s; }
.step-card:nth-child(2) { animation-delay: 0.2s; }
.step-card:nth-child(3) { animation-delay: 0.3s; }
.step-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-card::before {
    content: attr(data-step);
    position: absolute;
    top: -15px;
    right: 20px;
    background: #125849;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 8px 15px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.step-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
    border-color: #125849;
}

.step-card h3 {
    font-family: 'Lora', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.step-card p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #666;
}

/* Who Can Refer Section */
.who-can-refer {
    background: #f8f9fa !important;
    padding: 120px 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
}

.content-grid {
    display: grid;
    grid-template-columns: 50% 50%;
    align-items: center;
    gap: 80px;
}

.content-grid.reverse .rewards-content {
    order: 2;
}

.content-grid.reverse .rewards-image {
    order: 1;
}

.refer-content h2,
.rewards-content h2 {
    font-family: 'Lora', serif;
    font-size: 3.2rem;
    font-weight: 300;
    color: #333;
    line-height: 1.2;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

.refer-content h2 .italic,
.rewards-content h2 .italic {
    font-style: italic;
    font-weight: 400;
    color: #125849;
}

.refer-content p,
.rewards-content p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    font-weight: 400;
    margin-bottom: 40px;
}

.referrer-types {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 40px;
}

.type-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    position: relative;
    padding-left: 60px;
}

.type-item::before {
    content: '→';
    position: absolute;
    left: 25px;
    font-size: 1.5rem;
    color: #125849;
    font-weight: bold;
    transition: all 0.3s ease;
}

.type-item:hover {
    transform: translateX(10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.type-item:hover::before {
    transform: translateX(5px);
    color: #1a7a62;
}

.type-content h4 {
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.type-content p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

.refer-image,
.rewards-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    height: 450px;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.refer-image {
    background-image: url('https://demo.bharatvillaprojects.com/wp-content/uploads/2025/06/Image-2.png');
}

.refer-image:hover {
    transform: scale(1.02);
}

.refer-image img,
.rewards-image img {
    display: none;
}

/* Rewards Section */
.rewards-section {
    background: white !important;
    padding: 120px 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
}

.rewards-image {
    background-image: url('https://demo.bharatvillaprojects.com/wp-content/uploads/2025/05/blue-outdoors-clear-nature-sport-scaled.jpg');
}

.rewards-image:hover {
    transform: scale(1.02);
}

.reward-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
}

.reward-item {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.reward-item:hover {
    border-color: #125849;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(18, 88, 73, 0.1);
}

.reward-value {
    font-family: 'Lora', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #125849;
    margin-bottom: 10px;
}

.reward-desc {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.bonus-info {
    margin-top: 50px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #125849;
}

.bonus-info h4 {
    font-family: 'Lora', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #125849;
    margin-bottom: 20px;
}

.bonus-info ul {
    list-style: none;
    padding: 0;
}

.bonus-info li {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #666;
    padding: 8px 0;
    position: relative;
    padding-left: 25px;
}

.bonus-info li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #125849;
    font-weight: bold;
}

/* Referral Form Section */
.referral-form-section {
    background: #f8f9fa !important;
    padding: 120px 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
}

.form-content {
    max-width: 1000px;
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 60px;
}

.form-header h2 {
    font-family: 'Lora', serif;
    font-size: 3.2rem;
    font-weight: 300;
    color: #333;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.form-header h2 .italic {
    font-style: italic;
    font-weight: 400;
    color: #125849;
}

.form-header p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    color: #666;
    line-height: 1.7;
}

.referral-form {
    background: white;
    padding: 60px 50px;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

.form-section {
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e9ecef;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 30px;
}

.form-section h3 {
    font-family: 'Lora', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #125849;
    display: inline-block;
}

.form-row {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    position: relative;
}

.form-row.focused {
    transform: translateY(-2px);
}

.form-row input,
.form-row select,
.form-row textarea {
    flex: 1;
    padding: 8px 20px !important;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #125849;
    box-shadow: 0 0 0 3px rgba(18, 88, 73, 0.1);
    transform: translateY(-2px);
}

.form-row select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 45px;
    appearance: none;
}

.form-row textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
}

/* Form Validation States */
.form-row input.error,
.form-row select.error,
.form-row textarea.error {
    border-color: #e53e3e;
    background-color: rgba(229, 62, 62, 0.05);
    animation: shake 0.3s ease-in-out;
}

.form-row input.success,
.form-row select.success,
.form-row textarea.success {
    border-color: #38a169;
    background-color: rgba(56, 161, 105, 0.05);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Form Agreement */
.form-agreement {
    margin: 40px 0;
    text-align: center;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: #666;
    cursor: pointer;
    gap: 12px;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label:hover .checkmark {
    border-color: #125849;
}

.checkbox-label input:checked ~ .checkmark {
    background: #125849;
    border-color: #125849;
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark::after {
    display: block;
}

.checkbox-label a {
    color: #125849;
    text-decoration: none;
    font-weight: 500;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin-top: 40px;
}

.submit-btn {
    background: linear-gradient(135deg, #125849, #1a7a62);
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 18px 50px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #0d4035, #125849);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(18, 88, 73, 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Terms & Conditions Section */
.terms-conditions {
    background: white !important;
    padding: 120px 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
}

.terms-content h2 {
    font-family: 'Lora', serif;
    font-size: 3.2rem;
    font-weight: 300;
    color: #333;
    line-height: 1.2;
    margin-bottom: 60px;
    letter-spacing: -0.5px;
    text-align: center;
}

.terms-content h2 .italic {
    font-style: italic;
    font-weight: 400;
    color: #125849;
}

.terms-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 40px;
}

.terms-column h3 {
    font-family: 'Lora', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #125849;
    margin-bottom: 20px;
    margin-top: 40px;
}

.terms-column h3:first-child {
    margin-top: 0;
}

.terms-column ul {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.terms-column li {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #666;
    line-height: 1.7;
    padding: 8px 0;
    position: relative;
    padding-left: 25px;
}

.terms-column li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #125849;
    font-weight: bold;
    font-size: 1.2rem;
}

.contact-info {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-top: 20px;
}

.contact-item {
    margin-bottom: 25px;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item strong {
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    color: #125849;
    display: block;
    margin-bottom: 10px;
}

.contact-item p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: #666;
    margin: 5px 0;
}

.contact-item a {
    color: #125849;
    text-decoration: none;
    font-weight: 500;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Success Stories Section - Enhanced Slider Version */
.success-stories {
    background: #f8f9fa !important;
    padding: 120px 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    overflow: hidden;
}

.testimonials-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 60px;
}

.testimonials-slider {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.testimonial-slide {
    min-width: 100%;
    flex-shrink: 0;
    padding: 0 20px;
}

.story-card {
    background: white;
    padding: 60px 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    position: relative;
    transition: all 0.4s ease;
    margin: 20px 0;
}

.story-card:hover {
    box-shadow: 0 25px 70px rgba(0,0,0,0.12);
    transform: translateY(-5px);
}

.quote-icon {
    position: absolute;
    top: 30px;
    left: 40px;
    font-family: 'Lora', serif;
    font-size: 120px;
    color: rgba(18, 88, 73, 0.08);
    line-height: 1;
    pointer-events: none;
    font-weight: 700;
}

.story-content {
    position: relative;
    z-index: 2;
}

.story-content blockquote {
    border: none;
    margin: 0 0 40px 0;
    padding: 0;
}

.story-content blockquote p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15rem;
    line-height: 1.9;
    color: #555;
    font-style: normal;
    position: relative;
    padding: 0;
    margin: 0;
}

.story-author {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 3px solid #125849;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(18, 88, 73, 0.2);
}

.author-info strong {
    font-family: 'Lora', serif;
    font-size: 1.15rem;
    color: #125849;
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.author-info span {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: #999;
}

/* Slider Navigation Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 50px;
    position: relative;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d4d4d4;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    position: relative;
}

.dot:hover {
    background: #a0a0a0;
    transform: scale(1.2);
}

.dot.active {
    background: #125849;
    width: 40px;
    border-radius: 6px;
}

/* Slider Arrows */
.slider-arrow {
    position: absolute;
    top: 100%;
    transform: translateY(-50%);
    background: white;
    border: 2px solid #e0e0e0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 28px;
    color: #125849;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.slider-arrow:hover {
    background: #125849;
    color: white;
    border-color: #125849;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(18, 88, 73, 0.3);
}

.slider-arrow.prev {
    left: 0;
}

.slider-arrow.next {
    right: 0;
}

/* Progress Bar Animation */
.slider-dots::before {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #125849, #1a7a62);
    border-radius: 2px;
    animation: progressBar 5s linear infinite;
}

@keyframes progressBar {
    0% { width: 0%; }
    95% { width: 100%; opacity: 1; }
    100% { width: 100%; opacity: 0; }
}

/* Pause animation on hover */
.testimonials-wrapper:hover .slider-dots::before {
    animation-play-state: paused;
}

/* RESPONSIVE DESIGN - MOBILE FIRST APPROACH */

/* Tablet Styles - 1024px and below */
@media (max-width: 1024px) {
    .referral-program-page .container {
        padding: 0 30px !important;
    }
    
    .hero-text h1 {
        font-size: 4.5rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }
    
    .content-grid.reverse .rewards-content,
    .content-grid.reverse .rewards-image {
        order: initial;
    }
    
    .refer-content h2,
    .rewards-content h2,
    .form-header h2,
    .terms-content h2 {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 3.5rem;
    }
    
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .reward-highlights {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .terms-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .referral-form {
        padding: 50px 40px;
    }
    
    /* Success Stories - Tablet MODIFIED */
    .testimonials-wrapper {
        padding: 0 60px;
        max-width: 900px;
    }
    
    .testimonial-slide {
        padding: 0 15px;
    }
    
    .story-card {
        padding: 50px 40px;
        margin: 15px 0;
    }
    
    .quote-icon {
        font-size: 100px;
        top: 25px;
        left: 30px;
    }
    
    .story-content blockquote p {
        font-size: 1.1rem;
        line-height: 1.8;
    }
    
    .story-author {
        gap: 18px;
        padding-top: 28px;
    }
    
    .author-avatar {
        width: 55px;
        height: 55px;
    }
    
    .author-info strong {
        font-size: 1.1rem;
    }
    
    .author-info span {
        font-size: 0.9rem;
    }
    
    .slider-arrow {
        width: 45px;
        height: 45px;
        font-size: 26px;
    }
    
    .slider-arrow.prev {
        left: 5px;
    }
    
    .slider-arrow.next {
        right: 5px;
    }
    
    .slider-dots {
        margin-top: 45px;
    }
}

/* Mobile Styles - 768px and below */
@media (max-width: 768px) {
    .referral-program-page .container {
        padding: 0 20px !important;
    }
    
    .referral-hero {
        min-height: 500px;
        background-attachment: scroll;
    }
    
    .hero-content {
        padding-top: 60px;
    }
    
    .hero-text h1 {
        font-size: 3rem;
        margin-bottom: 40px;
    }
    
    .hero-subheading {
        font-size: 1.1rem;
    }
    
    .how-it-works,
    .who-can-refer,
    .rewards-section,
    .referral-form-section,
    .terms-conditions,
    .success-stories {
        padding: 80px 0 !important;
    }
    
    .refer-content h2,
    .rewards-content h2,
    .form-header h2,
    .terms-content h2 {
        font-size: 2.2rem;
        margin-bottom: 30px;
    }
    
    .refer-content p,
    .rewards-content p {
        font-size: 1rem;
    }
    
    .refer-image,
    .rewards-image {
        height: 300px;
    }
    
    .section-title {
        font-size: 2.5rem !important;
    }
    
    .section-header {
        margin-bottom: 60px;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .step-card {
        padding: 40px 25px;
    }
    
    .referrer-types {
        gap: 20px;
    }
    
    .type-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 30px 25px;
        padding-top: 50px;
    }
    
    .type-item::before {
        top: 20px;
        left: 50%;
        transform: translateX(-50%) rotate(90deg);
        content: '↓';
    }
    
    .type-item:hover::before {
        transform: translateX(-50%) rotate(90deg) translateY(5px);
    }
    
    .referral-form {
        padding: 40px 30px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .reward-highlights {
        gap: 15px;
    }
    
    .reward-item {
        padding: 25px 15px;
    }
    
    .form-header p {
        padding: 0 4px !important;
    }
    
    .checkbox-label {
        display: inline-flex;
        align-items: flex-start;
        font-family: 'Montserrat', sans-serif;
        font-size: 0.95rem;
        color: #666;
        cursor: pointer;
        gap: 12px;
    }
    
    .checkmark {
        width: 20px;
        height: 20px;
        background: white;
        border: 2px solid #e0e0e0;
        border-radius: 4px;
        position: relative;
        transition: all 0.3s ease;
        margin-top: 2px;
        flex-shrink: 0;
    }
    
    .reward-value {
        font-size: 2rem;
    }
    
    /* Success Stories - Mobile 768px MODIFIED */
    .success-stories {
        padding: 70px 0 !important;
    }
    
    .testimonials-wrapper {
        padding: 0 20px;
        max-width: 100%;
        overflow: visible;
    }
    
    .testimonials-slider {
        display: flex;
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .testimonial-slide {
        padding: 0 8px;
        min-width: 100%;
        flex-shrink: 0;
    }
    
    .story-card {
        padding: 35px 25px;
        margin: 10px 0;
        border-radius: 15px;
        box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    }
    
    .quote-icon {
        font-size: 70px;
        top: 15px;
        left: 15px;
        opacity: 0.07;
    }
    
    .story-content {
        position: relative;
        z-index: 2;
    }
    
    .story-content blockquote {
        margin-bottom: 30px;
    }
    
    .story-content blockquote p {
        font-size: 1rem;
        line-height: 1.7;
        padding-right: 0;
    }
    
    .story-author {
        flex-direction: row;
        gap: 15px;
        padding-top: 25px;
        align-items: center;
    }
    
    .author-avatar {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
        border-width: 2px;
    }
    
    .author-info {
        text-align: left;
        flex: 1;
    }
    
    .author-info strong {
        font-size: 1.05rem;
        margin-bottom: 4px;
    }
    
    .author-info span {
        font-size: 0.85rem;
    }
    
    .slider-arrow {
        width: 38px;
        height: 38px;
        font-size: 24px;
        top: 50%;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    .slider-arrow.prev {
        left: -2px;
    }
    
    .slider-arrow.next {
        right: -2px;
    }
    
    .slider-dots {
        margin-top: 35px;
        gap: 10px;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
    
    .dot.active {
        width: 32px;
    }
}

/* Small Mobile Styles - 480px and below */
@media (max-width: 480px) {
    .referral-program-page .container {
        padding: 0 15px !important;
    }
    
    .hero-text h1 {
        font-size: 2.2rem;
    }
    
    .hero-subheading {
        font-size: 1rem;
    }
    
    .refer-content h2,
    .rewards-content h2,
    .form-header h2,
    .terms-content h2 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 2rem !important;
    }
    
    .step-card {
        padding: 35px 20px;
    }
    
    .type-item {
        padding: 25px 20px;
        padding-top: 45px;
    }
    
    .referral-form {
        padding: 30px 20px;
    }
    
    .submit-btn {
        padding: 16px 30px;
        font-size: 0.9rem;
    }
    
    .reward-value {
        font-size: 1.8rem;
    }
    
    .form-header p {
        padding: 0 4px !important;
    }
    
    /* Success Stories - Small Mobile 480px MODIFIED */
    .success-stories {
        padding: 60px 0 !important;
    }
    
    .testimonials-wrapper {
        padding: 0 12px;
        max-width: 100%;
        overflow: visible;
    }
    
    .testimonials-slider {
        display: flex;
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .testimonial-slide {
        padding: 0 5px;
        min-width: 100%;
        flex-shrink: 0;
        box-sizing: border-box;
    }
    
    .story-card {
        padding: 28px 20px;
        margin: 8px 0;
        border-radius: 12px;
        box-shadow: 0 12px 35px rgba(0,0,0,0.1);
    }
    
    .quote-icon {
        font-size: 55px;
        top: 12px;
        left: 12px;
        opacity: 0.06;
    }
    
    .story-content {
        position: relative;
        z-index: 2;
    }
    
    .story-content blockquote {
        margin-bottom: 25px;
    }
    
    .story-content blockquote p {
        font-size: 0.95rem;
        line-height: 1.65;
        padding-right: 0;
    }
    
    .story-author {
        gap: 12px;
        padding-top: 20px;
        flex-direction: row;
        align-items: center;
    }
    
    .author-avatar {
        width: 42px;
        height: 42px;
        border-width: 2px;
        flex-shrink: 0;
    }
    
    .author-info {
        text-align: left;
        flex: 1;
    }
    
    .author-info strong {
        font-size: 0.95rem;
        margin-bottom: 3px;
        display: block;
    }
    
    .author-info span {
        font-size: 0.8rem;
        display: block;
    }
    
    .slider-arrow {
        width: 34px;
        height: 34px;
        font-size: 22px;
        border-width: 2px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    }
    
    .slider-arrow.prev {
        left: -5px;
    }
    
    .slider-arrow.next {
        right: -5px;
    }
    
    .slider-dots {
        margin-top: 32px;
        gap: 8px;
    }
    
    .dot {
        width: 9px;
        height: 9px;
    }
    
    .dot.active {
        width: 28px;
        border-radius: 5px;
    }
    
    .slider-dots::before {
        bottom: -18px;
    }
}

/* Extra Small Mobile Styles - 360px and below - NEW ADDITION */
@media (max-width: 360px) {
    .referral-program-page .container {
        padding: 0 12px !important;
    }
    
    .section-title {
        font-size: 1.7rem !important;
    }
    
    /* Success Stories - Extra Small Mobile NEW */
    .success-stories {
        padding: 50px 0 !important;
    }
    
    .testimonials-wrapper {
        padding: 0 8px;
    }
    
    .testimonial-slide {
        padding: 0 4px;
    }
    
    .story-card {
        padding: 25px 18px;
        margin: 5px 0;
        border-radius: 10px;
    }
    
    .quote-icon {
        font-size: 50px;
        top: 10px;
        left: 10px;
    }
    
    .story-content blockquote p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .story-author {
        gap: 10px;
        padding-top: 18px;
    }
    
    .author-avatar {
        width: 38px;
        height: 38px;
    }
    
    .author-info strong {
        font-size: 0.9rem;
    }
    
    .author-info span {
        font-size: 0.75rem;
    }
    
    .slider-arrow {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
    
    .slider-arrow.prev {
        left: -8px;
    }
    
    .slider-arrow.next {
        right: -8px;
    }
    
    .slider-dots {
        margin-top: 28px;
        gap: 6px;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
    
    .dot.active {
        width: 24px;
    }
}

/* Print Styles */
@media print {
    .referral-program-page {
        font-size: 12pt;
        line-height: 1.4;
        color: #000 !important;
        background: white !important;
    }
    
    .referral-hero,
    .how-it-works,
    .who-can-refer,
    .rewards-section,
    .referral-form-section,
    .terms-conditions,
    .success-stories {
        background: white !important;
        color: #000 !important;
    }
    
    .hero-bg-image,
    .refer-image,
    .rewards-image {
        display: none;
    }
    
    .submit-btn {
        background: #125849 !important;
        color: white !important;
    }
    
    .referral-form {
        border: 2px solid #125849;
    }
}

/* Performance Optimization */
.step-card,
.story-card,
.type-item,
.reward-item,
.refer-image,
.rewards-image {
    will-change: transform, box-shadow;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .step-card,
    .story-card,
    .type-item,
    .reward-item,
    .submit-btn,
    .form-row input,
    .form-row select,
    .form-row textarea,
    .testimonials-slider,
    .slider-arrow,
    .dot {
        transition: none !important;
        animation: none !important;
    }
}

/* Focus Styles for Keyboard Navigation */
.submit-btn:focus,
.referral-form input:focus,
.referral-form select:focus,
.referral-form textarea:focus,
.checkbox-label:focus-within {
    outline: 3px solid #125849;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .referral-program-page {
        background: white !important;
        color: black !important;
    }
    
    .step-card,
    .story-card,
    .referral-form,
    .contact-info {
        border: 2px solid black;
    }
    
    .submit-btn {
        background: #125849 !important;
        color: white !important;
        border: 2px solid black;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading States */
.referral-program-page img {
    transition: opacity 0.3s ease;
}

.referral-program-page img[loading="lazy"] {
    opacity: 0;
}

.referral-program-page img[loading="lazy"].loaded {
    opacity: 1;
}

/* Additional Utility Classes */
.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;
}

/* Custom Scrollbar */
.referral-form textarea::-webkit-scrollbar {
    width: 6px;
}

.referral-form textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.referral-form textarea::-webkit-scrollbar-thumb {
    background: #125849;
    border-radius: 3px;
}

.referral-form textarea::-webkit-scrollbar-thumb:hover {
    background: #0d4035;
}