/* Fortune Writings Custom Styles */

:root {
    --primary-color: #2c5aa0;
    --secondary-color: #28a745;
    --accent-color: #ffc107;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --text-muted: #6c757d;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    padding-top: 76px; /* Account for fixed navbar */
    color: #333;
}

.main-content {
    margin-top: 0px; /* Account for fixed navbar */
    min-height: calc(100vh - 200px); /* Leave space for footer */
}

/* Logo Styles */
.navbar-brand img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

.footer img {
    max-height: 30px;
    width: auto;
    object-fit: contain;
    filter: brightness(0.9);
}

/* Admin Logo */
.navbar-dark .navbar-brand img {
    max-height: 30px;
}

/* Packages Page Styles */
.packages-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3d6f 100%);
    position: relative;
    overflow: hidden;
}

.packages-hero::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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3d6f 100%);
}

.package-card-modern {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.package-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}

.featured-package {
    transform: scale(1.05);
    z-index: 2;
    border: 3px solid var(--accent-color);
}

.featured-package::before {
    content: 'RECOMMENDED';
    position: absolute;
    top: 20px;
    right: -30px;
    background: var(--accent-color);
    color: var(--dark-color);
    padding: 5px 40px;
    font-size: 12px;
    font-weight: bold;
    transform: rotate(45deg);
    z-index: 3;
}

.package-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.package-card-modern .card-header {
    border: none;
    border-radius: 15px 15px 0 0;
}

.package-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.package-highlight {
    background: rgba(0,0,0,0.02);
    border-radius: 10px;
    padding: 15px;
    border-left: 4px solid currentColor;
}

.features-section h6 {
    color: var(--dark-color);
    border-bottom: 2px solid var(--light-color);
    padding-bottom: 8px;
}

.features-section .fas.fa-check-circle {
    font-size: 14px;
}

/* Comparison Table Styles */
.table-responsive {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.table thead th {
    background: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
    padding: 20px 15px;
}

.table tbody tr:nth-child(even) {
    background: rgba(0,0,0,0.02);
}

.table tbody td {
    padding: 15px;
    border-color: rgba(0,0,0,0.05);
}

/* Trust Indicators */
.trust-indicators {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-top: -50px;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Footer Styles */
footer {
    margin-top: auto;
}

footer .text-muted {
    color: #adb5bd !important;
}

footer .text-light:hover {
    color: var(--accent-color) !important;
}

footer a.text-muted:hover {
    color: white !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .featured-package {
        transform: none;
        margin-bottom: 30px;
    }
    
    .packages-hero h1 {
        font-size: 2.5rem;
    }
    
    .package-card-modern {
        margin-bottom: 30px;
    }
    
    body {
        padding-top: 70px;
    }
    
    .main-content {
        min-height: calc(100vh - 150px);
    }
    
    /* Enhanced Mobile Navigation */
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
        font-size: 1.25rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    .navbar-collapse {
        margin-top: 1rem;
        border-top: 1px solid rgba(255,255,255,0.1);
        padding-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Mobile Form Improvements */
    .form-control, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px; /* Better touch target */
    }
    
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .btn-lg {
        min-height: 50px;
        padding: 1rem 2rem;
    }
    
    /* Mobile Table Improvements */
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table-responsive table {
        min-width: 600px;
    }
    
    .table thead th {
        padding: 15px 10px;
        font-size: 0.8rem;
    }
    
    .table tbody td {
        padding: 12px 8px;
        font-size: 0.8rem;
    }
    
    /* Mobile Card Improvements */
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    /* Mobile Modal Improvements */
    .modal-dialog {
        margin: 1rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    /* Mobile Footer Improvements */
    .footer .col-lg-4,
    .footer .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    /* Mobile Social Icons */
    .d-flex.gap-3 {
        gap: 1rem !important;
    }
}

/* Custom Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1e3d6f;
    border-color: #1e3d6f;
}

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

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3d6f 100%);
    color: white;
    padding: 100px 0;
    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 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="1000,100 1000,0 0,100"/></svg>');
    background-size: cover;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Package Cards */
.package-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
}

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

.package-card.featured {
    border: 3px solid var(--secondary-color);
    position: relative;
}

.package-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-color);
    color: white;
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.package-header {
    background: linear-gradient(135deg, var(--primary-color), #1e3d6f);
    color: white;
    padding: 2rem;
    border-radius: 15px 15px 0 0;
    text-align: center;
}

.package-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.package-price {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.package-price small {
    font-size: 1rem;
    opacity: 0.8;
}

.package-body {
    padding: 2rem;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li i {
    color: var(--secondary-color);
    margin-right: 0.5rem;
}

/* Stats Section */
.stats-section {
    background: var(--light-color);
    padding: 80px 0;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Features Section */
.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

/* Testimonials */
.testimonial-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin: 1rem 0;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

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

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 1rem;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.auth-card {
    max-width: 400px;
    margin: 2rem auto;
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.auth-header {
    background: linear-gradient(135deg, var(--primary-color), #1e3d6f);
    color: white;
    padding: 2rem;
    border-radius: 15px 15px 0 0;
    text-align: center;
}

/* Dashboard */
.dashboard-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.dashboard-stat {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
}

.dashboard-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
}

.dashboard-stat-label {
    opacity: 0.9;
    margin-top: 0.5rem;
}

/* Order Status Badges */
.status-pending {
    background-color: #ffc107;
    color: #000;
}

.status-paid {
    background-color: #28a745;
    color: #fff;
}

.status-failed {
    background-color: #dc3545;
    color: #fff;
}

/* Additional Mobile Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    .package-card {
        margin-bottom: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Mobile Typography */
    .display-4 {
        font-size: 2.25rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .display-6 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    /* Mobile Spacing */
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .mt-5 {
        margin-top: 2rem !important;
    }
    
    /* Mobile Feature Icons */
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    /* Mobile Package Icons */
    .package-icon {
        width: 60px;
        height: 60px;
    }
    
    .package-icon i {
        font-size: 2rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .display-5 {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Stack CTA buttons on small screens */
    .d-flex.gap-3 .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
    }
    
    /* Mobile checkout improvements */
    .sticky-top {
        position: relative !important;
        top: auto !important;
    }
    
    .order-lg-2 {
        order: 1;
    }
    
    .order-lg-1 {
        order: 2;
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 10px;
}

/* Table Styles */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.table thead th {
    background: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e3d6f;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Touch Improvements */
@media (hover: none) and (pointer: coarse) {
    /* Touch device specific styles */
    .btn:hover {
        transform: none;
    }
    
    .package-card:hover {
        transform: none;
    }
    
    .package-card-modern:hover {
        transform: none;
    }
    
    /* Better touch targets */
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Touch-friendly social icons */
    .text-light, .text-muted {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Mobile Image Optimization */
@media (max-width: 768px) {
    .navbar-brand img {
        max-height: 35px;
    }
    
    .footer img {
        max-height: 25px;
    }
    
    /* Hero section mobile optimization */
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-image i {
        font-size: 8rem !important;
    }
    
    /* Mobile testimonial improvements */
    .testimonial-card {
        margin: 0.5rem 0;
        padding: 1.5rem;
    }
    
    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 40px 0;
    }
    
    .stats-section {
        padding: 40px 0;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .form-control {
        font-size: 16px; /* Prevents zoom on focus */
    }
    
    .btn {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 0.375rem;
    }
}

/* Android Chrome specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .form-control:focus {
        font-size: 16px;
    }
}
