/* ============================================
   VARIABLES Y COLORES CORPORATIVOS IDEICE
   ============================================ */
:root {
  --primary-color:#024b62;        /* Azul IDEICE */
  --secondary-color:#d08429;      /* Azul oscuro */
  --accent-color: #00A4E4;         /* Azul claro */
  --success-color: #28A745;        /* Verde éxito */
  --danger-color: #DC3545;         /* Rojo advertencia */
  --warning-color: #FFC107;        /* Amarillo advertencia */
  --light-bg: #F8F9FA;             /* Fondo claro */
  --dark-text: #2C3E50;            /* Texto oscuro */
  --border-color: #E0E0E0;         /* Bordes */
  --white: #FFFFFF;
  
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  
  --border-radius: 12px;
  --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --box-shadow-hover: 0 8px 25px rgba(0, 102, 204, 0.15);

  --dir-images: 'https://ideice.gob.do/images/';
}

/* ============================================
   RESET Y ESTILOS GENERALES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #FAFBFC 0%, #F2F4F7 100%);
  color: var(--dark-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   NAVBAR / HEADER
   ============================================ */
.navbar {
  background: var(--white);
  border-bottom: 3px solid var(--primary-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: var(--spacing-md) 0;
}
.progress{
  position:fixed;
  top:0;
  height:.2rem;
  background:var(--secondary-color);
  animation:progress auto linear;
  animation-timeline:scroll(root block);
}

@keyframes progress{
  0%{
    width:0%;
  }
  100%{
    width:100%;
  }
}
.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex: 1;
}

.logo-link {
  display: flex;
  align-items: center;
  gap:1em;
  text-decoration: none;
  transition: transform 0.3s ease;
  .ideice-logo {
      min-width: 170px;
      height: 76px;
      background: url(https://ideice.gob.do/images/minerd-ideice-logo-v2.svg) no-repeat left top;
      background-size: contain;
  }  
  .ideice-name {
      margin: 0;
      width: 257px;
      height: 76px;
      background: url(https://ideice.gob.do/images/ideice-logo-name-3-lines-v2.svg) no-repeat left center;
      background-size: contain;
  }
}



/* .logo-link:hover {
  transform: scale(1.05);
} */

.ideice-logo {
  width: 50px;
  height: auto;
  display: block;
}

.navbar-subtitle {
  color: var(--primary-color);
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 1;
}

.navbar-links {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

.nav-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.nav-link:hover {
  color: var(--secondary-color);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-lg);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  animation: slideInDown 0.6s ease-out;
}

.hero-content {
  padding: var(--spacing-lg);
}

.icon-large {
  font-size: 4rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
  animation: float 3s ease-in-out infinite;
}

.hero-title {
  font-size: 2.5rem;
  color: var(--dark-text);
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #666;
  max-width: 500px;
  margin: 0 auto;
  opacity: 0.85;
}

.greeting {
  margin-top: 0.75rem;
  font-size: 1rem;
  color: var(--primary-color);
  font-weight: 600;
  opacity: 0.95;
}

/* ============================================
   SHORTENER SECTION
   ============================================ */
.shortener-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

.shortener-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: var(--spacing-xl);
  box-shadow: var(--box-shadow);
  transition: box-shadow 0.3s ease;
  animation: slideInUp 0.6s ease-out;
  border-top: 4px solid var(--secondary-color);
}

.shortener-card:hover {
  box-shadow: var(--box-shadow-hover);
}

.card-header {
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

.card-header h2 {
  font-size: 1.8rem;
  color: var(--dark-text);
  margin-bottom: var(--spacing-sm);
}

.card-description {
  color: #888;
  font-size: 0.95rem;
}

/* ============================================
   INPUT GROUP Y BOTONES
   ============================================ */
.input-group {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.input-wrapper {
  flex: 1;
  min-width: 250px;
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: var(--spacing-md);
  color: var(--primary-color);
  font-size: 1.1rem;
  pointer-events: none;
}

.url-input {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 3rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--white);
  color: var(--dark-text);
}

.url-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.url-input::placeholder {
  color: #AAA;
}

/* Botones */
.btn-primary,
.btn-copy,
.share-btn {
  padding: var(--spacing-md) var(--spacing-lg);
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(2, 75, 98, 0.25);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  /* box-shadow: 0 6px 20px rgba(2, 75, 98, 0.35);
  background: linear-gradient(135deg, var(--primary-color) 0%, #023a4a 100%); */
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ============================================
   RESULTADO
   ============================================ */
.result-section {
  margin-top: var(--spacing-lg);
  animation: slideInUp 0.4s ease-out;
}

.result-section.hidden {
  display: none;
}

.result-card {
  background: linear-gradient(135deg, #FAFBFC 0%, #F0F4F8 100%);
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  overflow: hidden;
}

.result-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  color: var(--primary-color);
}

.result-header h3 {
  font-size: 1.3rem;
  margin: 0;
}

.success-icon {
  font-size: 1.5rem;
  color: var(--success-color);
  animation: pulse 0.6s ease-out;
}

.result-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.result-label {
  margin: 0;
  font-weight: 600;
  color: var(--dark-text);
  font-size: 0.95rem;
}

.result-display {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  flex-wrap: wrap;
}

.short-url-text {
  background: var(--white);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 8px;
  border: 2px solid var(--primary-color);
  word-break: break-all;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  color: var(--primary-color);
  font-weight: 600;
  flex: 1;
  min-width: 200px;
}

.btn-copy {
  background: var(--primary-color);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
  flex-shrink: 0;
}

.btn-copy:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
}

/* Botones de compartir */
.share-buttons {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.share-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  font-size: 1.2rem;
  background: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.share-btn:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* ============================================
   ALERTAS
   ============================================ */
.alert-container {
  margin-top: var(--spacing-md);
}

.alert {
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  animation: slideInDown 0.3s ease-out;
}

.alert-error {
  background: #FFE8E8;
  color: var(--danger-color);
  border: 1px solid #FFB3B3;
  svg{
    fill: var(--danger-color);
  }
}

.alert-success {
  background: #E8F5E9;
  color: var(--success-color);
  border: 1px solid #C8E6C9;
}

.alert i {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ============================================
   INFO CARDS
   ============================================ */
.info-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.info-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  text-align: center;
  box-shadow: var(--box-shadow);
  transition: all 0.3s ease;
  animation: slideInUp 0.6s ease-out;
  border-bottom: 3px solid var(--secondary-color);
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-hover);
}

.info-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.info-icon svg {
  transition: all 0.3s ease;
}

.info-icon svg path {
  fill: var(--primary-color);
  transition: fill 0.3s ease;
}

.info-card:hover .info-icon svg path {
  fill: var(--secondary-color);
}

.info-card:hover .info-icon svg {
  transform: scale(1.2);
}

.info-card h3 {
  font-size: 1.2rem;
  color: var(--dark-text);
  margin-bottom: var(--spacing-sm);
}

.info-card p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--primary-color);
  color: var(--white);
  padding: var(--spacing-xl) var(--spacing-lg);
  text-align: center;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content p {
  margin: var(--spacing-sm) 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

.footer-subtitle {
  font-size: 0.85rem;
  opacity: 0.8;
}

.footer-links {
  margin-top: var(--spacing-md);
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
}

.separator {
  opacity: 0.5;
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .shortener-card {
    padding: var(--spacing-lg);
  }

  .input-group {
    flex-direction: column;
  }

  .input-wrapper {
    min-width: auto;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .result-display {
    flex-direction: column;
  }

  .short-url-text {
    width: 100%;
  }

  .btn-copy {
    width: 100%;
  }

  .info-section {
    grid-template-columns: 1fr;
  }

  .navbar-container {
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
  }

  .navbar-links {
    width: 100%;
    justify-content: center;
  }

  .main-content {
    padding: var(--spacing-lg) var(--spacing-sm);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.5rem;
  }

  .nav-link {
    font-size: 0.85rem;
  }

  .shortener-card {
    padding: var(--spacing-md);
  }

  .card-header h2 {
    font-size: 1.4rem;
  }

  .input-icon {
    left: var(--spacing-sm);
  }

  .url-input {
    padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) 2.5rem;
    font-size: 16px;
  }

  .btn-primary,
  .btn-copy {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.9rem;
  }

  .result-header h3 {
    font-size: 1.1rem;
  }

  .icon-large {
    font-size: 3rem;
  }

  .info-card {
    padding: var(--spacing-md);
  }
}