/*
Theme Name: MAC to IP Converter Theme
Theme URI: https://serialroi.com
Author: OKi
Description: A modern, responsive WordPress theme for MAC Address to IP Address conversion tool with clean design and optimal user experience.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mac-ip-converter
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ===================================
   CSS Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    font-size: 16px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===================================
   Container & Layout
   =================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 1200px;
    margin: 0 auto !important;
    padding: 0 20px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.container-narrow > * {
    width: 100%;
    max-width: 1200px;
}

/* ===================================
   Header Styles
   =================================== */
.site-header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.custom-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.site-title a {
    color: var(--text-primary);
}

.site-title a:hover {
    color: var(--primary-color);
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item a::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--primary-hover);
}

/* ===================================
   Footer Styles
   =================================== */
.site-footer {
    background: var(--text-primary);
    color: #e2e8f0;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-branding {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.footer-site-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.footer-quick-links h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-quick-links ul {
    list-style: none;
    padding: 0;
}

.footer-quick-links li {
    margin-bottom: 0.5rem;
}

.footer-quick-links a {
    color: #cbd5e1;
    transition: var(--transition);
}

.footer-quick-links a:hover {
    color: white;
    padding-left: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

/* ===================================
   Converter Tool Styles
   =================================== */
.converter-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    margin: 3rem 0;
}

.converter-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: center;
}

.converter-description {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.converter-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-primary);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-convert {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-convert:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.converter-result {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.converter-result.success {
    background: #f0fdf4;
    border-left-color: #22c55e;
}

.converter-result.error {
    background: #fef2f2;
    border-left-color: #ef4444;
}

.result-label {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

/* ===================================
   FAQ Section
   =================================== */
.faq-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    margin: 3rem 0;
}

.faq-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-align: center;
}

.faq-item {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.faq-question {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-question::before {
    content: 'Q:';
    color: var(--primary-color);
    font-weight: 700;
}

.faq-answer {
    color: var(--text-secondary);
    line-height: 1.7;
    padding-left: 2rem;
}

/* ===================================
   Recent Posts Section
   =================================== */
.recent-posts-section {
    margin: 3rem 0;
}

.recent-posts-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-align: center;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.post-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-card-title a {
    color: var(--text-primary);
}

.post-card-title a:hover {
    color: var(--primary-color);
}

.post-card-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
    flex: 1;
}

.post-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.post-card-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-card-category {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===================================
   Single Post Styles
   =================================== */
.single-post-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    margin: 3rem 0;
}

.post-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.sidebar-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.sidebar-post {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-post-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.sidebar-post-content {
    flex: 1;
}

.sidebar-post-title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.sidebar-post-title a {
    color: var(--text-primary);
}

.sidebar-post-title a:hover {
    color: var(--primary-color);
}

.sidebar-post-date {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.post-main-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
}

.post-hero {
    margin-bottom: 2rem;
}

.post-featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.post-header {
    margin-bottom: 2rem;
}

.post-categories {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.post-category-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.post-content {
    line-height: 1.8;
    color: var(--text-primary);
    font-size: 1.0625rem;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.post-content h2 {
    font-size: 1.875rem;
}

.post-content h3 {
    font-size: 1.5rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content img {
    border-radius: var(--radius-md);
    margin: 2rem 0;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.post-content code {
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--text-primary);
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 2rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.nav-post-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.nav-post-card:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.nav-post-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.nav-post-card:hover .nav-post-label {
    color: rgba(255, 255, 255, 0.8);
}

.nav-post-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-post-card:hover .nav-post-title {
    color: white;
}

/* Related Posts */
.related-posts {
    margin-top: 4rem;
}

.related-posts h3 {
    font-size: 1.875rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* ===================================
   Page Styles
   =================================== */
.page-layout {
    margin: 3rem 0;
}

.page-content-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-content-wrapper .page-content {
    width: 100%;
    max-width: 1200px;
}

.page-content-wrapper .page-header {
    width: 100%;
    text-align: center;
}

.page-hero {
    margin-bottom: 2rem;
}

.page-featured-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.page-content {
    max-width: 1200px;
    margin: 0 auto;
    line-height: 1.8;
    color: var(--text-primary);
    font-size: 1.0625rem;
    width: 100%;
    display: block;
}

/* Override WordPress default alignment */
.page .page-content,
.page-template-default .page-content {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Force center all page content */
.page article,
.page .entry-content,
.page-content,
article.page {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 1200px !important;
}

/* Center the main article wrapper */
.page-content-wrapper article,
.page-content-wrapper > * {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Center all content inside pages */
.page-content > * {
    margin-left: auto;
    margin-right: auto;
}

.page-content > div {
    max-width: 100%;
}

/* Force center alignment for all page content divs */
.page-content div[class*="hero"],
.page-content div[class*="section"],
.page-content div[class*="grid"],
.page-content div[class*="card"],
.page-content div[class*="contact"],
.page-content div[class*="terms"],
.page-content div[class*="about"],
.page-content div[class*="converter"],
.page-content div[class*="faq"] {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

/* Ensure forms and containers are centered */
.page-content form,
.page-content > div > div {
    margin-left: auto;
    margin-right: auto;
}

.page-content h2,
.page-content h3,
.page-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.page-content h2 {
    font-size: 1.875rem;
}

.page-content h3 {
    font-size: 1.5rem;
}

.page-content p {
    margin-bottom: 1.5rem;
}

.page-content ul,
.page-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .single-post-layout {
        grid-template-columns: 1fr;
    }
    
    .post-sidebar {
        position: static;
        order: 2;
    }
    
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        box-shadow: var(--shadow-lg);
        padding: 1rem;
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-navigation a {
        padding: 1rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .custom-logo,
    .footer-logo {
        width: 80px;
        height: 80px;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
    
    .converter-section,
    .faq-section,
    .post-main-content,
    .page-content-wrapper {
        padding: 1.5rem;
    }
    
    .post-title,
    .page-title {
        font-size: 1.875rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .site-branding {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }
    
    .post-title,
    .page-title {
        font-size: 1.5rem;
    }
    
    .converter-section h2,
    .faq-section h2,
    .recent-posts-section h2 {
        font-size: 1.5rem;
    }
}

/* ===================================
   Utility Classes
   =================================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}
