/* ================================================
   PORTAL OFFICIAL CSS - Modern Premium Theme
   ================================================ */

:root {
  --portal-primary: #15645b;
  --portal-primary-dark: #0d4d45;
  --portal-secondary: #fbd233;
  --portal-bg-light: #f8fafc;
  --portal-tenant: #15645b;
}

/* Utilities */
.rounded-xl {
  border-radius: 1.5rem !important;
}
.rounded-full {
  border-radius: 9999px !important;
}
.bg-gray-50 {
  background-color: #f9fafb !important;
}
.border-gray-100 {
  border-color: #f3f4f6 !important;
}
.p-6 {
  padding: 1.5rem !important;
}
.mb-8 {
  margin-bottom: 2rem !important;
}
.w-full {
  width: 100% !important;
}
.h-full {
  height: 100% !important;
}
.object-cover {
  object-fit: cover !important;
}
.text-2xl {
  font-size: 1.5rem !important;
  line-height: 2rem !important;
}
.text-gray-900 {
  color: #111827 !important;
}
.text-tenant {
  color: var(--portal-tenant) !important;
}
.font-extrabold {
  font-weight: 800 !important;
}
.tracking-widest {
  letter-spacing: 0.1em !important;
}

/* Section Styling */
.section {
  padding: 80px 0;
}
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--portal-primary);
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
}

.official-card {
  background: white;
  padding: 2rem;
  border-radius: 2rem;
  transition: all 0.4s ease;
}

.official-photo-wrapper {
  background: #f1f5f9;
  position: relative;
  transition: all 0.5s ease;
}

.official-photo {
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.official-card:hover .official-photo {
  transform: scale(1.05);
}

/* Layout Utilities */
.rounded-1 {
  border-radius: 0.2rem !important;
}
.rounded-2 {
  border-radius: 0.5rem !important;
}
.rounded-3 {
  border-radius: 1rem !important;
}
.rounded-4 {
  border-radius: 1.5rem !important;
}
.rounded-5 {
  border-radius: 2rem !important;
}
.rounded-xl {
  border-radius: 1.25rem !important;
}
.flex {
  display: flex !important;
}
.justify-center {
  justify-content: center !important;
}
.mb-10 {
  margin-bottom: 2.5rem !important;
}
.mt-12 {
  margin-top: 3rem !important;
}
.gap-6 {
  gap: 1.5rem !important;
}
.grid {
  display: grid !important;
}
.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 992px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* News Card Styling */
.news-card {
  background: white;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #f1f5f9;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: var(--portal-primary-dark);
}

.news-card-image-wrap {
  position: relative;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
}

.news-card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-card-image {
  transform: scale(1.1);
}

.news-card-badge {
  position: absolute;
  text-transform: uppercase;
  bottom: 1rem;
  right: 0px;
  text-align: right;
  z-index: 10;
  background: var(--portal-primary);
  color: white;
  padding: 0.35rem 1rem;
  border-radius: 12px 0px 0px 12px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  max-width: 250px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.news-card-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  color: #64748b;
  font-size: 0.75rem;
}

.news-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.news-card-title a {
  color: #1e293b;
  text-decoration: none !important;
  transition: color 0.2s;
}

.news-card-title a:hover {
  color: var(--portal-primary);
}

.news-card-footer {
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
  margin-top: auto;
}

.news-card-more {
  color: var(--portal-primary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.news-card-more:hover {
  gap: 0.75rem;
  color: var(--portal-primary-dark);
}

/* Tab Pills Styling */
.nav-pills .nav-link {
  background: white;
  color: #64748b;
  border: 1px solid #e2e8f0;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.nav-pills .nav-link.active {
  background: var(--portal-primary) !important;
  color: white !important;
  border-color: var(--portal-primary) !important;
  box-shadow: 0 10px 15px -3px rgba(21, 100, 91, 0.3) !important;
}

.btn-tenant {
  background: var(--portal-primary);
  color: white;
  font-weight: 700;
  border-radius: 50px;
  transition: all 0.3s;
}

.btn-tenant:hover {
  background: var(--portal-primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(21, 100, 91, 0.2);
}

/* Gallery Item Styling */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 1.25rem;
  grid-auto-flow: dense;
  padding: 1.5rem;
}

.bento-grid.bento-portal {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.04);
  margin-bottom: 2rem;
}

.bento-item-large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-item-wide {
  grid-column: span 2;
  grid-row: span 1;
}

.bento-item-tall {
  grid-column: span 1;
  grid-row: span 2;
}

/* Gallery Item Styling */
.gallery-item {
  position: relative;
  height: 100%;
  border-radius: 1.5rem;
  overflow: hidden;
  background: #ffffff;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.gallery-item > a {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
  z-index: 10;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(21, 100, 91, 0.7), transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  backdrop-filter: blur(4px);
  transition: all 0.4s ease;
  z-index: 2;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.caption-tag {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: var(--portal-primary);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 14px;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 3;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover .caption-tag {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Grid */
@media (max-width: 1200px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 180px;
  }
}

@media (max-width: 992px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
    padding: 1rem;
  }
  .bento-grid.bento-portal {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 280px;
    gap: 1.25rem;
    padding: 1rem;
  }

  .bento-item-large,
  .bento-item-wide,
  .bento-item-tall {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
}

/* Mobile Fixes */
@media (max-width: 768px) {
  .hero-banner {
    padding: 60px 0 100px 0 !important;
  }

  .hero-banner h1.display-3 {
    font-size: 2.5rem !important;
    margin-top: 20px;
  }

  .hero-banner p.lead {
    font-size: 1.1rem !important;
    padding: 0 20px;
  }

  .main-menu-bar {
    margin-top: -60px !important;
    border-radius: 25px !important;
    padding: 20px 10px !important;
  }

  .menu-item img {
    height: 45px !important;
    margin-bottom: 10px !important;
  }

  .menu-item span.small {
    font-size: 0.65rem !important;
    line-height: 1.2;
    display: block;
  }

  .section-title {
    font-size: 1.8rem !important;
    text-align: center;
  }

  .hero-banner form {
    flex-direction: column;
    gap: 10px;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .hero-banner form input {
    border-radius: 15px !important;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  }

  .hero-banner form button {
    width: 100%;
    margin-left: 0 !important;
    border-radius: 15px !important;
    height: 50px;
  }
  
  .official-card {
    padding: 1.5rem !important;
  }
  
  .official-photo-wrapper {
    margin-bottom: 1.5rem !important;
  }

  h2.display-3 {
    font-size: 2.2rem !important;
    text-align: center;
  }

  .pr-lg-5 {
    padding-right: 0 !important;
    text-align: center;
  }

  .mr-5 {
    margin-right: 0 !important;
    margin-bottom: 20px;
  }

  .border-left.pl-5 {
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 1px solid #eee;
    padding-top: 20px;
    width: 100%;
  }

  .d-flex.align-items-center.mt-5 {
    flex-direction: column;
    text-align: center;
  }

  .display-3 {
    font-size: 1rem !important;
  }

  .display-4 {
    font-size: 2rem !important;
  }

  #newsTabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start !important;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
  }

  #newsTabs .nav-item {
    flex: 0 0 auto;
  }

  .news-card-title {
    font-size: 1rem !important;
  }

  .card {
    min-height: auto !important;
  }

  .card-header.d-flex.justify-content-between {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .card-header .d-flex.align-items-center {
    justify-content: center;
  }

  .modern-nav {
    padding: 15px 0 !important;
  }

  .modern-nav .navbar-brand img {
    height: 40px !important;
  }

  .modern-nav .navbar-toggler {
    font-size: 1.5rem;
    padding: 0;
  }

  .modern-nav .navbar-collapse {
    background: white;
    margin-top: 15px;
    border-top: 1px solid #f1f5f9;
    padding-bottom: 20px;
    position: relative;
    z-index: 1001;
    max-height: 80vh;
    overflow-y: auto;
  }

  .modern-nav .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .modern-nav .nav-link {
    padding: 15px 0 !important;
    border-bottom: 1px solid #f1f5f9;
    margin: 0 !important;
    font-size: 0.9rem !important;
    color: #334155 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer !important;
  }

  .modern-nav .nav-link::after {
    display: none !important;
  }

  .nav-item.dropdown-static .nav-link::before,
  .nav-item.dropdown .nav-link::before {
    content: "\f107";
    font-family: FontAwesome;
    order: 2;
    font-size: 0.8rem;
    opacity: 0.5;
  }

  .mega-dropdown {
    position: static !important;
    display: none;
    opacity: 1 !important;
    transform: none !important;
    padding: 20px !important;
    box-shadow: none !important;
    background: #f8fafc !important;
    border-radius: 10px;
    margin-bottom: 10px;
  }

  .nav-item.show > .mega-dropdown,
  .nav-item.show > .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  .dropdown-menu {
    position: static !important;
    display: none;
    float: none !important;
    width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    background: #f8fafc !important;
    padding: 10px 20px !important;
  }

  .dropdown-item {
    padding: 12px 0 !important;
    white-space: normal !important;
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }

  .dropdown-item:last-child {
    border-bottom: none;
  }

  .nav-item.dropdown-static:hover .mega-dropdown,
  .nav-item.dropdown:hover > .dropdown-menu {
    display: none !important;
  }

  /* Fix Pills on Mobile */
  .nav-pills.rounded-pill {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    border-radius: 15px !important;
    padding: 10px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .nav-pills.rounded-pill::-webkit-scrollbar {
    display: none;
  }

  .nav-pills.rounded-pill .nav-item {
    flex: 0 0 auto;
  }

  .border-right-md {
    border-right: none !important;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
    width: 100%;
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
  
  .col-6.col-md-3 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .modern-footer {
    text-align: center;
    padding: 3rem 0;
  }
  
  .modern-footer .text-right {
    text-align: center !important;
  }
  
  .modern-footer .align-items-start {
    align-items: center !important;
    justify-content: center;
  }
}
