/*
Theme Name: Bala Murali Theme
Theme URI: https://balamurali.in
Author: Bala Murali
Author URI: https://balamurali.in
Description: A modern, professional WordPress theme with blue-purple gradient design. Features clean typography, smooth animations, and a professional look matching the Bala Murali portfolio design.
Version: 1.0.0
Tested up to: 6.4
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: balamurali-theme
Tags: blog, one-column, two-columns, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks
*/

/* CSS Custom Properties - Color System from Portfolio */
:root {
  /* Modern Professional Color Palette */
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --primary-lighter: #60a5fa;
  
  --secondary-color: #7c3aed;
  --secondary-dark: #6d28d9;
  --secondary-light: #8b5cf6;
  
  --accent-color: #06b6d4;
  --accent-dark: #0891b2;
  
  /* Gradients */
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --secondary-gradient: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
  --hero-gradient: linear-gradient(135deg, #1e40af 0%, #6d28d9 100%);
  
  /* Neutral Colors */
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;
  
  /* Background Colors */
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-lighter: #f1f5f9;
  --bg-dark: #0f172a;
  --bg-overlay: rgba(255, 255, 255, 0.97);
  --bg-overlay-dark: rgba(15, 23, 42, 0.9);
  
  /* Accent Colors */
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  --accent-info: #06b6d4;
  
  /* Shadow System */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
  --shadow-colored: 0 10px 40px rgba(37, 99, 235, 0.2);
  
  /* Border Radius System */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  
  /* Spacing System */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 2.5rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  
  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

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

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

img {
  max-width: 100%;
  height: auto;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(20px);
  z-index: 1000;
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
  transition: box-shadow var(--transition-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.site-branding .site-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.site-branding .site-title a {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-branding .site-description {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Navigation */
.main-navigation ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--space-xl);
}

.main-navigation a {
  color: var(--text-primary);
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  position: relative;
}

.main-navigation a:hover {
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: all var(--transition-base);
  transform: translateX(-50%);
  border-radius: 1px;
}

.main-navigation a:hover::after {
  width: 80%;
}

.main-navigation .current-menu-item a,
.main-navigation .current_page_item a {
  color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--space-xs);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin: 5px 0;
  border-radius: 2px;
  transition: all var(--transition-base);
}

/* Main Content Area */
.site-main {
  padding: var(--space-3xl) 0;
  min-height: 60vh;
}

/* Posts & Articles */
article.post,
article.page {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-2xl);
  overflow: hidden;
  transition: all var(--transition-base);
  border: 1px solid rgba(37, 99, 235, 0.08);
}

article.post:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

article.post::before,
article.page::before {
  content: '';
  display: block;
  height: 4px;
  background: var(--primary-gradient);
}

.entry-header {
  padding: var(--space-lg) var(--space-xl);
  padding-bottom: var(--space-sm);
}

.entry-title {
  font-size: 1.75rem;
  margin-bottom: var(--space-sm);
}

.entry-title a {
  color: var(--text-primary);
}

.entry-title a:hover {
  color: var(--primary-color);
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.entry-meta a {
  color: var(--primary-color);
}

.post-thumbnail {
  margin: 0;
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

.entry-content {
  padding: var(--space-lg) var(--space-xl);
}

/* Hide sidebar widgets on homepage */
.home .widget-area,
.blog .widget-area {
  display: none;
}

.home .content-area,
.blog .content-area {
  flex: 1;
  max-width: 100%;
}

.entry-content p:last-child {
  margin-bottom: 0;
}

.entry-footer {
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg-light);
  border-top: 1px solid rgba(37, 99, 235, 0.08);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.entry-footer .cat-links,
.entry-footer .tags-links {
  display: inline-block;
  margin-right: var(--space-md);
}

.entry-footer a {
  color: var(--primary-color);
}

/* Read More Button */
.read-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--primary-gradient);
  color: var(--text-white) !important;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: all var(--transition-base);
}

.read-more:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  filter: brightness(1.1);
}

/* Sidebar */
.widget-area {
  padding-left: var(--space-xl);
}

.widget {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(37, 99, 235, 0.08);
  position: relative;
}

.widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.widget-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget li {
  padding: var(--space-xs) 0;
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

.widget li:last-child {
  border-bottom: none;
}

.widget a {
  color: var(--text-secondary);
}

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

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: var(--space-3xl) 0 var(--space-xl);
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xl);
}

.footer-info {
  flex: 1;
}

.footer-info .site-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

.footer-info .site-title a {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-info {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.site-info a {
  color: var(--primary-lighter);
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--text-white);
  transition: all var(--transition-base);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-social a:hover {
  background: var(--primary-gradient);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Pagination */
.pagination,
.posts-navigation,
.post-navigation {
  margin-top: var(--space-2xl);
  text-align: center;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-sm);
  background: var(--bg-white);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  margin: 0 4px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.page-numbers:hover,
.page-numbers.current {
  background: var(--primary-gradient);
  color: var(--text-white);
  box-shadow: var(--shadow-md);
}

/* Comments */
.comments-area {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  margin-top: var(--space-2xl);
  box-shadow: var(--shadow-md);
}

.comments-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-xl);
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment {
  padding: var(--space-lg);
  background: var(--bg-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.comment-author img {
  border-radius: 50%;
}

.comment-author .fn {
  font-weight: 600;
  color: var(--text-primary);
}

.comment-metadata {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.comment-respond {
  margin-top: var(--space-xl);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-light);
  border: 2px solid rgba(37, 99, 235, 0.15);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all var(--transition-base);
}

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

button,
input[type="submit"] {
  background: var(--primary-gradient);
  color: var(--text-white);
  border: none;
  padding: var(--space-sm) var(--space-xl);
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}

button:hover,
input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  filter: brightness(1.1);
}

/* Search Form */
.search-form {
  display: flex;
  gap: var(--space-sm);
}

.search-form .search-field {
  flex: 1;
}

.search-form .search-submit {
  flex-shrink: 0;
}

/* WordPress Blocks Overrides */
.wp-block-button__link {
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  padding: var(--space-sm) var(--space-xl);
  transition: all var(--transition-base);
}

.wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.wp-block-quote {
  border-left: 4px solid var(--primary-color);
  padding-left: var(--space-lg);
  font-style: italic;
  color: var(--text-secondary);
}

.wp-block-code {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .site-main {
    padding: var(--space-2xl) 0;
  }

  .widget-area {
    padding-left: 0;
    margin-top: var(--space-2xl);
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    display: none;
  }

  .main-navigation.toggled {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
    padding: var(--space-md);
    gap: 0;
  }

  .main-navigation li {
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
  }

  .main-navigation li:last-child {
    border-bottom: none;
  }

  .main-navigation a {
    display: block;
    padding: var(--space-sm);
  }

  .header-inner {
    padding: var(--space-sm) var(--space-md);
  }

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

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }

  .entry-title {
    font-size: 1.5rem;
  }

  article.post,
  article.page {
    margin-bottom: var(--space-xl);
  }

  .entry-header,
  .entry-content {
    padding: var(--space-lg);
  }

  .entry-footer {
    padding: var(--space-md) var(--space-lg);
  }
}

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

  .entry-meta {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .widget {
    padding: var(--space-lg);
  }
}

/* Utility Classes */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.alignleft {
  float: left;
  margin-right: var(--space-lg);
  margin-bottom: var(--space-md);
}

.alignright {
  float: right;
  margin-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

