/**
 * CSS Principal - Sistema de Assinatura de Sites
 * Geturys - Responsivo e Moderno
 */

/* ========== VARIÁVEIS CSS ========== */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --transition: all 0.3s ease;
}

/* ========== RESET E BASE ========== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f8f9fa;
}

/* ========== UTILITÁRIOS ========== */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%);
}

.bg-gradient-dark {
    background: linear-gradient(135deg, var(--dark-color) 0%, #495057 100%);
}

.text-shadow {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.box-shadow {
    box-shadow: var(--box-shadow);
}

.box-shadow-lg {
    box-shadow: var(--box-shadow-lg);
}

.border-radius {
    border-radius: var(--border-radius);
}

.transition {
    transition: var(--transition);
}

/* ========== NAVBAR ========== */
.navbar {
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* ========== HERO SECTION ========== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%);
    color: white;
    padding: 6rem 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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" fill-opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ========== CARDS ========== */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 1.25rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.125);
    padding: 1.25rem;
}

/* ========== PRODUCT CARDS ========== */
.product-card {
    height: 100%;
    position: relative;
    overflow: hidden;
}

.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-price-period {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* ========== CATEGORY CARDS ========== */
.category-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.category-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.category-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ========== PLAN CARDS ========== */
.plan-card {
    position: relative;
    height: 100%;
}

.plan-card.featured {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
    z-index: 10;
}

.plan-card.featured .card-header {
    background: var(--primary-color);
    color: white;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.plan-features {
    list-style: none;
    padding: 0;
}

.plan-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features .bi {
    color: var(--success-color);
    margin-right: 0.5rem;
}

/* ========== FORMS ========== */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-floating > .form-control {
    padding: 1rem 0.75rem;
}

/* ========== BUTTONS ========== */
.btn {
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%);
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%);
    border-color: var(--primary-color);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ========== GALLERY ========== */
.product-gallery {
    position: relative;
}

.gallery-main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.gallery-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.gallery-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
    flex-shrink: 0;
}

.gallery-thumbnail:hover,
.gallery-thumbnail.active {
    opacity: 1;
    border: 2px solid var(--primary-color);
}

/* ========== BADGES ========== */
.badge {
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    font-weight: 600;
}

.status-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-ativo {
    background-color: var(--success-color);
    color: white;
}

.status-inativo {
    background-color: var(--secondary-color);
    color: white;
}

.status-suspensa {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.status-cancelada {
    background-color: var(--danger-color);
    color: white;
}

/* ========== TABLES ========== */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table th {
    background-color: var(--light-color);
    border-bottom: 2px solid #dee2e6;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(0, 0, 0, 0.025);
}

.table-hover > tbody > tr:hover > td {
    background-color: rgba(13, 110, 253, 0.1);
}

/* ========== ALERTS ========== */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
}

.alert-primary {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #856404;
    border-left: 4px solid var(--warning-color);
}

/* ========== LOADING ========== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== ANIMATIONS ========== */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-main-image {
        height: 250px;
    }
    
    .plan-card.featured {
        transform: none;
        margin-bottom: 2rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* ========== DARK MODE SUPPORT ========== */
@media (prefers-color-scheme: dark) {
    :root {
        --bs-body-bg: #212529;
        --bs-body-color: #dee2e6;
    }
    
    .card {
        background-color: #343a40;
        color: #dee2e6;
    }
    
    .table {
        --bs-table-bg: #343a40;
        --bs-table-color: #dee2e6;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .navbar,
    .footer,
    .btn,
    .alert {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0 !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}