/*
Theme Name: IPSWDL Pro
Theme URI: https://ipswdl.com
Description: A professional, modern WordPress theme with featured article slider, Tailwind CSS, and advanced customization options
Version: 3.0.0
Author: IPSWDL
Author URI: https://ipswdl.com
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ipswdl-pro
Domain Path: /languages
Tags: professional, tailwind, blog, responsive, modern

This theme is licensed under the GPL v2 or later
*/

/* Import Google Fonts handled in functions.php */

/* Global Styles */
* {
  font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #ffffff;
  color: #374151;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* SVG Dimension Fixes - Prevent "width: auto" SVG errors */
svg {
  max-width: 100%;
  vertical-align: middle;
}

/* SVG with width classes */
svg.w-4 {
  width: 1rem;
  height: 1rem;
}

svg.w-5 {
  width: 1.25rem;
  height: 1.25rem;
}

svg.w-6 {
  width: 1.5rem;
  height: 1.5rem;
}

/* Individual height classes */
svg.h-4 {
  height: 1rem;
}

svg.h-5 {
  height: 1.25rem;
}

svg.h-6 {
  height: 1.5rem;
}

/* Combined width and height classes - let Tailwind handle it */
svg.w-4.h-4 {
  width: 1rem;
  height: 1rem;
}

svg.w-5.h-5 {
  width: 1.25rem;
  height: 1.25rem;
}

svg.w-6.h-6 {
  width: 1.5rem;
  height: 1.5rem;
}

a {
  transition: color 0.3s ease;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header Styling */
header.sticky {
  position: relative;
}

header.sticky nav {
  position: static;
  flex-direction: row;
  gap: 2rem;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
}

/* Logo Sizing - handled by inline styles in header.php */
.custom-logo {
  height: auto;
  max-width: 100%;
}

/* Prose Styling */
.prose a {
  color: #0066cc;
  font-weight: 500;
}

.prose a:hover {
  color: #1f2937;
}

.prose h2,
.prose h3,
.prose h4 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.prose ul,
.prose ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose blockquote {
  border-left: 4px solid #0066cc;
  padding-left: 1.5rem;
  color: #6b7280;
  font-style: italic;
  margin: 1.5rem 0;
}

.prose code {
  background-color: #f3f4f6;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.prose pre {
  background-color: #1f2937;
  color: #e8e8e8;
  padding: 1.5rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 2rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

.prose th,
.prose td {
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.prose th {
  background-color: #f3f4f6;
  font-weight: 600;
}

/* Line Clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Swiper Customization */
.swiper-container {
  padding-bottom: 50px;
}

.swiper-pagination-bullet {
  background-color: rgba(255, 255, 255, 0.5);
}

.swiper-pagination-bullet-active {
  background-color: #0066cc;
}

.swiper-button-next,
.swiper-button-prev {
  width: 44px;
  height: 44px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 20px;
}

/* Navigation Links */
#mobile-menu-btn {
  cursor: pointer;
  transition: all 0.3s;
}

#mobile-menu-btn:hover span {
  background-color: #0066cc;
}

/* Mobile Navigation */
@media (max-width: 1024px) {
  header.sticky nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem;
    flex-direction: column;
    z-index: 40;
  }

  header.sticky nav.hidden {
    display: none;
  }

  header.sticky nav ul {
    flex-direction: column;
    width: 100%;
  }

  header.sticky nav ul li {
    width: 100%;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
  }

  header.sticky nav ul li:last-child {
    border-bottom: none;
  }

  header.sticky nav ul li a {
    display: block;
    padding: 0.5rem 0;
  }

  header.sticky nav ul li a:hover {
    color: #0066cc;
    font-weight: 600;
  }
}

/* Widget Styles - Enhanced */
.widget {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #f0f0f0;
}

.widget:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
}

.widget_text,
.widget_categories,
.widget_recent_posts,
.widget_archive,
.widget_search {
  margin-bottom: 1.5rem;
}

/* Widget Title */
.widget-title,
.widgettitle {
  font-size: 1.25rem;
  font-weight: bold;
  font-family: 'Playfair Display', serif;
  color: #1f2937;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #0066cc;
}

/* Recent Posts Widget - Stylish */
.widget_recent_posts ul,
.widget_recent_entries ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget_recent_posts ul li,
.widget_recent_entries ul li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.widget_recent_posts ul li:last-child,
.widget_recent_entries ul li:last-child {
  border-bottom: none;
}

.widget_recent_posts a,
.widget_recent_entries a {
  display: block;
  color: #1f2937;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  text-decoration: none;
  line-height: 1.4;
}

.widget_recent_posts a:hover,
.widget_recent_entries a:hover {
  color: #0066cc;
  padding-left: 0.5rem;
}

.widget_recent_posts .post-date,
.widget_recent_entries .post-date {
  display: block;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 0.25rem;
  font-weight: normal;
}

/* Categories Widget - Enhanced */
.widget_categories ul,
.widget_archive ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget_categories ul li,
.widget_archive ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.widget_categories ul li:last-child,
.widget_archive ul li:last-child {
  border-bottom: none;
}

.widget_categories a,
.widget_archive a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.widget_categories a:hover,
.widget_archive a:hover {
  color: #1f2937;
  padding-left: 0.5rem;
  font-weight: 600;
}

.widget_categories .cat-item > a::after,
.widget_archive li > a::after {
  content: attr(data-count);
  background: #e5e7eb;
  color: #374151;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
}

.widget_categories .cat-item > a,
.widget_archive li > a {
  padding: 0.75rem 0;
}

/* Search Widget */
.widget_search {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid #f0f0f0;
}

.widget_search form {
  display: flex;
  gap: 0.5rem;
}

.widget_search input[type="search"],
.widget_search input[type="text"] {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.3s ease;
}

.widget_search input[type="search"]:focus,
.widget_search input[type="text"]:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.widget_search button,
.widget_search input[type="submit"] {
  background: #0066cc;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.widget_search button:hover,
.widget_search input[type="submit"]:hover {
  background: #0052a3;
}

/* Pagination */
.page-numbers {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  text-decoration: none;
  color: #0066cc;
  transition: all 0.3s;
  font-weight: 500;
}

.page-numbers:hover {
  background-color: #0066cc;
  color: white;
  border-color: #0066cc;
}

.page-numbers.current {
  background-color: #1f2937;
  color: white;
  border-color: #1f2937;
  font-weight: 600;
}

.page-numbers.dots {
  border: none;
  color: #6b7280;
}

/* Comment Form */
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-family: 'Inter', sans-serif;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.comment-form textarea {
  resize: vertical;
  min-height: 120px;
}

.comment-form p {
  margin-bottom: 1rem;
}

.comment-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #374151;
}

/* Comments Styling */
.comment-body {
  background: #f9fafb;
  padding: 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid #0066cc;
}

.comment-author.vcard {
  margin-bottom: 1rem;
}

.comment-author.vcard::before {
  content: none;
}

.fn.n {
  font-weight: 600;
  color: #1f2937;
}

.comment-metadata {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.comment-metadata a {
  color: #0066cc;
  text-decoration: none;
}

.comment-metadata a:hover {
  text-decoration: underline;
}

.comment-text p {
  margin-bottom: 0.5rem;
  color: #374151;
  line-height: 1.6;
}

.reply {
  margin-top: 1rem;
}

.reply a {
  color: #0066cc;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.875rem;
}

.reply a:hover {
  text-decoration: underline;
}

/* Featured Recent Posts Widget */
.featured-post-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
  text-decoration: none;
  color: #1f2937;
  transition: all 0.3s ease;
}

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

.featured-post-item:hover {
  padding-left: 0.5rem;
}

.featured-post-item h4 {
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.featured-post-item p {
  margin: 0;
  padding: 0;
}

.featured-recent-posts {
  margin: 0;
  padding: 0;
}

/* Pagination */
.page-numbers {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  text-decoration: none;
  color: #0066cc;
  transition: all 0.3s;
}

.page-numbers:hover {
  background-color: #0066cc;
  color: white;
  border-color: #0066cc;
}

.page-numbers.current {
  background-color: #1f2937;
  color: white;
  border-color: #1f2937;
  font-weight: 600;
}

/* Comment Form */
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-family: 'Inter', sans-serif;
  margin-bottom: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.comment-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* Responsive */
@media (max-width: 1024px) {
  .swiper-button-next,
  .swiper-button-prev {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }

  .prose h2,
  .prose h3 {
    font-size: 1.5rem;
  }

  .swiper-button-next,
  .swiper-button-prev {
    display: none;
  }

  .swiper-pagination {
    position: relative;
  }

  .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .grid {
    gap: 1.5rem;
  }

  /* Mobile navigation is now handled in the main navigation section above */

  /* Widget responsiveness */
  .widget {
    padding: 1.25rem;
    margin-bottom: 1.25rem;
  }

  /* Layout buttons become full width on mobile */
  #layout-toggle,
  #homepage-layout-toggle {
    width: 100%;
    margin-bottom: 1rem;
  }

  #sort-select {
    width: 100%;
  }

  /* Single post adjustments */
  .comment-form,
  .comment-form input,
  .comment-form textarea {
    font-size: 16px;
  }

  /* Social sharing buttons stack */
  .social-share {
    flex-direction: column;
  }

  .social-share a {
    width: 100%;
  }

  /* Featured slider height */
  #featured-slider .swiper-slide {
    height: 250px;
  }

  /* Post cards in lists */
  .grid-cols-1 {
    grid-template-columns: 1fr;
  }

  /* Archive layout */
  [data-layout="list"] article {
    flex-direction: column;
  }

  [data-layout="list"] article .md\:w-48,
  [data-layout="list"] article .md\:w-56 {
    width: 100%;
  }

  /* Author box in post */
  .author-box {
    flex-direction: column;
    text-align: center;
  }

  .author-box .text-right {
    text-align: left;
  }
}

@media (max-width: 640px) {
  header.sticky {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .prose {
    font-size: 1rem;
  }

  .prose h2,
  .prose h3,
  .prose h4 {
    font-size: 1.25rem;
  }

  /* Featured slider */
  #featured-slider .swiper-slide {
    height: 200px;
  }

  .featured-text {
    padding: 1.5rem;
  }

  .featured-text h3 {
    font-size: 1.25rem;
  }

  /* Archive header */
  .archive-header h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }

  /* Comments */
  .comment-body {
    padding: 1rem;
  }

  .comment-form input,
  .comment-form textarea {
    padding: 0.5rem;
    margin-bottom: 0.75rem;
  }

  /* Buttons */
  button, a.button {
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
  }

  /* Post navigation */
  .post-nav {
    grid-template-columns: 1fr;
  }

  /* Sidebar widgets */
  .sidebar .widget {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .widget-title,
  .widgettitle {
    font-size: 1.1rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Utility */
.no-underline {
  text-decoration: none !important;
}

button, a {
  transition-duration: 200ms;
}


