/*
Theme Name: CTF Landing Pages
Theme URI: https://taxpayer.com/
Author: Canadian Taxpayers Federation
Author URI: https://taxpayer.com/
Description: Custom landing page and petition theme for CTF campaigns
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ctf-landing-pages
Tags: petition, landing-page, custom, mailchimp, campaigns
*/

/* ========================================
   GLOBAL STYLES - Base Theme Styles
======================================== */

/* CSS Reset & Base */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8fafb;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem 0;
  font-weight: 600;
  line-height: 1.3;
  color: #1a2a3a;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin: 0 0 1rem 0;
  color: #2d3a4a;
}

a {
  color: #1a8cff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}


/* Site Header */
.site-header {
  background: #ffffff;
  color: #fff;
  padding: 1rem 0;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


.site-header img{
  max-width: 150px;
  height: auto;
}

.header-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
  position: relative;
}

/* When navigation is hidden, remove header bar and use static top logo */
.site-header.no-navigation {
  display: none;
}

.navless-logo {
  display: block;
  max-width: 900px;
  margin: 0 auto;
  text-align: right;
  padding: 0.75rem 1rem 0;
}

.navless-logo img {
  max-width: 90px;
  height: auto;
}

/* Hamburger Menu Button - Hidden on Desktop */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.mobile-menu-toggle .hamburger {
  width: 25px;
  height: 3px;
  background-color: #000;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Hamburger Animation when Menu is Open */
.mobile-menu-toggle.active .hamburger:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-toggle.active .hamburger:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.header-content a {
  color: #fff;
  text-decoration: none;
  display: inline-block;
}

.header-content a:hover {
  text-decoration: none;
  opacity: 0.9;
}

/* Main Navigation */
.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
}

.main-navigation li {
  margin: 0;
}

.main-navigation a {
  color: #000;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.main-navigation a:hover {
  background-color: rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

.main-navigation a.donate-btn {
  background: #fff;
  color: #dd230f;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
}

.main-navigation a.donate-btn:hover {
  background: #f0f0f0;
  color: #c41f0d;
}


/* Site Footer */
.site-footer {
  background: #f8fafb;
  padding: 2em 0 1em 0;
  text-align: center;
  margin-top: auto;
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
}

.footer-content p {
  margin: 0.5rem 0;
  color: #6c757d;
}

.footer-links {
  margin-top: 1rem;
}

.footer-links a {
  color: #000 !important;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #dd230f !important;
  text-decoration: underline;
}

.footer-links .separator {
  margin: 0 0.75rem;
  color: #6c757d;
}

/* Home Page Styles */
.home-template {
  max-width: 1200px;
  margin: 2em auto;
}

.home-header {
  text-align: center;
  margin-bottom: 2rem;
}

.home-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.home-subtitle {
  font-size: 1.2rem;
  color: #6c757d;
  margin: 0;
}

/* Featured Images Section */
.home-featured-images {
  margin: 1rem 0 2rem 0;
  padding: 0 0rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.featured-images-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 0.5rem;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
}

.featured-image-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #000;
  position: relative;
  height: 380px;
}

.featured-image-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.featured-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
  background-color: #000;
}

.featured-image-link:hover .featured-image {
  transform: scale(1.01);
}

.featured-image-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.3) 100%);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  z-index: 5;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Responsive styles for featured images */
@media (max-width: 768px) {
  .featured-images-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .featured-image-link {
    height: 250px;
  }
  
  .home-featured-images {
    margin: 2rem 0 2.5rem 0;
    padding: 0 0.75rem;
  }
}

@media (max-width: 480px) {
  .featured-images-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 0.75rem;
  }
  
  .featured-image-link {
    height: 220px;
  }
  
  .featured-image-title {
    font-size: 1.25rem;
    padding: 1rem;
  }
}

/* Sign Up Prompt Section */
.signup-prompt-section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 1rem;
}

.signup-prompt-content {
  padding: 3rem 2.5rem;
  text-align: center;
}

.signup-prompt-title {
  color: #2d3a4a;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  line-height: 1.3;
}


.signup-prompt-button {
  display: inline-block;
  background-color: #dd230f;
  color: #fff;
  padding: 0.75rem 1.875rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  border: 2px solid #dd230f;
  text-transform: none;
  letter-spacing: normal;
}

.signup-prompt-button:hover {
  background-color: #b81d0c;
  border-color: #b81d0c;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(221, 35, 15, 0.3);
  text-decoration: none;
  color: #fff;
}

.signup-prompt-button:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(221, 35, 15, 0.3);
}

/* Responsive styles for signup prompt */
@media (max-width: 768px) {
  .signup-prompt-section {
    margin: 3rem auto;
    padding: 0 0.75rem;
  }

  .signup-prompt-content {
    padding: 2.5rem 1.5rem;
  }

  .signup-prompt-title {
    font-size: 1.25rem;
  }


  .signup-prompt-button {
    padding: 0.75rem 1.75rem;
    font-size: 0.9rem;
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .signup-prompt-section {
    margin: 2rem auto;
  }

  .signup-prompt-content {
    padding: 2rem 1rem;
    border-radius: 8px;
  }

  .signup-prompt-title {
    font-size: 1.1rem;
  }

  .signup-prompt-button {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
}

.home-content {
  margin-top: 2rem;
}


.pagination {
  text-align: center;
  margin: 2rem 0;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  border: 1px solid #e1e8ed;
  border-radius: 4px;
  text-decoration: none;
  color: #1a2a3a;
}

.pagination a:hover {
  background: #fff1ee;
  color: #b81d0c;
}

.pagination .current {
  background: #dd230f;
  color: #fff;
  border-color: #dd230f;
}

.no-posts {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}



/* Generic card classes (for new card system) */
.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
}

.card-content h3 {
  margin: 0 0 1rem 0;
  font-size: 1.3rem;
  line-height: 1.4;
  height: 3rem;
}

.card-content h3 a {
  color: #1a2a3a;
  text-decoration: none;
}

.card-content h3 a:hover {
  color: #1a8cff;
}

/* Generic card class */
.card-excerpt {
  color: #2d3a4a;
  margin-bottom: 1rem;
  line-height: 1.6;
  height: 6rem;
}

.card-date {
  color: #6a7a8a;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}


/* ========================================
   NEWSROOM FILTERS
======================================== */
.newsroom-filters,
.petition-filters {
  background: #fff;
  padding: 1.25rem;
  margin-bottom: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e9ecef;
}

.filter-form {
  width: 100%;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.filter-group:first-child {
  flex: 2 1 200px;
  min-width: 180px;
}

.filter-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input[type="text"],
.filter-group input[type="search"],
.filter-group input[type="date"] {
  padding: 0.75rem 0.875rem;
  border: 1.5px solid #dee2e6;
  border-radius: 6px;
  font-size: 0.9375rem;
  color: #212529;
  background-color: #fff;
  transition: all 0.2s ease-in-out;
  font-family: inherit;
  height: 44px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.filter-group select:hover,
.filter-group input[type="text"]:hover,
.filter-group input[type="search"]:hover,
.filter-group input[type="date"]:hover {
  border-color: #adb5bd;
}

.filter-group select:focus,
.filter-group input[type="text"]:focus,
.filter-group input[type="search"]:focus,
.filter-group input[type="date"]:focus {
  outline: none;
  border-color: #dd230f;
  box-shadow: 0 0 0 3px rgba(221, 35, 15, 0.1);
  background-color: #fff;
}

.petition-filters .search-group input[type="search"] {
  font-size: 1rem;
}

.petition-filters .search-group .search-inline {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.petition-filters .search-group .search-inline input[type="search"] {
  flex: 1 1 auto;
}

.petition-filters .search-group .search-button {
  border: 1.5px solid #dee2e6;
  background: #fff;
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  font-size: 1rem;
}

.petition-filters .search-group .search-button:hover {
  border-color: #adb5bd;
  background-color: #f8f9fa;
}

.petition-filters .search-group .search-button:focus {
  outline: none;
  border-color: #dd230f;
  box-shadow: 0 0 0 3px rgba(221, 35, 15, 0.1);
}

.filter-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  flex-shrink: 0;
}

.filter-actions .btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  white-space: nowrap;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.filter-actions .btn-primary {
  background-color: #dd230f;
  color: #fff;
  border: none;
  cursor: pointer;
}

.filter-actions .btn-primary:hover {
  background-color: #b51d0c;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(221, 35, 15, 0.25);
}

.filter-actions .btn-primary:active {
  transform: translateY(0);
}

.filter-actions .btn-secondary {
  background-color: #fff;
  color: #495057;
  text-decoration: none;
  border: 1.5px solid #dee2e6;
}

.filter-actions .btn-secondary:hover {
  background-color: #f8f9fa;
  border-color: #adb5bd;
  color: #212529;
}

/* Tablet responsiveness for filters */
@media (max-width: 992px) {
  .filter-group {
    flex: 1 1 calc(50% - 0.3125rem);
    min-width: 140px;
  }
  
  .filter-group:first-child {
    flex: 1 1 100%;
    min-width: 100%;
  }
}

/* Mobile responsiveness for filters */
@media (max-width: 768px) {
  .newsroom-filters,
  .petition-filters {
    padding: 1rem;
  }
  
  .filter-row {
    gap: 0.75rem;
  }
  
  .filter-group {
    flex: 1 1 100%;
    min-width: 100%;
  }
  
  .filter-actions {
    flex-direction: row;
    width: 100%;
    gap: 0.5rem;
  }
  
  .filter-actions .btn {
    flex: 1;
  }
  
  .filter-actions .btn {
    width: 100%;
  }
}

/* Newsroom meta information */
.newsroom-meta {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
}

.newsroom-meta .card-date {
  display: block;
  margin-bottom: 0.5rem;
  color: #6c757d;
  font-weight: 400;
}

.newsroom-type,
.newsroom-province,
.newsroom-author {
  display: inline;
  color: #495057;
  font-weight: 400;
}

.newsroom-type {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: #dd230f;
}

.newsroom-type::after,
.newsroom-province::after {
  content: " | ";
  color: #dee2e6;
  margin: 0 0.5rem;
}


.progress-bar {
  width: 100%;
  height: 8px;
  background: #e1e8ed;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #dd230f 0%, #b81d0c 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}


/* Generic card class */
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #6c757d;
}


/* Generic card class */
.card-cta {
  width: 100%;
  text-align: center;
  padding: 0.75rem 1rem;
  font-weight: bold;
}

.petition-archive-link,
.donation-archive-link,
.newsroom-archive-link {
  text-align: center;
  margin-top: 2rem;
  padding: 0 1rem;
}

/* Petition, Donation & Newsroom Archive Pages */
.petition-archive,
.donation-archive,
.newsroom-archive {
  max-width: 1200px;
  margin: 2rem auto;
}

.archive-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 1rem;
  background: #dd230f;
  color: white;
}

.archive-header h1 {
  margin: 0 0 0.5rem 0;
  color: white;
}

.archive-subtitle {
  margin: 0;
  opacity: 0.9;
  font-size: 1.1rem;
  color: #fff;
}

.petition-archive-grid,
.donation-archive-grid,
.newsroom-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.petition-card.archive,
.donation-card.archive,
.newsroom-card.archive {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.petition-card.archive:hover,
.donation-card.archive:hover,
.newsroom-card.archive:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}


/* Generic card class */
.card-category {
  background: #e2e3e5;
  color: #383d41;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

.no-petitions,
.no-donations,
.no-newsroom {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}



/* Responsive Design */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .container {
    padding: 0 0.5rem;
  }
  
  /* Mobile navigation styles */
  .site-header {
    padding: 0.5rem 0;
  }
  
  .header-content {
    gap: 1rem !important;
    padding: 0 1rem;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  
  .site-header img {
    max-width: 120px;
  }
  
  /* Show hamburger menu on mobile */
  .mobile-menu-toggle {
    display: flex !important;
    order: 2;
  }
  
  .site-logo {
    order: 1;
  }
  
  .main-navigation {
    order: 3;
  }
  
  /* Hide navigation by default on mobile */
  .main-navigation {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    padding-top: 80px;
    overflow-y: auto;
  }
  
  /* Show navigation when active */
  .main-navigation.active {
    right: 0;
  }
  
  .main-navigation ul {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    padding: 1rem 0;
  }
  
  .main-navigation li {
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .main-navigation a {
    display: block;
    padding: 1rem 1.5rem;
    text-align: left;
    color: #000;
    transition: background-color 0.2s ease;
  }
  
  .main-navigation a:hover {
    background: rgba(0, 0, 0, 0.05);
  }
  
  .btn-donate {
    background: #dd230f !important;
    color: #fff !important;
    margin: 1rem 1.5rem;
    width: calc(100% - 3rem);
    text-align: center;
    border-radius: 6px;
  }
  
  .btn-donate:hover {
    background: #c41f0d !important;
  }
  
  /* Mobile menu overlay */
  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .mobile-menu-overlay.active {
    display: block;
    opacity: 1;
  }
  
  .home-template {
    margin: 1rem auto;
    padding: 1rem;
  }
  
  .home-header h1 {
    font-size: 2rem;
  }

  /* Generic card responsive styles */
  .card-content {
    padding: 1rem;
  }

  .card-content h3 {
    font-size: 1.2rem;
  }

  .card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }  /* Archive page mobile styles */
  .petition-archive {
    margin: 1rem auto;
    padding: 0 0.5rem;
  }
  
  .archive-header {
    margin-bottom: 2rem;
    padding: 1.5rem 1rem;
  }
  
  .archive-header h1 {
    font-size: 1.8rem;
  }
  
  .petition-archive-grid,
  .donation-archive-grid,
  .newsroom-archive-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
