/* ==========================================
   CTT Portugal — Global Styles (2026)
   Variables, animations, header, footer, forms, responsive
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --ctt-red: #E30613;
  --ctt-red-dark: #B80510;
  --ctt-red-deeper: #9A040D;
  --ctt-red-light: rgba(227,6,19,0.05);
  --ctt-red-glow: rgba(227,6,19,0.12);
  --ctt-dark: #1B1C1E;
  --ctt-gray-bg: #F7F8FA;
  --ctt-border: #E5E7EB;
  --ctt-text: #374151;
  --ctt-light-text: #6B7280;
  --ctt-success: #10B981;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--ctt-gray-bg); color: var(--ctt-text); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* === ANIMATIONS === */
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes pulseGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(227,6,19,0.2); } 50% { box-shadow: 0 0 0 8px rgba(227,6,19,0); } }
.fade-in { animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

/* === HEADER — estilo oficial CTT 2026 === */
.ctt-header { background: #fff; position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--ctt-border); }

/* Page-specific CSS may override background/backdrop but MUST keep these: */
.ctt-header { position: sticky !important; top: 0 !important; z-index: 100 !important; }

.header-top-bar { background: var(--ctt-red); padding: 0 24px; font-size: 14px; border-bottom: none; }
.header-top-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 2px; height: 46px; }
.top-select { color: #fff !important; text-decoration: none; padding: 6px 14px; font-weight: 600; transition: all 0.2s ease; white-space: nowrap; font-size: 15px; letter-spacing: 0.03em; display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; }
.top-select svg { flex-shrink: 0; transition: transform 0.2s ease; }
.top-select:hover { opacity: 0.9; }

.header-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 24px; gap: 24px; background: #fff; }
.logo img { height: 30px; width: auto; transition: opacity 0.2s; }
.logo:hover img { opacity: 0.8; }

.main-nav { display: flex; gap: 2px; align-items: center; flex: 1; justify-content: center; }
.main-nav a { color: var(--ctt-text); text-decoration: none; padding: 8px 16px; font-size: 14px; font-weight: 500; transition: all 0.2s ease; border-radius: var(--radius-sm); white-space: nowrap; }
.main-nav a:hover { color: var(--ctt-red); background: var(--ctt-red-light); }

.header-right { display: flex; gap: 4px; align-items: center; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #374151; transition: all 0.2s ease; }
.icon-btn:hover { background: var(--ctt-gray-bg); color: var(--ctt-red); }
.icon-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* === BREADCRUMB === */
.breadcrumb { max-width: 1120px; margin: 16px auto 0; padding: 0 24px; font-size: 13px; color: var(--ctt-light-text); display: flex; align-items: center; gap: 6px; }
.breadcrumb a { color: var(--ctt-red); text-decoration: none; font-weight: 500; transition: opacity 0.2s; }
.breadcrumb a:hover { text-decoration: underline; opacity: 0.8; }
.breadcrumb-sep { color: #D1D5DB; font-size: 12px; user-select: none; }

/* === MAIN CONTAINER === */
.main-container { max-width: 540px; margin: 36px auto; padding: 0 20px; flex: 1; width: 100%; }
.page-title { font-size: 28px; font-weight: 700; color: var(--ctt-dark); margin-bottom: 10px; line-height: 1.25; letter-spacing: -0.4px; }
.page-subtitle { font-size: 15px; color: var(--ctt-light-text); margin-bottom: 28px; line-height: 1.7; }

/* === FORM CARD — moderno con sombra suave === */
.form-card { background: #fff; border-radius: var(--radius-xl); padding: 32px; box-shadow: var(--shadow-lg); border: 1px solid rgba(0,0,0,0.04); transition: box-shadow 0.3s ease; }
.form-card:hover { box-shadow: 0 16px 48px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.04); }

.form-group { margin-bottom: 20px; position: relative; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--ctt-dark); margin-bottom: 8px; letter-spacing: 0.01em; }

/* Inputs modernos con borde suave y focus ring */
.form-group input, .form-group select { width: 100%; padding: 14px 16px; border: 1.5px solid var(--ctt-border); border-radius: var(--radius-md); font-size: 15px; color: var(--ctt-text); background: #FAFBFC; transition: all 0.2s ease; outline: none; font-family: inherit; }
.form-group input:focus, .form-group select:focus { border-color: var(--ctt-red); box-shadow: 0 0 0 4px var(--ctt-red-glow); background: #fff; }
.form-group input::placeholder { color: #B0B5BD; font-weight: 400; }

/* === CARD ROW === */
.card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* === BUTTON — moderno con gradiente sutil === */
.btn-primary { width: 100%; padding: 15px; background: linear-gradient(135deg, var(--ctt-red) 0%, var(--ctt-red-dark) 100%); color: #fff; border: none; border-radius: var(--radius-md); font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); margin-top: 8px; font-family: inherit; letter-spacing: 0.01em; box-shadow: 0 4px 16px rgba(227,6,19,0.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(227,6,19,0.35); background: linear-gradient(135deg, var(--ctt-red-dark) 0%, var(--ctt-red-deeper) 100%); }
.btn-primary:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(227,6,19,0.2); }

/* === SPINNER === */
.spinner-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.96); z-index: 200; justify-content: center; align-items: center; flex-direction: column; gap: 16px; backdrop-filter: blur(6px); }
.spinner-overlay.active { display: flex; animation: fadeIn 0.3s ease-out; }
.spinner { width: 44px; height: 44px; border: 3px solid #E5E7EB; border-top-color: var(--ctt-red); border-radius: 50%; animation: spin 0.7s linear infinite; }
.spinner-text { font-size: 14px; color: var(--ctt-dark); font-weight: 500; }

/* === FOOTER — moderno oscuro === */
.ctt-footer { background: var(--ctt-dark); padding: 48px 24px 0; margin-top: auto; }
.footer-inner { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-col h4 { font-size: 12px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 13px; color: #9CA3AF; text-decoration: none; padding: 5px 0; transition: all 0.2s ease; line-height: 1.7; }
.footer-col a:hover { color: var(--ctt-red); transform: translateX(2px); }
.social-icons { display: flex; gap: 8px; margin-top: 4px; }
.social-icon { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.07); color: #9CA3AF; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; transition: all 0.2s ease; text-decoration: none; }
.social-icon:hover { background: var(--ctt-red); color: #fff; transform: translateY(-2px); }
.footer-bottom { max-width: 1120px; margin: 0 auto; padding: 20px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-copy { font-size: 12px; color: #6B7280; }
.footer-address { font-size: 12px; color: #4B5563; }



/* === RESPONSIVE === */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .header-top-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .header-top-inner { gap: 0; min-width: max-content; }
}
@media (max-width: 640px) {
  .main-container { margin-top: 24px; padding: 0 16px; }
  .page-title { font-size: 23px; }
  .form-card { padding: 22px; border-radius: var(--radius-lg); }
  .card-row { grid-template-columns: 1fr; gap: 0; }
  .cookie-inner { flex-direction: column; text-align: center; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .header-inner { padding: 0 16px; height: 56px; }
  .breadcrumb { padding: 0 16px; }
}
