/* ========================================
   CSS RESPONSIVO OTIMIZADO - FOTOPRO HUB
   ======================================== */

/* CSS Reset e Variáveis */
:root {
    --primary: #2c3e50;
    --secondary: #34495e;
    --accent: #e67e22;
    --accent-light: #f39c12;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #2ecc71;
    --warning: #f1c40f;
    --danger: #e74c3c;
    --info: #3498db;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    --font-family-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-serif: 'Playfair Display', Georgia, serif;
    
    --border-radius: 0.5rem;
    --border-radius-sm: 0.375rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    --transition: all 0.3s ease;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-sans);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-serif);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* Utility Classes */
.text-accent { color: var(--accent) !important; }
.bg-accent { background-color: var(--accent) !important; }
.border-accent { border-color: var(--accent) !important; }

/* Layout Responsivo */
.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 576px) {
    .container-fluid {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ========================================
   NAVBAR PÚBLICO - RESPONSIVO
   ======================================== */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-brand {
    font-family: var(--font-family-serif);
    font-weight: 700;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--dark);
}

.navbar-brand:hover {
    color: var(--accent);
}

.navbar-brand i {
    color: var(--accent);
    margin-right: 0.5rem;
}

.nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
    transition: var(--transition);
    color: var(--dark);
    text-decoration: none;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

/* Navbar Mobile */
@media (max-width: 991.98px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-nav {
        padding-top: 1rem;
        border-top: 1px solid var(--gray-200);
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        margin: 0;
        text-align: center;
        border-radius: var(--border-radius-sm);
    }
    
    .navbar-nav .nav-link:hover {
        background-color: var(--gray-100);
    }
    
    .navbar-collapse .d-flex {
        justify-content: center;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--gray-200);
    }
    
    .navbar-collapse .btn {
        width: 100%;
        max-width: 200px;
        margin: 0.25rem 0;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-brand i {
        display: none;
    }
}

/* ========================================
   FOOTER RESPONSIVO
   ======================================== */
.footer {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-title {
    font-family: var(--font-family-serif);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--accent);
    color: #fff;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Footer Mobile */
@media (max-width: 767.98px) {
    .footer {
        padding: 2rem 0 1rem;
        text-align: center;
    }
    
    .footer-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .footer-links {
        margin-bottom: 2rem;
    }
    
    .social-links {
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .copyright {
        font-size: 0.875rem;
    }
}

/* ========================================
   HERO SECTION RESPONSIVO
   ======================================== */
.hero {
    padding: 8rem 0 6rem;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.05), rgba(52, 73, 94, 0.05));
    position: relative;
    overflow: hidden;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.hero-text {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
    transition: var(--transition);
}

.hero-image:hover img {
    transform: perspective(1000px) rotateY(-10deg) rotateX(2deg);
}

/* Hero Mobile */
@media (max-width: 991.98px) {
    .hero {
        padding: 6rem 0 4rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-text {
        font-size: 1.125rem;
    }
    
    .hero-image img {
        transform: none;
        margin-top: 2rem;
    }
    
    .hero-image:hover img {
        transform: scale(1.02);
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 4rem 0 3rem;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-text {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
}

/* ========================================
   SEÇÕES RESPONSIVAS
   ======================================== */
.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--dark);
}

.section-subtitle {
    font-size: 1.125rem;
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Section Mobile */
@media (max-width: 768px) {
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
}

/* ========================================
   CARDS RESPONSIVOS
   ======================================== */
.card {
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    background-color: #fff;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.card-text {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: 2rem;
    height: 100%;
    border: none;
    background: linear-gradient(145deg, #fff, #f8f9fa);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #fff;
    font-size: 2rem;
}

/* Cards Mobile */
@media (max-width: 768px) {
    .card-header,
    .card-body {
        padding: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
}

/* ========================================
   BUTTONS RESPONSIVOS
   ======================================== */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: var(--font-family-sans);
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background-color: #d35400;
    border-color: #d35400;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.btn-outline-primary:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Button Mobile */
@media (max-width: 576px) {
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
    
    .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   FORMS RESPONSIVOS
   ======================================== */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid var(--gray-300);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-family: var(--font-family-sans);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(231, 126, 34, 0.25);
    outline: none;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.input-group-text {
    background-color: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
}

/* ========================================
   TABLES RESPONSIVAS
   ======================================== */
.table-responsive {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table {
    margin-bottom: 0;
    background-color: #fff;
}

.table th {
    background-color: var(--gray-100);
    border-top: none;
    font-weight: 600;
    color: var(--dark);
    padding: 1rem 0.75rem;
    white-space: nowrap;
}

.table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-top: 1px solid var(--gray-200);
}

.table-hover tbody tr:hover {
    background-color: rgba(231, 126, 34, 0.05);
}

/* Table Mobile */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
    
    .table th {
        font-size: 0.8rem;
    }
}

/* ========================================
   BADGES RESPONSIVAS
   ======================================== */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   ALERTS RESPONSIVOS
   ======================================== */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.alert i {
    font-size: 1.1rem;
    margin-right: 0.75rem;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    color: #1e7e34;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.1);
    color: #721c24;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background-color: rgba(241, 196, 15, 0.1);
    color: #856404;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.1);
    color: #0c5460;
    border-left: 4px solid var(--info);
}

/* ========================================
   MODALS RESPONSIVOS
   ======================================== */
.modal-content {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
}

.modal-title {
    font-family: var(--font-family-serif);
    font-weight: 600;
    color: var(--dark);
}

/* Modal Mobile */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

/* ========================================
   UTILITIES RESPONSIVAS
   ======================================== */
.text-center-mobile {
    text-align: left;
}

@media (max-width: 768px) {
    .text-center-mobile {
        text-align: center;
    }
    
    .d-flex-mobile-column {
        flex-direction: column;
    }
    
    .gap-mobile {
        gap: 1rem;
    }
}

/* ========================================
   LOADING E ANIMAÇÕES
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .sidebar,
    .mobile-nav,
    .top-bar,
    .btn,
    .alert,
    .modal {
        display: none !important;
    }
    
    .main-wrapper {
        margin-left: 0 !important;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn:focus-visible,
.form-control:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --gray-300: #000;
        --gray-600: #000;
    }
    
    .card {
        border: 2px solid #000;
    }
}

/* ========================================
   SCROLL BEHAVIOR
   ======================================== */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}