/*
Theme Name: Mac Address to IP Converter
Theme URI: https://macaddressconverter.local
Author: Your Name
Author URI: https://yoursite.com
Description: A modern, responsive WordPress theme for Mac Address to IP Address conversion tool
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mac-converter
Domain Path: /languages
*/

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary: #10b981;
  --danger: #ef4444;
  --dark: #1f2937;
  --light: #f9fafb;
  --border: #e5e7eb;
  --text: #374151;
  --text-light: #6b7280;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background-color: #fff;
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

/* ==========================================
   CONTAINERS & SPACING
   ========================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

.section-sm {
  padding: 40px 0;
}

/* ==========================================
   HEADER STYLES
   ========================================== */
header {
  background: #fff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.site-logo {
  width: 120px;
  height: 120px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--light);
}

.site-title-wrapper h1 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--dark);
}

.site-title-wrapper p {
  font-size: 0.875rem;
  color: var(--text-light);
  margin: 0;
}

nav.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

nav.main-navigation a {
  color: var(--text);
  font-weight: 500;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

nav.main-navigation a:hover,
nav.main-navigation a.current {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
}

/* ==========================================
   FOOTER STYLES
   ========================================== */
footer {
  background: var(--dark);
  color: #fff;
  padding: 60px 0 20px;
  margin-top: 80px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h4 {
  color: #fff;
  margin-bottom: 20px;
}

.footer-logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.footer-logo {
  width: 120px;
  height: 120px;
  border-radius: var(--radius);
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-section a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--secondary);
}

.btn-secondary:hover {
  background: #059669;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 100px 0;
  text-align: center;
}

.hero h1 {
  color: #fff;
  font-size: 3rem;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 30px;
  opacity: 0.95;
}

.hero .btn {
  margin: 0 10px;
}

.featured-image-container {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 30px auto 0;
  box-shadow: var(--shadow-lg);
}

.featured-image-container img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================
   CARDS
   ========================================== */
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-image {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 15px;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--dark);
}

.card-meta {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.card-excerpt {
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 15px;
}

/* ==========================================
   FORMS
   ========================================== */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark);
}

input[type="text"],
input[type="email"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

/* ==========================================
   CONVERTER TOOL
   ========================================== */
.converter-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.converter-container {
  background: var(--light);
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 40px;
}

.converter-title {
  text-align: center;
  margin-bottom: 30px;
}

.converter-title h2 {
  color: var(--dark);
}

.converter-title p {
  color: var(--text-light);
  font-size: 1.125rem;
}

.converter-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.converter-input-group {
  position: relative;
}

.converter-input-group label {
  font-weight: 600;
  margin-bottom: 10px;
}

.converter-input-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
}

.converter-input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.converter-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.converter-buttons .btn {
  flex: 1;
  padding: 14px 20px;
  font-size: 1rem;
}

.result-box {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
  display: none;
}

.result-box.show {
  display: block;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-item {
  padding: 15px;
  background: var(--light);
  border-radius: 8px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-item:last-child {
  margin-bottom: 0;
}

.result-label {
  font-weight: 600;
  color: var(--dark);
}

.result-value {
  color: var(--primary);
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

.copy-btn {
  background: #6b7280;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
}

.copy-btn:hover {
  background: #374151;
}

.copy-btn-green {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
}

.copy-btn-green:hover {
  background: #059669;
}

.copy-btn-blue {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
}

.copy-btn-blue:hover {
  background: #1e40af;
}

/* ==========================================
   FAQ SECTION
   ========================================== */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 15px;
  overflow: hidden;
}

.faq-question {
  background: var(--light);
  padding: 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: var(--transition);
}

.faq-question:hover {
  background: #f3f4f6;
}

.faq-question.active {
  background: var(--primary);
  color: #fff;
}

.faq-question h4 {
  margin: 0;
  flex: 1;
}

.faq-toggle {
  font-size: 1.5rem;
  transition: var(--transition);
}

.faq-question.active .faq-toggle {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 20px;
  background: #fff;
  border-top: 1px solid var(--border);
  color: var(--text);
  line-height: 1.8;
}

.faq-answer.show {
  display: block;
}

/* ==========================================
   BLOG SECTION
   ========================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.post-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-8px);
}

.post-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-category {
  display: inline-block;
  background: var(--primary-light);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 10px;
  width: fit-content;
}

.post-card-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--dark);
}

.post-card-excerpt {
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 15px;
  flex: 1;
}

.post-card-meta {
  font-size: 0.875rem;
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post-card-date {
  color: var(--text-light);
}

.read-more {
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
}

.read-more:hover {
  color: var(--primary-dark);
}

/* ==========================================
   SIDEBAR
   ========================================== */
.sidebar {
  background: var(--light);
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.sidebar h3 {
  margin-bottom: 20px;
  color: var(--dark);
}

.sidebar-post {
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.sidebar-post:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar-post a {
  color: var(--dark);
  font-weight: 500;
  display: block;
  margin-bottom: 5px;
  transition: var(--transition);
}

.sidebar-post a:hover {
  color: var(--primary);
}

.sidebar-post-date {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* ==========================================
   PAGINATION
   ========================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 40px 0;
}

.pagination a,
.pagination span {
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  transition: var(--transition);
}

.pagination a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pagination .current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ==========================================
   CATEGORY BADGE
   ========================================== */
.category-badge {
  display: inline-block;
  background: var(--primary-light);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 15px;
}

/* ==========================================
   NAVIGATION LINKS
   ========================================== */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 60px;
}

.nav-post {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}

.nav-post:hover {
  box-shadow: var(--shadow-lg);
}

.nav-label {
  font-size: 0.875rem;
  color: var(--text-light);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}

.nav-title {
  color: var(--dark);
  font-size: 1.125rem;
  font-weight: 600;
}

.nav-post a {
  color: var(--dark);
}

.nav-post:hover .nav-title {
  color: var(--primary);
}

/* ==========================================
   CONTENT AREA
   ========================================== */
.page-content {
  line-height: 1.8;
  font-size: 1.0625rem;
}

.page-content h2 {
  margin-top: 40px;
  margin-bottom: 20px;
}

.page-content h3 {
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-content p {
  margin-bottom: 20px;
}

.page-content ul,
.page-content ol {
  margin-bottom: 20px;
  margin-left: 20px;
}

.page-content li {
  margin-bottom: 10px;
}

.page-content img {
  max-width: 100%;
  height: auto;
  margin: 30px 0;
  border-radius: var(--radius);
}

.page-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 20px;
  margin: 30px 0;
  font-style: italic;
  color: var(--text-light);
}

.page-content code {
  background: var(--light);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  color: var(--danger);
}

.page-content pre {
  background: var(--light);
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 20px 0;
}

/* ==========================================
   RELATED IMAGES GALLERY
   ========================================== */
.related-images-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.related-image-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.related-image-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  background: var(--light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.related-image-item:hover .related-image-wrapper {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.related-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.related-image-item:hover .related-image {
  transform: scale(1.05);
}

.image-author-credit {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 10px 12px;
  font-size: 0.875rem;
  transition: var(--transition);
}

.image-author-credit strong {
  font-weight: 600;
}

.image-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0;
  transition: var(--transition);
  z-index: 10;
}

.related-image-item:hover .image-delete-btn {
  opacity: 1;
}

.image-delete-btn:hover {
  background: rgba(220, 38, 38, 1);
  transform: scale(1.05);
}

/* ==========================================
   RESPONSIVE IMAGES GALLERY
   ========================================== */
@media (max-width: 768px) {
  .related-images-gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .related-images-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

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

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .hero {
    padding: 60px 0;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .header-top {
    flex-wrap: wrap;
    padding: 15px 0;
  }

  .logo-section {
    width: 100%;
  }

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

  .site-title-wrapper h1 {
    font-size: 1.25rem;
  }

  nav.main-navigation {
    width: 100%;
    order: 3;
    margin-top: 15px;
  }

  nav.main-navigation ul {
    flex-direction: column;
    gap: 10px;
  }

  .menu-toggle {
    display: block;
  }

  .converter-inputs {
    grid-template-columns: 1fr;
  }

  .converter-buttons {
    flex-direction: column;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 40px 0;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-logo {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .section {
    padding: 30px 0;
  }

  .converter-container {
    padding: 20px;
  }

  .card {
    padding: 15px;
  }

  .footer-logo-section {
    flex-direction: column;
    text-align: center;
  }

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

  .footer-logo {
    width: 80px;
    height: 80px;
  }

  nav.main-navigation ul {
    flex-direction: column;
    gap: 8px;
  }
}
