/* Frontend-specific styles that build on top of sipdc-theme.css */

/* ==========================================================================
   TOPBAR — Clean rectangle bar balanced seamlessly with navbar
   ========================================================================== */
.topbar {
  background-color: var(--sipdc-primary-dark);
  color: #fff;
  border-radius: 0;                    /* Crisp rectangle edges */
  padding: 0.5rem 0;                   /* Clean vertical spacing */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle divider above navbar */
}

/* Align topbar inner contents precisely with navbar container grid */
.topbar .container,
.topbar .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar .nav-link {
  font-family: var(--font-nav);
  font-weight: 500;
  color: var(--sipdc-text);
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--sipdc-primary);
}

.social-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.2s;
}
.social-icon:hover {
  background: var(--sipdc-secondary);
}

.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer-links a:hover { color: var(--sipdc-secondary); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--sipdc-primary-dark), var(--sipdc-primary));
  color: #fff;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.hero h1 { color: #fff; font-size: 2.6rem; }
.hero p.lead { color: rgba(255,255,255,0.85); }

/* Generic content card image */
.card-img-cover {
  height: 200px;
  object-fit: cover;
}

.page-header {
  background: linear-gradient(135deg, var(--sipdc-primary-dark), var(--sipdc-primary));
  color: #fff;
  padding: 3rem 0;
}
.page-header h1 { color: #fff; }

.breadcrumb-light a { color: rgba(255,255,255,0.8); }
.breadcrumb-light .breadcrumb-item.active { color: #fff; }

/* ==========================================================================
   HERO CAROUSEL — fixed height on desktop for a consistent banner, scaled
   down on tablets/phones so it never eats the whole first screen or crops
   the headline text on a short mobile viewport.
   ========================================================================== */
.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 600px;
    display: flex;
    align-items: center;
    color: white;
}

.carousel-fade .carousel-item {
    transition: opacity 1s ease-in-out;
}

@media (max-width: 991.98px) {
    .hero-carousel, .hero-content { height: 480px; }
}
@media (max-width: 575.98px) {
    .hero-carousel, .hero-content { height: 420px; }
    .hero-content h1, .hero-carousel h1 { font-size: 1.65rem; }
}

/* ==========================================================================
   STAT CARDS — single canonical definition
   ========================================================================== */
.stats-section {
    background: var(--sipdc-cream);
    position: relative;
    margin-top: -1px;
}

@media (min-width: 992px) {
    .stats-overlap {
        margin-top: -90px;
        position: relative;
        z-index: 3;
        background: transparent;
    }
    .stats-overlap .stat-card {
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

.stat-card {
    position: relative;
    padding: 30px 20px;
    background: var(--sipdc-white);
    text-align: center;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.35s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.stat-overlay {
    position: absolute;
    inset: 0;
    background: var(--sipdc-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}
.stat-card:hover .stat-overlay { opacity: 0.05; }

.stat-content {
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--sipdc-primary);
    margin-bottom: 5px;
    transition: transform 0.3s ease;
}
.stat-card:hover .stat-number { transform: scale(1.05); }

.stat-label {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: var(--sipdc-text-muted);
}

@media (max-width: 575.98px) {
    .stat-number { font-size: 1.8rem; }
}