/**
 * The City Paper - Main Stylesheet
 */

/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--tcp-font-secondary);
  font-size: var(--tcp-text-base);
  line-height: 1.6;
  color: var(--tcp-gray-800);
  background-color: var(--tcp-white);
  max-width: 100vw;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--tcp-font-display);
  line-height: 1.2;
  margin-bottom: var(--tcp-space-4);
}

h1 {
  font-size: var(--tcp-text-5xl);
}
h2 {
  font-size: var(--tcp-text-4xl);
}
h3 {
  font-size: var(--tcp-text-3xl);
}
h4 {
  font-size: var(--tcp-text-2xl);
}
h5 {
  font-size: var(--tcp-text-xl);
}
h6 {
  font-size: var(--tcp-text-lg);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--tcp-space-4);
}

/* ===================================
   HEADER STYLES
   =================================== */

.site-header {
  background: var(--tcp-white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Header Main */
.header-main {
  padding: var(--tcp-space-6) 0 var(--tcp-space-4) 0;
  background: var(--tcp-white);
  border-bottom: 1px solid var(--tcp-gray-200);
}

/* Header Top Section - Search, Logo, Social */
.header-top-section {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--tcp-space-4);
  margin-bottom: var(--tcp-space-4);
}

/* Search Wrapper (Left) */
.header-search-wrapper {
  display: flex;
  align-items: center;
  gap: var(--tcp-space-4);
  justify-self: start;
}

.header-search {
  background: none;
  border: 2px solid var(--tcp-gray-600);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: var(--tcp-text-lg);
  color: var(--tcp-dark);
}

.header-search:hover {
  background: var(--tcp-dark);
  color: var(--tcp-white);
}

/* Site Branding (Center) */
.site-branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  text-align: center;
}

.site-title {
  margin: 0;
  line-height: 1;
}

.site-title a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--tcp-dark);
  gap: var(--tcp-space-3);
}

.site-logo {
  width: 400px;
  height: auto;
  display: block;
}

.site-name {
  font-family: var(--tcp-font-secondary);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--tcp-dark);
  line-height: 1;
  letter-spacing: -0.5px;
}

.header-date {
  font-family: var(--tcp-font-primary);
  font-size: var(--tcp-text-base);
  color: var(--tcp-gray-600);
  margin-top: var(--tcp-space-2);
  font-style: italic;
}

/* Social Icons (Right) */
.header-social-icons {
  display: flex;
  gap: var(--tcp-space-2);
  align-items: center;
  justify-self: end;
}

.social-icon {
  width: 35px;
  height: 35px;
  border: 2px solid var(--tcp-gray-600);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tcp-dark);
  text-decoration: none;
  font-size: var(--tcp-text-lg);
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--tcp-dark);
  color: var(--tcp-white);
}

/* Navigation */
.main-navigation {
  display: flex;
  justify-content: center;
  padding-top: var(--tcp-space-4);
  border-top: 1px solid var(--tcp-gray-200);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--tcp-space-8);
  margin: 0;
  padding: 0;
  justify-content: center;
}

.nav-menu li {
  margin: 0;
}

.nav-menu a {
  color: var(--tcp-gray-800);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--tcp-text-base);
  transition: color 0.3s ease;
  position: relative;
  padding-bottom: 2px;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
  color: var(--tcp-primary);
}

/* Menu Toggle - Mobile */
.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--tcp-dark);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: var(--tcp-text-xl);
  color: var(--tcp-dark);
  cursor: pointer;
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
}

.menu-toggle:hover {
  background: var(--tcp-dark);
  color: var(--tcp-white);
}

/* ===================================
   FOOTER STYLES
   =================================== */

.site-footer {
  background: var(--tcp-gray-100);
  margin-top: var(--tcp-space-16);
  font-size: var(--tcp-text-sm);
}

/* Footer Content */
.footer-content {
  padding: var(--tcp-space-12) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--tcp-space-12);
  align-items: start;
}

/* Column 1: About */
.footer-about {
  padding-right: var(--tcp-space-8);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--tcp-space-3);
}

.footer-logo-img {
  width: 230px;
  height: auto;
  margin-bottom: var(--tcp-space-2);
}

.footer-site-name {
  font-family: var(--tcp-font-secondary);
  font-size: var(--tcp-text-2xl);
  font-weight: 700;
  color: var(--tcp-dark);
  text-decoration: none;
  line-height: 1;
}

.footer-description {
  font-family: var(--tcp-font-primary);
  color: var(--tcp-gray-600);
  line-height: 1.7;
  margin-bottom: var(--tcp-space-6);
  font-style: italic;
  font-size: var(--tcp-text-sm);
}

.footer-social {
  display: flex;
  gap: var(--tcp-space-3);
}

.footer-social-icon {
  width: 35px;
  height: 35px;
  border: 2px solid var(--tcp-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tcp-dark);
  text-decoration: none;
  font-size: var(--tcp-text-lg);
  transition: all 0.3s ease;
}

.footer-social-icon:hover {
  background: var(--tcp-dark);
  color: var(--tcp-white);
}

/* Column 2: Contact */
.footer-contact {
  padding: 0 var(--tcp-space-4);
}

.footer-title {
  color: var(--tcp-dark);
  font-family: var(--tcp-font-secondary);
  font-size: var(--tcp-text-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  padding-bottom: var(--tcp-space-3);
  padding-left: 4px;
  position: relative;
}

.footer-title {
  font-family: var(--tcp-font-secondary);
  font-size: var(--tcp-text-lg);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--tcp-space-6);
  position: relative;
}

.footer-title::before {
  background-color: var(--tcp-primary);
  content: "";
  height: 70%;
  left: 0;
  position: absolute;
  top: 0;
  width: 3px;
}
.footer-title span {
  display: inline-block;
  color: var(--tcp-dark);
  padding-left: var(--tcp-space-2);
  padding-right: var(--tcp-space-2);
  text-decoration: none;
}

.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--tcp-space-2);
  margin-bottom: var(--tcp-space-4);
}

.footer-contact-list li i {
  color: var(--tcp-primary);
  font-size: 0.5rem;
  margin-top: 0.6rem;
  flex-shrink: 0;
}

.footer-contact-list a {
  color: var(--tcp-dark);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  font-size: var(--tcp-text-base);
}

.footer-contact-list a:hover {
  color: var(--tcp-primary);
}

/* Column 3: Links */
.footer-links {
  padding-left: var(--tcp-space-8);
}

.footer-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--tcp-space-8);
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu li {
  margin-bottom: var(--tcp-space-4);
}

.footer-menu a {
  color: var(--tcp-dark);
  font-weight: 600;
  font-size: var(--tcp-text-base);
  letter-spacing: 0px;
  transition: color 0.3s ease;
  text-decoration: none;
}

.footer-menu a:hover {
  color: var(--tcp-primary);
}

/* Footer Bottom */
.footer-bottom {
  background: var(--tcp-gray-100);
  padding: var(--tcp-space-6) 0;
  border-top: 1px solid var(--tcp-gray-300);
}

.footer-bottom-inner {
  text-align: center;
}

.footer-copyright-text {
  color: var(--tcp-gray-600);
  font-size: var(--tcp-text-sm);
}

.footer-copyright-text a {
  color: var(--tcp-gray-700);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.footer-copyright-text a:hover {
  color: var(--tcp-primary);
}

/* ===================================
   GLOBAL STYLES
   =================================== */

.section-title {
  color: var(--tcp-dark);
  font-family: var(--tcp-font-secondary);
  font-size: var(--tcp-text-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  padding-bottom: var(--tcp-space-3);
  padding-left: 8px;
  position: relative;
}

.section-title::before {
  background-color: var(--tcp-primary);
  content: " ";
  display: block;
  height: 75%;
  left: 0;
  position: absolute;
  top: 0;
  width: 4px;
}

/* Category Title */
.category-title {
  font-family: var(--tcp-font-secondary);
  font-size: var(--tcp-text-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--tcp-space-6);
  position: relative;
}

.category-title::before {
  background-color: var(--tcp-primary);
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 4px;
}

.category-title::after {
  background-color: var(--tcp-gray-200);
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  top: 50%;
  width: 100%;
  z-index: -1;
}

.category-title a,
.category-title span {
  background-color: #fff;
  display: inline-block;
  color: var(--tcp-dark);
  padding-left: var(--tcp-space-2);
  padding-right: var(--tcp-space-2);
  text-decoration: none;
  transition: color 0.3s ease;
}

.category-title a:hover {
  color: var(--tcp-primary);
}

.homepage-intro-grid .news-column .section-title {
  font-size: var(--tcp-text-xl);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--tcp-space-8);
  }

  .footer-about,
  .footer-contact,
  .footer-links {
    padding: 0;
    border-bottom: 1px solid var(--tcp-gray-300);
    padding-bottom: var(--tcp-space-6);
  }

  .footer-links {
    border-bottom: none;
  }

  .nav-menu {
    gap: var(--tcp-space-6);
  }

  .site-name {
    font-size: 2rem;
  }

  .header-social-icons {
    gap: var(--tcp-space-2);
  }

  .social-icon,
  .header-search,
  .menu-toggle {
    width: 38px;
    height: 38px;
    font-size: var(--tcp-text-base);
  }
}

@media (max-width: 768px) {
  /* Mobile Header */
  .menu-toggle {
    display: flex;
  }

  .header-search {
    display: none;
  }

  .header-main {
    padding: var(--tcp-space-4) 0 var(--tcp-space-3) 0;
  }

  .header-top-section {
    grid-template-columns: auto 1fr auto;
    margin-bottom: var(--tcp-space-3);
  }

  .header-search-wrapper {
    justify-self: start;
  }

  .site-name {
    font-size: 1.75rem;
  }

  .site-logo {
    width: 50px;
    height: 50px;
  }

  .header-date {
    font-size: var(--tcp-text-sm);
  }

  .header-social-icons {
    gap: var(--tcp-space-2);
  }

  .social-icon {
    width: 36px;
    height: 36px;
    font-size: var(--tcp-text-sm);
  }

  /* Mobile Navigation */
  .main-navigation {
    display: none;
    padding-top: var(--tcp-space-3);
  }

  .main-navigation.active {
    display: block;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0;
    padding: var(--tcp-space-3) 0 0 0;
    border-top: 1px solid var(--tcp-gray-200);
  }

  .nav-menu li {
    border-bottom: 1px solid var(--tcp-gray-200);
  }

  .nav-menu a {
    display: block;
    padding: var(--tcp-space-3) 0;
    text-align: center;
  }

  .nav-menu a::after {
    display: none;
  }

  /* Mobile Footer */
  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: var(--tcp-space-4);
  }

  .footer-social-icon {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 480px) {
  .site-name {
    font-size: 1.5rem;
  }

  .site-logo {
    width: 45px;
    height: 45px;
  }

  .header-social-icons {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 90px;
  }

  .social-icon,
  .menu-toggle {
    width: 34px;
    height: 34px;
    font-size: 0.875rem;
  }

  .header-date {
    font-size: 0.8rem;
  }

  .nav-menu a {
    font-size: var(--tcp-text-sm);
  }
}
