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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Header Styles */
.header {
    background: linear-gradient(90deg, #144E98 0%, #144E98 100%);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo i {
    color: #fff;
    margin-right: 0.5rem;
    font-size: 2rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #fff;
    font-size: 1.25rem;
    border-radius: 8px;
}

.nav-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.header-actions .btn {
    background: #dc143c;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.header-actions .btn:hover {
    background: #b91c3c;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
    color: #fff;
    padding: 8rem 0 4rem;
    text-align: center;
    margin-top: 70px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #dc143c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #ccc;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #dc143c;
    color: #fff;
}

.btn-primary:hover {
    background: #b91c3c;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-secondary:hover {
    background: #fff;
    color: #000;
}

/* Demo Categories Section */
.demo-categories {
    padding: 4rem 0;
    background: #fff;
}

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

.section-header h2 {
    font-size: 2.5rem;
    color: #000;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
}

.category-section {
    margin-bottom: 4rem;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.8rem;
    color: #000;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #dc143c;
}

.category-title i {
    color: #dc143c;
    font-size: 2rem;
}

/* Demo Grid */
.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.demo-widget {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.demo-widget:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(220, 20, 60, 0.2);
}

.demo-preview {
    position: relative;
    overflow: hidden;
}

.demo-preview img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.demo-widget:hover .demo-preview img {
    transform: scale(1.05);
}

.demo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.demo-widget:hover .demo-overlay {
    opacity: 1;
}

.demo-price {
    color: #dc143c;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.demo-info {
    padding: 1.5rem;
}

.demo-info h4 {
    font-size: 1.3rem;
    color: #000;
    margin-bottom: 0.5rem;
}

.demo-info p {
    color: #666;
    margin-bottom: 1rem;
}

.demo-features {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.demo-features span {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.demo-features i {
    color: #dc143c;
}

/* Footer */
.footer {
    background: linear-gradient(90deg, #144E98 0%, #144E98 100%);
    color: #fff;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #fff;
    margin-bottom: 1rem;
}

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

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

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #fff;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 1.5rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: #dc143c;
}

.template-info {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.template-info h3 {
    color: #000;
    margin-bottom: 0.5rem;
}

.price {
    font-size: 2rem;
    font-weight: 700;
    color: #dc143c;
    margin-top: 1rem;
}

.payment-options {
    margin-bottom: 2rem;
}

.payment-options h3 {
    margin-bottom: 1rem;
    color: #000;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.payment-method:hover {
    border-color: #dc143c;
}

.payment-method input[type="radio"] {
    margin: 0;
}

.payment-method label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.payment-method i {
    color: #dc143c;
    font-size: 1.2rem;
}

.payment-details {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

/* Ensure the complete purchase button is always visible */
.modal-content .btn-primary {
    margin-top: 1rem;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.payment-details h4 {
    color: #000;
    margin-bottom: 1rem;
}

.payment-details p {
    margin-bottom: 0.5rem;
    color: #666;
}

/* Custom scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #dc143c;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #b91c3c;
}

/* Loading spinner for payment processing */
.payment-loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #dc143c;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.payment-loading p {
    color: #666;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .demo-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .header .container {
        flex-wrap: wrap;
        position: relative;
    }

    .logo {
        order: 1;
    }

    .nav-toggle {
        display: flex;
        order: 2;
        margin-left: auto;
    }

    .header-actions {
        order: 3;
        display: flex;
    }

    .nav {
        order: 4;
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 0 1rem;
        margin-top: 0.5rem;
        background: #fff;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
    }

    .header.nav-open .nav {
        display: flex;
    }

    .nav .nav-link {
        padding: 0.9rem 1.25rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        color: #1e293b !important;
    }

    .nav .nav-link:last-child {
        border-bottom: none;
    }

    .nav .nav-link:hover,
    .nav .nav-link.active {
        color: #144E98 !important;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .modal-content {
        margin: 5% auto;
        padding: 1rem;
        max-height: 90vh;
        width: 95%;
    }
}
