
/* CASA661 HOMEPAGE - PROFESSIONAL DESIGN */

/* Reset and Base Styles */
* {
  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;
  line-height: 1.6;
  color: #1d1d1f;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

h1 { font-size: 40px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

p {
  line-height: 1.6;
  margin-bottom: 16px;
  font-weight: 400;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

a:hover {
  color: #c41e3a;
}

/* Hero Section - Enhanced Premium Design */
.hero {
  padding: 60px 0;
  background: linear-gradient(135deg, 
    rgba(248, 249, 250, 0.95) 0%, 
    rgba(255, 255, 255, 0.98) 50%, 
    rgba(252, 253, 255, 0.95) 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: heroFadeIn 1.2s ease-out forwards;
}

@keyframes heroFadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, 
    rgba(196, 30, 58, 0.03) 0%, 
    transparent 50%),
    radial-gradient(circle at 70% 80%, 
    rgba(0, 122, 255, 0.02) 0%, 
    transparent 50%);
  pointer-events: none;
}

.hg {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
  position: relative;
  z-index: 1;
}

/* Breaking News Card - Premium Design */
.br {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  height: 550px;
  box-shadow: 
    0 24px 80px rgba(0, 0, 0, 0.18),
    0 8px 32px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.br::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(196, 30, 58, 0.1) 0%, 
    transparent 30%, 
    transparent 70%, 
    rgba(0, 122, 255, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

.br:hover::before {
  opacity: 1;
}

.br:hover {
  transform: translateY(-12px) scale(1.01);
  box-shadow: 
    0 32px 100px rgba(0, 0, 0, 0.25),
    0 12px 40px rgba(196, 30, 58, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.br img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  filter: brightness(0.95) contrast(1.05) saturate(1.1);
}

.br:hover img {
  opacity: 0.92;
  transform: scale(1.06);
  filter: brightness(1) contrast(1.1) saturate(1.2);
}

.bc {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, 
    rgba(0, 0, 0, 0.7) 30%, 
    rgba(0, 0, 0, 0.9) 100%);
  padding: 48px;
  color: white;
  z-index: 2;
  backdrop-filter: blur(10px);
}

.badge {
  background: linear-gradient(135deg, #c41e3a, #d32f2f);
  color: white;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: inline-block;
  letter-spacing: 0.8px;
  box-shadow: 
    0 6px 16px rgba(196, 30, 58, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
}

.badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.2) 0%, 
    transparent 50%);
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.br:hover .badge::before {
  opacity: 1;
}

.br:hover .badge {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 20px rgba(196, 30, 58, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.br h2 {
  font-size: 32px;
  margin-bottom: 16px;
  color: white;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.br h2 a {
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
  text-decoration: none;
  background: linear-gradient(135deg, #c41e3a, #d32f2f);
  background-size: 0% 3px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.3s ease;
}

.br h2 a:hover {
  background-size: 100% 3px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.hero-excerpt p {
  font-size: 17px;
  line-height: 1.6;
  opacity: 0.95;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 400;
  margin: 20px 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.hero-meta {
  font-size: 15px;
  opacity: 0.9;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-meta span {
  margin-right: 12px;
  transition: color 0.3s ease;
}

.br:hover .hero-meta span {
  color: rgba(255, 255, 255, 1);
}

/* Sidebar Stories */
.sb {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ss {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  height: 150px;
  background: #f8f9fa;
}

.ss:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  border-color: #c41e3a;
}

.ss-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

.ss-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ss:hover .ss-image img {
  transform: scale(1.05);
}

.ss-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: white;
  padding: 24px 20px 20px;
  backdrop-filter: blur(10px);
}

.ss h3 {
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ss h3 a {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.ss h3 a:hover {
  color: #c41e3a;
}

.sidebar-excerpt p {
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  margin: 8px 0;
}

.sidebar-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.sidebar-meta span {
  margin-right: 6px;
}

/* No Image Sidebar Stories */
.ss:not(:has(.ss-image)) {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid #e5e5e5;
}

.ss:not(:has(.ss-image)) .ss-content {
  position: static;
  background: none;
  color: #1d1d1f;
  padding: 24px 20px;
  backdrop-filter: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ss:not(:has(.ss-image)) h3 a {
  color: #1d1d1f;
  text-shadow: none;
}

.ss:not(:has(.ss-image)) .sidebar-excerpt p {
  color: #666;
  text-shadow: none;
}

.ss:not(:has(.ss-image)) .sidebar-meta {
  color: #666;
  text-shadow: none;
}

/* Main Content - Enhanced with Animated Gradient */
.main {
  padding: 60px 0;
  background: linear-gradient(135deg, 
    #ffffff 0%, 
    #fafbfc 25%, 
    #ffffff 50%, 
    #f8f9fa 75%, 
    #ffffff 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  position: relative;
}

.main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 30%, 
    rgba(196, 30, 58, 0.02) 0%, 
    transparent 40%),
    radial-gradient(circle at 80% 70%, 
    rgba(0, 122, 255, 0.015) 0%, 
    transparent 40%);
  pointer-events: none;
  animation: colorShift 20s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes colorShift {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  color: #1d1d1f;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.section-description {
  font-size: 18px;
  color: #666;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
  font-weight: 400;
}

/* Categories Grid */
.categories-grid {
  display: grid;
  gap: 60px;
}

.category-section {
  margin-bottom: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid #e5e5e5;
}

.category-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.category-title {
  font-size: 28px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0;
}

.category-title a {
  color: #1d1d1f;
  transition: color 0.3s ease;
}

.category-title a:hover {
  color: #c41e3a;
}

.view-all-btn {
  background: linear-gradient(135deg, #c41e3a, #d32f2f);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
  text-decoration: none;
}

.view-all-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(196, 30, 58, 0.4);
  color: white;
}

.category-description {
  font-size: 16px;
  color: #666;
  line-height: 1.6;
  margin: 0 0 32px 0;
  font-weight: 400;
}

/* Category Slider */
.category-slider {
  position: relative;
  overflow: hidden;
}

.slider-track {
  display: flex;
  gap: 24px;
  transition: transform 0.3s ease;
}

.slider-item {
  flex: 0 0 calc(33.333% - 16px);
  min-width: 0;
}

/* Article Cards - Enhanced Professional Design */
.category-article {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 250, 0.95));
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.category-article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(196, 30, 58, 0.02) 0%, 
    rgba(0, 122, 255, 0.01) 50%, 
    rgba(196, 30, 58, 0.02) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  border-radius: 20px;
}

.category-article:hover::before {
  opacity: 1;
}

.category-article:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 
    0 24px 64px rgba(0, 0, 0, 0.15),
    0 8px 24px rgba(196, 30, 58, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  background: linear-gradient(145deg, rgba(255, 255, 255, 1), rgba(252, 253, 255, 0.98));
  border-color: rgba(196, 30, 58, 0.2);
}

.category-article img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  filter: brightness(1) contrast(1.05) saturate(1.1);
}

.category-article:hover img {
  transform: scale(1.08);
  filter: brightness(1.05) contrast(1.1) saturate(1.2);
}

.article-content {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.article-category {
  background: linear-gradient(135deg, #c41e3a, #d32f2f);
  color: white;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: inline-block;
  letter-spacing: 0.8px;
  align-self: flex-start;
  box-shadow: 
    0 4px 12px rgba(196, 30, 58, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.category-article:hover .article-category {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 16px rgba(196, 30, 58, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.article-content h5 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 14px;
  color: #1d1d1f;
  flex: 1;
  letter-spacing: -0.02em;
}

.article-content h5 a {
  color: #1d1d1f;
  transition: all 0.3s ease;
  text-decoration: none;
  background: linear-gradient(135deg, #c41e3a, #d32f2f);
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.3s ease;
}

.article-content h5 a:hover {
  color: #c41e3a;
  background-size: 100% 2px;
}

.article-content p {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 400;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #777;
  font-weight: 500;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  position: relative;
}

.article-meta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(196, 30, 58, 0.2) 20%, 
    rgba(196, 30, 58, 0.4) 50%, 
    rgba(196, 30, 58, 0.2) 80%, 
    transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.category-article:hover .article-meta::before {
  opacity: 1;
}

.article-meta span {
  transition: color 0.3s ease;
}

.category-article:hover .article-meta span {
  color: #555;
}

/* Slider Controls */
.slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.slider-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e5e5e5;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 18px;
  color: #666;
  backdrop-filter: blur(10px);
}

.slider-btn:hover {
  background: #c41e3a;
  color: white;
  border-color: #c41e3a;
  transform: scale(1.1);
}

.slider-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.slider-dots {
  display: flex;
  gap: 8px;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e5e5e5;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-dot.active {
  background: #c41e3a;
  transform: scale(1.2);
}

.slider-dot:hover {
  background: #c41e3a;
}

/* Loading States */
.loading-spinner {
  text-align: center;
  padding: 60px 20px;
  font-size: 24px;
  color: #c41e3a;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.no-content {
  text-align: center;
  color: #666;
  font-size: 18px;
  margin: 40px 0;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.category-article {
  animation: fadeInUp 0.6s ease-out forwards;
}

.anim-delay-0 { animation-delay: 0s; }
.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }
.anim-delay-4 { animation-delay: 0.4s; }
.anim-delay-5 { animation-delay: 0.5s; }

/* Responsive Design */
@media (max-width: 1024px) {
  .slider-item {
    flex: 0 0 calc(50% - 12px);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  
  .hg {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .br {
    height: 300px;
  }
  
  .bc {
    padding: 24px;
  }
  
  .br h2 {
    font-size: 24px;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .category-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .view-all-btn {
    align-self: flex-end;
  }
  
  .slider-item {
    flex: 0 0 calc(100% - 0px);
  }
  
  .category-article img {
    height: 180px;
  }
  
  .article-content {
    padding: 20px;
  }
  
  .article-content h5 {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .main {
    padding: 40px 0;
  }
  
  .section-header {
    margin-bottom: 40px;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  .section-description {
    font-size: 16px;
  }
  
  .category-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
  }
  
  .category-title {
    font-size: 24px;
  }
  
  .category-description {
    font-size: 15px;
  }
  
  .br {
    height: 250px;
  }
  
  .bc {
    padding: 20px;
  }
  
  .br h2 {
    font-size: 20px;
  }
  
  .hero-excerpt p {
    font-size: 14px;
  }
  
  .ss {
    height: 120px;
  }
  
  .ss-content {
    padding: 16px;
  }
  
  .ss h3 {
    font-size: 14px;
  }
  
  .sidebar-excerpt p {
    font-size: 12px;
  }
}

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

/* High contrast mode */
@media (prefers-contrast: high) {
  .category-article {
    border: 2px solid #000;
  }
  
  .slider-btn {
    border: 2px solid #000;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background: #1d1d1f;
    color: #f5f5f7;
  }
  
  .category-article {
    background: rgba(28, 28, 30, 0.98);
    border-color: #38383a;
  }
  
  .article-content h5 a {
    color: #f5f5f7;
  }
  
  .article-content p {
    color: #a1a1a6;
  }
  
  .article-meta {
    color: #8e8e93;
    border-color: #38383a;
  }
}
