/* ========================================
 BASE CSS - OfferIndex
 Performance otimizada + Acessibilidade AA
 ======================================== */


*, *::before, *::after{
 box-sizing: border-box;
}

*{
 margin: 0;
 padding: 0;
}


body{
 font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
 line-height: 1.6;
 color: #333;
 background-color: #fff;
 font-size: 16px;
}


h1, h2, h3, h4, h5, h6{
 line-height: 1.2;
 margin-bottom: 1rem;
 font-weight: 600;
}

h1{font-size: 2.5rem;}
h2{font-size: 2rem;}
h3{font-size: 1.5rem;}
h4{font-size: 1.25rem;}


a{
 color: #2563eb;
 text-decoration: none;
 transition: color 0.2s ease;
}

a:hover{
 color: #1d4ed8;
 text-decoration: underline;
}

a:focus{
 outline: 2px solid #2563eb;
 outline-offset: 2px;
}


.btn{
 display: inline-block;
 padding: 12px 24px;
 background-color: #2563eb;
 color: white;
 border: none;
 border-radius: 6px;
 font-size: 1rem;
 font-weight: 500;
 cursor: pointer;
 transition: all 0.2s ease;
 text-decoration: none;
}

.btn:hover{
 background-color: #1d4ed8;
 text-decoration: none;
 color: white;
}

.btn:focus{
 outline: 2px solid #2563eb;
 outline-offset: 2px;
}

.btn-secondary{
 background-color: #6b7280;
}

.btn-secondary:hover{
 background-color: #4b5563;
}


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


.grid{
 display: grid;
 gap: 2rem;
}

.grid-2{grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));}
.grid-3{grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));}


.section{
 padding: 3rem 0;
}

.section-sm{padding: 2rem 0;}
.section-lg{padding: 4rem 0;}


.card{
 background: white;
 border-radius: 8px;
 padding: 2rem;
 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
 border: 1px solid #e5e7eb;
}


ul, ol{
 padding-left: 1.5rem;
 margin-bottom: 1rem;
}

li{
 margin-bottom: 0.5rem;
}


img{
 max-width: 100%;
 height: auto;
 display: block;
}

.img-responsive{
 width: 100%;
 height: auto;
}


table{
 width: 100%;
 border-collapse: collapse;
 margin-bottom: 1rem;
}

th, td{
 padding: 0.75rem;
 text-align: left;
 border-bottom: 1px solid #e5e7eb;
}

th{
 background-color: #f9fafb;
 font-weight: 600;
}


.ad-space{
 background-color: #f9fafb;
 border: 1px dashed #d1d5db;
 padding: 2rem;
 text-align: center;
 margin: 2rem 0;
 border-radius: 4px;
}

.ad-space::before{
 content: "Espaço para Anúncio";
 color: #6b7280;
 font-size: 0.875rem;
 font-weight: 500;
}


.affiliate-disclosure{
 background-color: #fef3c7;
 border: 1px solid #f59e0b;
 border-radius: 6px;
 padding: 1rem;
 margin: 1rem 0;
 font-size: 0.875rem;
}

.affiliate-disclosure::before{
 content: "ℹ️ ";
 font-weight: bold;
}


.cta-section{
 background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
 color: white;
 padding: 3rem 0;
 text-align: center;
 border-radius: 8px;
 margin: 2rem 0;
}

.cta-section h2{
 color: white;
 margin-bottom: 1rem;
}

.cta-section p{
 margin-bottom: 2rem;
 opacity: 0.9;
}


.footer{
 background-color: #1f2937;
 color: white;
 padding: 3rem 0 2rem;
 margin-top: 4rem;
}

.footer a{
 color: #d1d5db;
}

.footer a:hover{
 color: white;
}

.footer-links{
 display: flex;
 gap: 2rem;
 flex-wrap: wrap;
 margin-bottom: 2rem;
 justify-content: center;
}

.footer-copyright{
 opacity: 0.9;
 font-size: 0.9rem;
 font-weight: 500;
}

.footer-copyright small{
 color: #f3f4f6;
 font-size: 0.85rem;
 font-weight: 500;
}


@media (max-width: 768px){
 .container{
 padding: 0 0.75rem;
}
 
 h1{font-size: 2rem;}
 h2{font-size: 1.75rem;}
 
 .section{
 padding: 2rem 0;
}
 
 .grid{
 gap: 1rem;
}
 
 .footer-links{
 flex-direction: column;
 gap: 1rem;
}
}


@media print{
 .ad-space,
 .btn,
 .footer{
 display: none;
}
 
 a{
 text-decoration: underline;
}
 
 a[href^="http"]:after{
 content: " (" attr(href) ")";
}
}


.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-visible{
 outline: 2px solid #2563eb;
 outline-offset: 2px;
}


@media (prefers-contrast: high){
 .btn{
 border: 2px solid currentColor;
}
 
 .card{
 border: 2px solid #000;
}
}


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


.cookie-banner{
 position: fixed;
 bottom: 0;
 left: 0;
 right: 0;
 background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
 color: #1f2937;
 padding: 2rem;
 box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
 z-index: 1000;
 border-top: 4px solid #2563eb;
 border-radius: 16px 16px 0 0;
 backdrop-filter: blur(10px);
 -webkit-backdrop-filter: blur(10px);
}

.cookie-content{
 max-width: 1200px;
 margin: 0 auto;
 display: grid;
 grid-template-columns: 1fr auto;
 gap: 2rem;
 align-items: center;
}

@media (max-width: 768px){
 .cookie-content{
 grid-template-columns: 1fr;
 gap: 1.5rem;
 text-align: center;
}
}

.cookie-text h4{
 margin: 0 0 0.75rem 0;
 font-size: 1.25rem;
 color: #1e3a8a;
 font-weight: 700;
 display: flex;
 align-items: center;
 gap: 0.5rem;
}

.cookie-text h4::before{
 content: "🍪";
 font-size: 1.1em;
}

.cookie-text p{
 margin: 0;
 font-size: 0.95rem;
 line-height: 1.5;
 color: #4b5563;
 max-width: 600px;
}

.cookie-buttons{
 display: flex;
 gap: 0.75rem;
 flex-wrap: wrap;
 justify-content: flex-end;
}

@media (max-width: 768px){
 .cookie-buttons{
 justify-content: center;
 flex-direction: column;
 align-items: center;
}
}

.cookie-btn{
 padding: 0.875rem 1.75rem;
 border: none;
 border-radius: 10px;
 font-weight: 600;
 font-size: 0.9rem;
 cursor: pointer;
 transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
 min-width: 130px;
 position: relative;
 overflow: hidden;
}

.cookie-btn.accept{
 background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
 color: white;
 box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.cookie-btn.accept:hover{
 background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
 transform: translateY(-2px);
 box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.cookie-btn.accept:active{
 transform: translateY(0);
 box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.cookie-btn.settings{
 background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
 color: #4b5563;
 border: 2px solid #e5e7eb;
 box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cookie-btn.settings:hover{
 background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
 color: #374151;
 border-color: #d1d5db;
 transform: translateY(-1px);
 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cookie-btn.reject{
 background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
 color: #dc2626;
 border: 2px solid #fecaca;
 box-shadow: 0 2px 4px rgba(220, 38, 38, 0.1);
}

.cookie-btn.reject:hover{
 background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
 color: #b91c1c;
 border-color: #fca5a5;
 transform: translateY(-1px);
 box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}


.cookie-modal{
 position: fixed;
 top: 0;
 left: 0;
 right: 0;
 bottom: 0;
 background: rgba(0, 0, 0, 0.6);
 backdrop-filter: blur(8px);
 -webkit-backdrop-filter: blur(8px);
 display: flex;
 align-items: center;
 justify-content: center;
 z-index: 1001;
 padding: 2rem;
 animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn{
 from{opacity: 0;}
 to{opacity: 1;}
}

.cookie-modal-content{
 background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
 border-radius: 20px;
 padding: 2.5rem;
 max-width: 600px;
 width: 100%;
 max-height: 80vh;
 overflow-y: auto;
 box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
 border: 1px solid rgba(255, 255, 255, 0.2);
 animation: slideUp 0.3s ease-out;
}

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

.cookie-modal-content h3{
 margin: 0 0 2rem 0;
 color: #1e3a8a;
 font-size: 1.75rem;
 font-weight: 700;
 text-align: center;
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 0.5rem;
}

.cookie-modal-content h3::before{
 content: "⚙️";
 font-size: 1.2em;
}

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

.cookie-option{
 display: flex;
 align-items: flex-start;
 gap: 1rem;
 padding: 1rem;
 border: 1px solid #e5e7eb;
 border-radius: 8px;
 margin-bottom: 1rem;
 cursor: pointer;
 transition: all 0.3s ease;
}

.cookie-option:hover{
 background: #f9fafb;
 border-color: #3b82f6;
}

.cookie-option input[type="checkbox"]{
 margin: 0;
 transform: scale(1.2);
}

.cookie-option-text{
 flex: 1;
}

.cookie-option-text strong{
 display: block;
 color: #1f2937;
 margin-bottom: 0.25rem;
}

.cookie-option-text small{
 color: #6b7280;
 font-size: 0.85rem;
 line-height: 1.4;
}

.cookie-modal-buttons{
 display: flex;
 gap: 1rem;
 flex-wrap: wrap;
}

.cookie-modal-buttons .cookie-btn{
 flex: 1;
 min-width: 140px;
}


@media (max-width: 768px){
 .cookie-content{
 flex-direction: column;
 text-align: center;
 gap: 1.5rem;
}
 
 .cookie-buttons{
 justify-content: center;
}
 
 .cookie-btn{
 min-width: 100px;
 padding: 0.6rem 1.2rem;
}
 
 .cookie-modal{
 padding: 1rem;
}
 
 .cookie-modal-content{
 padding: 1.5rem;
}
 
 .cookie-modal-buttons{
 flex-direction: column;
}
 
 .cookie-modal-buttons .cookie-btn{
 min-width: auto;
}
}
