/*
Theme Name: Randledge TT5
Theme URI: https://randledge.com
Author: Víctor Ríos
Template: twentytwentyfive
Version: 1.0.7.1
Text Domain: randledge-tt5
*/

/* ============================================ */
/* HEADER STYLES - Premium Modern Design       */
/* ============================================ */

.site-header {
  width: 100%;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-bottom: 2px solid #e8e8e8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 1000;
  overflow-x: hidden;
  box-sizing: border-box;
}

.header-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  box-sizing: border-box;
}

/* --- Header Top: Logo + Title + Search --- */
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.25rem 2rem;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* --- Logo --- */
.site-logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.site-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-logo .logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: bold;
  font-size: 1.5rem;
  color: #0073aa;
  text-decoration: none;
}

/* --- Site Title --- */
.site-title {
  flex-shrink: 0;
}

.site-title a {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  text-decoration: none;
  letter-spacing: -0.5px;
  transition: color 0.3s ease;
}

.site-title a:hover {
  color: #0073aa;
}

.site-title h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
}

/* --- Search Bar (Centered & Expanded) --- */
.rl-search-inline {
  flex: 1;
  max-width: 600px;
  position: relative;
  min-width: 0;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  color: #999;
  pointer-events: none;
  z-index: 2;
}

.rl-search-inline input {
  width: 100%;
  padding: 12px 16px 12px 45px;
  font-size: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  background: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.rl-search-inline input:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.rl-search-inline input::placeholder {
  color: #999;
}

/* --- Search Results Dropdown --- */
.rl-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  display: none;
  max-height: 500px;
  overflow-y: auto;
  z-index: 999;
  padding: 8px 0;
  width: 100%;
  box-sizing: border-box;
}

.rl-search-results.visible {
  display: block;
}

.rl-search-result {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.rl-search-result:hover {
  background: #f5f5f5;
  border-left-color: #0073aa;
  padding-left: 20px;
}

.rl-search-result strong {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.rl-search-result span {
  display: block;
  font-size: 12px;
  color: #999;
  font-weight: 500;
}

.rl-no-results {
  padding: 20px 16px;
  color: #999;
  text-align: center;
  font-size: 14px;
}

/* ============================================ */
/* CATEGORY NAVIGATION - Modern Tab Style      */
/* ============================================ */

.category-navigation {
  border-top: 1px solid #e8e8e8;
  background: #fafbfc;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.category-navigation::-webkit-scrollbar {
  height: 4px;
}

.category-navigation::-webkit-scrollbar-track {
  background: transparent;
}

.category-navigation::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.category-navigation::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.nav-wrapper {
  display: flex;
  gap: 0;
  padding: 0 2rem;
  max-width: 1400px;
  margin: 0 auto;
  align-items: stretch;
  white-space: nowrap;
  min-height: 48px;
}

.category-link {
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  text-decoration: none;
  color: #555;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  position: relative;
}

.category-link:hover {
  color: #0073aa;
  background: #f0f7fc;
}

.category-link.active {
  color: #0073aa;
  border-bottom-color: #0073aa;
  background: #f0f7fc;
}

.category-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: #0073aa;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.category-link:hover::after {
  width: 60%;
}

.category-link.active::after {
  width: 100%;
}

/* ============================================ */
/* RESPONSIVE DESIGN                           */
/* ============================================ */

@media (max-width: 1200px) {
  .header-top {
    gap: 1.5rem;
    padding: 1rem 1.5rem;
  }

  .rl-search-inline {
    max-width: 500px;
  }

  .nav-wrapper {
    padding: 0 1.5rem;
  }
}

@media (max-width: 992px) {
  .header-top {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
  }

  .header-brand {
    gap: 0.75rem;
  }

  .site-title a,
  .site-title h1 {
    font-size: 1.2rem;
  }

  .rl-search-inline {
    order: 3;
    width: 100%;
    max-width: none;
  }

  .nav-wrapper {
    padding: 0 1rem;
    gap: 0.5rem;
  }

  .category-link {
    padding: 0 12px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
    max-width: 100%;
  }

  .header-brand {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .site-title a,
  .site-title h1 {
    font-size: 1.1rem;
  }

  .search-icon {
    left: 12px;
  }

  .rl-search-inline {
    width: 100%;
    max-width: 100%;
    flex-shrink: 1;
    min-width: 0;
  }

  .rl-search-inline input {
    padding: 10px 12px 10px 40px;
    font-size: 14px;
    width: 100%;
  }

  .search-wrapper {
    width: 100%;
    overflow: visible;
  }

  .nav-wrapper {
    padding: 0 1rem;
    gap: 0;
  }

  .category-link {
    padding: 0 10px;
    font-size: 12px;
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .header-top {
    padding: 0.75rem;
    gap: 0.5rem;
    max-width: 100%;
  }

  .header-brand {
    width: 100%;
    gap: 0.5rem;
  }

  .site-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }

  .site-title a,
  .site-title h1 {
    font-size: 1rem;
  }

  .rl-search-inline {
    width: 100%;
    max-width: 100%;
    flex-shrink: 1;
    min-width: 0;
  }

  .search-wrapper {
    width: 100%;
    overflow: visible;
  }

  .rl-search-inline input {
    padding: 8px 10px 8px 36px;
    font-size: 13px;
    width: 100%;
  }

  .search-icon {
    width: 18px;
    height: 18px;
    left: 10px;
  }

  .nav-wrapper {
    padding: 0 0.5rem;
    gap: 0;
  }

  .category-link {
    padding: 0 8px;
    font-size: 11px;
    min-height: 40px;
  }

  .rl-search-results {
    top: calc(100% + 4px);
    max-height: 350px;
    font-size: 13px;
  }

  .rl-search-result {
    padding: 10px 12px;
  }

  .rl-search-result strong {
    font-size: 13px;
  }

  .rl-search-result span {
    font-size: 11px;
  }
}

/* ============================================ */
/* FOOTER STYLES - Premium Modern Design       */
/* ============================================ */

.site-footer {
  width: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #e0e0e0;
  margin-top: 3rem;
  border-top: 2px solid #0073aa;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* --- Footer Content Grid --- */
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #0073aa;
}

.footer-description {
  font-size: 14px;
  line-height: 1.6;
  color: #b0b0b0;
  margin: 0 0 1.5rem 0;
}

/* --- About Section --- */
.footer-about {
  max-width: 300px;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(0, 115, 170, 0.2);
  border-radius: 50%;
  color: #0073aa;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 18px;
}

.social-link:hover {
  background: #0073aa;
  color: #fff;
  transform: translateY(-2px);
}

/* --- Footer Menu --- */
.footer-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu li {
  margin-bottom: 0.75rem;
}

.footer-menu a {
  color: #b0b0b0;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-menu a:hover {
  color: #0073aa;
  padding-left: 0.5rem;
}

.footer-menu a::before {
  content: '→';
  opacity: 0;
  transition: opacity 0.3s ease;
}

.footer-menu a:hover::before {
  opacity: 1;
}

/* --- Newsletter Form --- */
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.newsletter-form input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid #444;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
  transition: all 0.3s ease;
}

.newsletter-form input::placeholder {
  color: #888;
}

.newsletter-form input:focus {
  outline: none;
  border-color: #0073aa;
  background: rgba(255, 255, 255, 0.15);
}

.newsletter-form button {
  padding: 10px 20px;
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  min-width: 100px;
}

.newsletter-form button:hover {
  background: #005a8b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

/* --- Footer Bottom --- */
.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-copyright,
.footer-credit {
  font-size: 13px;
  color: #888;
}

.footer-copyright p,
.footer-credit p {
  margin: 0;
}

.footer-credit a {
  color: #0073aa;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-credit a:hover {
  color: #fff;
}

.heart {
  color: #ff6b6b;
  animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* --- Footer Responsive --- */
@media (max-width: 1200px) {
  .footer-inner {
    padding: 2.5rem 1.5rem;
  }

  .footer-content {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .footer-inner {
    padding: 2rem 1rem;
  }

  .footer-content {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .footer-title {
    font-size: 1rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

}

@media (max-width: 480px) {
  .footer-inner {
    padding: 1.5rem 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-title {
    font-size: 0.95rem;
  }

  .footer-description {
    font-size: 13px;
  }

  .footer-menu a {
    font-size: 13px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-copyright,
  .footer-credit {
    font-size: 12px;
  }

  .social-link {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

/* ============================================ */
/* CATEGORY GRID - Modern Card Layout           */
/* ============================================ */

.category-grid {
  background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%);
  padding: 3rem 2rem;
  margin: 2rem 0;
}

.category-grid-container {
  max-width: 1400px;
  margin: 0 auto;
}

.grid-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 3rem 0;
  letter-spacing: -0.5px;
}

.categories-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  padding: 0;
}

.category-card {
  --cat-color: #0073aa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
  background: #fff;
  border: 2px solid #e8e8e8;
  border-radius: 14px;
  text-decoration: none;
  color: #1a1a1a;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
  min-height: 200px;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--cat-color);
  transform: scaleX(0);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: left;
}

.category-card:hover::before {
  transform: scaleX(1);
}

.category-card:hover {
  border-color: var(--cat-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-8px);
}

.card-icon {
  font-size: 3.5rem;
  line-height: 1;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.category-card:hover .card-icon {
  transform: scale(1.15) rotate(-5deg);
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  transition: color 0.3s ease;
  position: relative;
  z-index: 1;
}

.category-card:hover .card-title {
  color: var(--cat-color);
}

.card-hover-info {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.category-card:hover .card-hover-info {
  opacity: 1;
  transform: translateX(0);
}

.arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--cat-color);
  color: #fff;
  border-radius: 50%;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.category-card:hover .arrow {
  transform: translateX(4px);
}

/* Responsive */
@media (max-width: 1200px) {
  .categories-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2rem;
  }

  .category-card {
    padding: 1.5rem 1rem;
    min-height: 180px;
  }

  .card-icon {
    font-size: 3rem;
  }

  .card-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .category-grid {
    padding: 2rem 1rem;
    margin: 1.5rem 0;
  }

  .grid-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }

  .categories-list {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }

  .category-card {
    padding: 1.5rem 1rem;
    min-height: 160px;
    gap: 0.75rem;
  }

  .card-icon {
    font-size: 2.5rem;
  }

  .card-title {
    font-size: 1rem;
  }

  .card-hover-info {
    bottom: 1rem;
    right: 1rem;
  }
}

@media (max-width: 480px) {
  .category-grid {
    padding: 1.5rem 0.75rem;
    margin: 1rem 0;
  }

  .grid-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .categories-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .category-card {
    padding: 1.25rem 0.75rem;
    min-height: 140px;
    gap: 0.5rem;
  }

  .card-icon {
    font-size: 2rem;
  }

  .card-title {
    font-size: 0.95rem;
  }
}

/* ============================================ */
/* CATEGORY PAGE - SITES TILES                 */
/* ============================================ */

.category-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.category-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
  border-bottom: 2px solid #e8e8e8;
}

.category-header h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
  color: #1a1a1a;
  font-weight: 700;
}

.category-header p {
  font-size: 1.1rem;
  color: #666;
  margin: 0;
}

.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.site-tile {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.site-tile:hover {
  border-color: #007bff;
  box-shadow: 0 12px 32px rgba(0, 123, 255, 0.2);
  transform: translateY(-8px);
}

.site-header {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid #f5f5f5;
}

.site-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  flex: 1;
}

.site-link {
  color: #007bff;
  text-decoration: none;
  transition: color 0.2s;
}

.site-link:hover {
  color: #0056b3;
}

.site-popularity {
  font-size: 1.3rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.post-section {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-image {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
}

.post-info {
  flex: 1;
}

.post-info h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  line-height: 1.5;
}

.post-link {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s;
}

.post-link:hover {
  color: #007bff;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #999;
}

.post-date {
  color: #999;
}

.post-engagement {
  font-size: 1.1rem;
}

.tile-footer {
  padding: 1rem 1.5rem;
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
}

.btn-visit {
  display: block;
  padding: 0.75rem 1.25rem;
  background: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.btn-visit:hover {
  background: #0056b3;
  transform: translateX(4px);
}

.loading {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
  font-size: 1.1rem;
}

.no-sites {
  text-align: center;
  padding: 3rem 1rem;
  color: #999;
}

.no-posts {
  color: #999;
  margin: 0;
}

@media (max-width: 768px) {
  .category-page-container {
    padding: 1.5rem;
  }

  .category-header h1 {
    font-size: 1.8rem;
  }

  .sites-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
  }

  .post-image {
    height: 160px;
  }
}

@media (max-width: 480px) {
  .category-page-container {
    padding: 1rem;
  }

  .category-header h1 {
    font-size: 1.5rem;
  }

  .category-header p {
    font-size: 0.95rem;
  }

  .sites-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .site-header {
    padding: 1rem;
  }

  .site-name {
    font-size: 1.1rem;
  }

  .post-section {
    padding: 1rem;
  }

  .post-image {
    height: 140px;
  }

  .post-info h4 {
    font-size: 1rem;
  }
}

.pexels-credit {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
}

.pexels-credit a {
  color: inherit;
  text-decoration: underline;
}