/* =========================================
   SOCIAL PAGE STYLES (social.css)
========================================= */

/* --- Hero Section --- */
.social-hero {
  margin-top: 80px;
  padding: var(--spacing-xl) var(--spacing-md);
  text-align: center;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 60vw;
  height: 60vw;
  background: var(--glow-secondary);
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

.social-hero h1 {
  font-size: 3rem;
  color: var(--color-accent);
  text-shadow: 0 4px 15px rgba(255, 209, 102, 0.3);
}

.social-hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.social-container {
  padding: var(--spacing-xl) 10%;
  position: relative;
}

/* --- Social Links Grid --- */
.social-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.social-card {
  background: var(--bg-card);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none; /* overrides global a tag if needed */
}

.social-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.social-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-bottom: var(--spacing-md);
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

.social-card h3 {
  font-size: 1.3rem;
  margin-bottom: var(--spacing-xs);
  color: var(--text-main);
}

.social-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Brand Colors on Hover */
.facebook:hover {
  border-color: #1877f2;
}
.facebook:hover .social-icon {
  background: #1877f2;
  color: white;
}

.instagram:hover {
  border-color: #e4405f;
}
.instagram:hover .social-icon {
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
  color: white;
}

.whatsapp:hover {
  border-color: #25d366;
}
.whatsapp:hover .social-icon {
  background: #25d366;
  color: white;
}

.youtube:hover {
  border-color: #ff0000;
}
.youtube:hover .social-icon {
  background: #ff0000;
  color: white;
}

/* --- Clickable Gallery Teaser --- */
.gallery-redirect-section {
  margin-top: var(--spacing-xl);
  text-align: center;
}

.section-title {
  margin-bottom: var(--spacing-lg);
}

.gallery-teaser-card {
  display: block;
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-decoration: none;
  border: 1px solid rgba(255, 209, 102, 0.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);

  /* Create an abstract background to simulate a photo */
  background: linear-gradient(135deg, #1a2235 0%, #0b0f19 100%);
  background-image:
    radial-gradient(
      circle at 20% 30%,
      rgba(230, 57, 70, 0.4) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(255, 159, 28, 0.4) 0%,
      transparent 50%
    );
}

/* Simulated photos floating in background */
.gallery-teaser-card::before,
.gallery-teaser-card::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  transform: rotate(-15deg);
  transition: transform 0.5s ease;
}

.gallery-teaser-card::before {
  width: 200px;
  height: 150px;
  top: 20px;
  left: 10%;
}

.gallery-teaser-card::after {
  width: 180px;
  height: 180px;
  bottom: 30px;
  right: 10%;
  transform: rotate(10deg);
}

.teaser-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(3px);
  transition:
    background 0.3s ease,
    backdrop-filter 0.3s ease;
  z-index: 1;
}

.teaser-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  width: 90%;
  max-width: 600px;
}

.camera-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
  transition: transform 0.3s ease;
}

.teaser-content h3 {
  font-size: 2.5rem;
  color: var(--color-accent);
  margin-bottom: var(--spacing-sm);
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

.teaser-content p {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: var(--spacing-lg);
}

/* Hover Effects for the massive button */
.gallery-teaser-card:hover .teaser-overlay {
  backdrop-filter: blur(0px);
}

.gallery-teaser-card:hover .camera-icon {
  transform: scale(1.2) rotate(5deg);
}

.gallery-teaser-card:hover::before {
  transform: rotate(-5deg) scale(1.1);
}

.gallery-teaser-card:hover::after {
  transform: rotate(0deg) scale(1.1);
}

/* --- STRUCTURE --- */
.social-hubs-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  color: var(--text-main);
  transition: color 0.3s ease;
}

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

.carousel-wrapper {
  margin-bottom: 50px;
  background: var(--bg-card);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

[data-theme="light"] .carousel-wrapper {
  background: var(--bg-card);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.platform-title {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.5rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

/* Platform Colors */
.instagram-title {
  color: #e1306c;
}
.facebook-title {
  color: #1877f2;
}
.youtube-title {
  color: #ff0000;
}

/* --- CAROUSEL TRACK --- */
/* --- THE CAROUSEL TRACK --- */
.carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 0;
  height: inherit;

  align-items: flex-start;

  -ms-overflow-style: none;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar {
  display: none;
}

/* --- THE ADAPTIVE CARDS --- */
.carousel-item {
  flex: 0 0 auto;

  /* Mobile-first width calculation */
  width: 340px;
  max-width: 85vw; /* Prevents the embed from overflowing off the screen on small phones */
  height: auto; /* Lets Instagram & Facebook dictate their own natural heights! */

  display: flex;
  justify-content: center;
  background: var(--bg-card);
  border-radius: 8px;

  /* Note: Removed overflow:hidden and aspect-ratio here so nothing gets clipped */
  transition: background 0.3s ease;
}

[data-theme="light"] .carousel-item {
  background: var(--bg-card);
}

/* Force the embeds to respect the mobile boundaries */
.carousel-item iframe,
.carousel-item blockquote.instagram-media {
  max-width: 100% !important;
  width: 100% !important;
  min-width: unset !important; /* Overrides Instagram's stubborn minimum width on tiny phones */
  margin: 0 !important;
  border: none;
  background: transparent;
}

/* --- KEEP YOUTUBE 16:9 --- */
/* We only apply the 16:9 lock to YouTube specifically */
.carousel-item.embed-yt {
  aspect-ratio: 16 / 9;
}
.carousel-item.embed-yt iframe {
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  .social-container {
    padding: var(--spacing-sm);
  }

  .social-hubs-container {
    padding: 10px;
  }
}
