/* Referral Page Styles - YA Express Logistics */
/* Modern, professional styling matching website brand colors and design patterns */

.referral-page-container {
    font-family: 'Inter', 'Sarabun', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Breadcrumb Section */
.breadcrumb-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 20px 0;
    position: relative;
    overflow: hidden;
}

.breadcrumb-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="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.breadcrumb-nav {
    position: relative;
    z-index: 2;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb-item {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #ff6b35;
}

.breadcrumb-item.active {
    color: #fff;
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '›';
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
}

/* Hero Section */
.referral-hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.referral-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"><circle cx="10" cy="10" r="1" fill="rgba(30,60,114,0.1)"/><circle cx="30" cy="30" r="1" fill="rgba(255,107,53,0.1)"/><circle cx="50" cy="10" r="1" fill="rgba(30,60,114,0.1)"/><circle cx="70" cy="30" r="1" fill="rgba(255,107,53,0.1)"/><circle cx="90" cy="10" r="1" fill="rgba(30,60,114,0.1)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-title .highlight {
    color: #ff6b35;
    position: relative;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #ff8c42);
    border-radius: 2px;
}

.hero-description {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.hero-image {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.referral-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.referral-visual > div {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: bounce 3s ease-in-out infinite;
}

.money-icon {
    animation-delay: 0s;
    background: linear-gradient(135deg, #ff6b35, #ff8c42) !important;
}

.sharing-icon {
    animation-delay: 1s;
    background: linear-gradient(135deg, #1e3c72, #2a5298) !important;
}

.reward-icon {
    animation-delay: 2s;
    background: linear-gradient(135deg, #28a745, #20c997) !important;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Section Headers */
.section-header {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* How It Works Section */
.how-it-works-section {
    padding: 80px 0;
    background: #fff;
}

.step-card {
    text-align: center;
    padding: 40px 30px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.step-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #ff6b35;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.step-icon {
    font-size: 3rem;
    margin: 20px 0;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 15px;
}

.step-description {
    color: #666;
    line-height: 1.6;
}

/* Benefits Section */
.benefits-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.benefits-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"><polygon points="50,10 90,90 10,90" fill="rgba(30,60,114,0.05)" opacity="0.5"/></svg>');
}

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

.benefits-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 40px;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.benefit-item:hover {
    transform: translateX(10px);
}

.benefit-icon {
    font-size: 1.5rem;
    color: #28a745;
    flex-shrink: 0;
}

.benefit-text h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 8px;
}

.benefit-text p {
    color: #666;
    margin: 0;
}

.benefits-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.reward-showcase {
    display: flex;
    gap: 30px;
    flex-direction: column;
    align-items: center;
}

.reward-card, .discount-card {
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.reward-card {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
}

.discount-card {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
}

.reward-card:hover, .discount-card:hover {
    transform: scale(1.05);
}

.reward-amount, .discount-amount {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.reward-label, .discount-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Form Section */
.referral-form-section {
    padding: 80px 0;
    background: #fff;
}

.form-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 50px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-header {
    margin-bottom: 40px;
}

.form-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 15px;
}

.form-subtitle {
    font-size: 1.1rem;
    color: #666;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    color: #333;
}

/* Specific styling for select elements */
.form-control select,
select.form-control {
    color: #333 !important;
    background-color: #fff !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 45px;
}

/* Option styling */
.form-control option {
    color: #333 !important;
    background-color: #fff !important;
    padding: 10px;
}

/* Placeholder option styling */
.form-control option[value=""] {
    color: #999 !important;
}

.form-control:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-control:invalid {
    border-color: #dc3545;
}

.form-error {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-check-input {
    margin-top: 3px;
    flex-shrink: 0;
}

.form-check-label {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

.form-check-label a {
    color: #ff6b35;
    text-decoration: none;
}

.form-check-label a:hover {
    text-decoration: underline;
}

.form-help {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
    display: block;
}

.form-submit {
    text-align: center;
    margin-top: 40px;
}

.btn-submit {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-submit::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-submit:hover::before {
    left: 100%;
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    margin-top: 30px;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.success-message h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.referral-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.referral-code {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.3);
}

.success-note {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

/* FAQ Section */
.faq-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-item {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
}

.faq-question {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: between;
    align-items: center;
    background: #fff;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-question h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e3c72;
    margin: 0;
    flex: 1;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff6b35;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 30px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 30px 25px;
    max-height: 200px;
}

.faq-answer p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .benefits-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .reward-showcase {
        flex-direction: row;
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .referral-hero-section,
    .how-it-works-section,
    .benefits-section,
    .referral-form-section,
    .faq-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
        text-align: center;
    }
    
    .hero-description {
        text-align: center;
        margin: 0 auto 40px;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .stat-item {
        flex: 1;
        min-width: 120px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .form-container {
        padding: 30px 20px;
    }
    
    .form-title {
        font-size: 1.8rem;
    }
    
    .reward-showcase {
        flex-direction: column;
        gap: 20px;
    }
    
    .referral-visual {
        gap: 20px;
    }
    
    .referral-visual > div {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-item {
        width: 100%;
        max-width: 200px;
    }
    
    .step-card {
        padding: 30px 20px;
    }
    
    .benefit-item {
        padding: 20px;
    }
    
    .form-container {
        padding: 25px 15px;
    }
    
    .referral-code-display {
        flex-direction: column;
        gap: 10px;
    }
    
    .referral-code {
        font-size: 1.2rem;
    }
}

/* Print Styles */
@media print {
    .referral-page-container {
        background: white !important;
        color: black !important;
    }
    
    .referral-hero-section,
    .benefits-section,
    .faq-section {
        background: white !important;
    }
    
    .btn-submit,
    .btn-copy {
        display: none;
    }
    
    .form-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Existing Partner Login Section */
.existing-partner-section {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.existing-partner-text {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #495057;
    font-weight: 500;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: 2px solid #ff6600;
    color: #ff6600;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.1);
}

.btn-login:hover {
    background: #ff6600;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.2);
    text-decoration: none;
}

.btn-login:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.25);
}

.btn-login i {
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .existing-partner-section {
        margin: 20px 0;
        padding: 15px;
    }
    
    .btn-login {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 3px;
    }
    
    .btn-submit {
        border: 3px solid #000;
    }
    
    .step-card,
    .benefit-item,
    .faq-item {
        border: 2px solid #000;
    }
}
