/* Main Styles for Legit Academic Helper Website */

:root {
    --primary-color: #2a3990;
    --secondary-color: #4a5fc1;
    --accent-color: #6a7ff2;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
}

/* Logo */
.logo {
    height: 60px;
    width: auto;
}

/* Navigation */
.navbar {
    padding: 15px 0;
}

.navbar-nav .nav-link {
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(42, 57, 144, 0.8), rgba(42, 57, 144, 0.9)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 10px 25px;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    padding: 10px 25px;
    font-weight: 500;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline-light {
    border-color: white;
    color: white;
    padding: 10px 25px;
    font-weight: 500;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Section Styling */
section {
    padding: 80px 0;
}

section h2 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

section h2:after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: -10px;
    left: 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2:after {
    left: 50%;
    transform: translateX(-50%);
}

/* Trust Cards */
.trust-card {
    padding: 30px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    background-color: white;
    border-left: 4px solid var(--primary-color);
}

.trust-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.trust-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(42, 57, 144, 0.3);
}

.highlight-box h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* Services */
.service-card {
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    background-color: white;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.cta-section .btn-light {
    background-color: white;
    color: var(--primary-color);
    border: none;
    font-weight: 600;
    padding: 12px 30px;
}

.cta-section .btn-light:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.cta-section .btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Testimonials */
.testimonial-section {
    background-color: var(--light-color);
}

.testimonial-card {
    background-color: white;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    height: 100%;
}

.testimonial-card img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 20px;
}

.testimonial-author {
    font-weight: 600;
    margin-bottom: 5px;
}

.testimonial-position {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Contact Form */
.contact-form {
    background-color: white;
    padding: 40px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-info {
    padding: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 5px;
    height: 100%;
}

.contact-info h3 {
    margin-bottom: 25px;
}

.contact-info-item {
    margin-bottom: 20px;
}

.contact-info-item i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.form-control {
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ced4da;
    border-radius: 5px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(42, 57, 144, 0.25);
}

/* Footer */
footer {
    background-color: var(--dark-color);
}

footer h5 {
    margin-bottom: 20px;
    font-weight: 600;
}

footer ul li {
    margin-bottom: 10px;
}

footer a {
    text-decoration: none;
    transition: opacity 0.3s ease;
}

footer a:hover {
    opacity: 0.8;
}

.social-icons a {
    font-size: 1.2rem;
    color: white;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--accent-color);
}

/* Privacy Policy & Terms Pages */
.policy-content {
    background-color: white;
    padding: 40px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
}

.policy-content h2 {
    color: var(--primary-color);
    margin-top: 40px;
    margin-bottom: 20px;
}

.policy-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .contact-info {
        margin-bottom: 30px;
    }
    
    .cta-section .d-flex {
        gap: 15px !important;
    }
    
    .trust-card {
        margin-bottom: 20px;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 1s ease forwards;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animate-fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Success/Error Messages */
.alert-success {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* Loading State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Additional Styling */
.gap-3 {
    gap: 1rem !important;
}
.whatsapp-float {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 9999;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: background 0.3s;
    text-decoration: none;
}
.whatsapp-float:hover {
    background-color: #128c7e;
    color: #fff;
}

/* Contact Popup Styles */
.contact-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-popup.show {
    display: block;
    opacity: 1;
}

.contact-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
}

.contact-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border: 3px solid var(--primary-color);
    border-radius: 12px;
    padding: 25px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-popup.show .contact-popup-content {
    transform: translate(-50%, -50%) scale(1);
}

.contact-popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(42, 57, 144, 0.3);
}

.contact-popup-close:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(42, 57, 144, 0.4);
}

.contact-popup-close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 57, 144, 0.3);
}

.contact-popup-header {
    text-align: center;
    margin-bottom: 25px;
}

.contact-popup-header h3 {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.contact-popup-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.contact-popup-form .form-group {
    margin-bottom: 20px;
}

.contact-popup-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 14px;
}

.contact-popup-form .optional {
    color: #999;
    font-weight: 400;
    font-size: 12px;
}

.contact-popup-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.contact-popup-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(42, 57, 144, 0.1);
    transform: translateY(-1px);
}

.contact-popup-form .form-control:hover {
    border-color: var(--secondary-color);
}

.contact-popup-form textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.contact-popup-submit {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-popup-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(42, 57, 144, 0.3);
}

.contact-popup-submit:active {
    transform: translateY(0);
}

.btn-spinner {
    display: none;
}

.contact-popup-submit.loading .btn-text {
    display: none;
}

.contact-popup-submit.loading .btn-spinner {
    display: inline-block;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
    display: none;
}

.error-message.show {
    display: block;
}

.popup-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.popup-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.popup-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .contact-popup-content {
        max-width: 350px;
        padding: 20px;
    }
    
    .contact-popup-header h3 {
        font-size: 22px;
    }
    
    .contact-popup-header p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .contact-popup-content {
        max-width: 320px;
        padding: 15px;
        margin: 20px;
    }
    
    .contact-popup-close {
        top: -12px;
        right: -12px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .contact-popup-header h3 {
        font-size: 20px;
    }
    
    .contact-popup-form .form-control {
        padding: 10px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .contact-popup-submit {
        padding: 12px 18px;
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .contact-popup-content {
        max-width: 300px;
        padding: 12px;
        margin: 15px;
    }
    
    .contact-popup-header h3 {
        font-size: 18px;
    }
    
    .contact-popup-header p {
        font-size: 12px;
    }
}

/* Landscape Mode Support */
@media (max-height: 500px) and (orientation: landscape) {
    .contact-popup-content {
        max-height: 85vh;
        top: 55%;
    }
    
    .contact-popup-header {
        margin-bottom: 15px;
    }
    
    .contact-popup-header h3 {
        font-size: 18px;
        margin-bottom: 5px;
    }
    
    .contact-popup-form .form-group {
        margin-bottom: 15px;
    }
    
    .contact-popup-form .form-control {
        padding: 8px 12px;
    }
    
    .contact-popup-form textarea.form-control {
        min-height: 60px;
    }
}

/* High DPI Display Optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .contact-popup-content {
        border-width: 2px;
    }
    
    .contact-popup-close {
        border-width: 1px;
    }
}

/* Focus Management for Accessibility */
.contact-popup.show .contact-popup-content {
    animation: popupFocus 0.3s ease-out;
}

@keyframes popupFocus {
    0% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Form Validation Visual Feedback */
.contact-popup-form .form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.contact-popup-form .form-control.success {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Smooth Scrolling for Mobile */
.contact-popup-content {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
}

.contact-popup-content::-webkit-scrollbar {
    width: 6px;
}

.contact-popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.contact-popup-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.contact-popup-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}