<?php
/**
 * Plugin Name: Rethink Aadhaar Theme
 * Description: Dark campaign theme styling for Rethink Aadhaar WordPress site.
 */
add_action('wp_enqueue_scripts', function() {
    wp_register_style('ra-theme', false);
    wp_add_inline_style('ra-theme', <<<CSS
/* === Rethink Aadhaar Custom Theme === */
body {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
}
.site-header {
    background-color: #111 !important;
    border-bottom: 3px solid #c0392b !important;
}
.main-navigation .main-nav ul li a,
.main-navigation .main-nav ul li > a {
    color: #fff !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 14px !important;
    letter-spacing: 1px !important;
}
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li:hover > a {
    color: #c0392b !important;
    background-color: rgba(192,57,43,0.1) !important;
}
.site-title a,
.site-title {
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 32px !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
}
.site-description {
    color: #999 !important;
    font-style: italic !important;
}
.inside-article,
.separate-containers .comments-area,
.separate-containers .page-header,
.one-container .site-content,
.separate-containers .inside-article {
    background-color: #222 !important;
    border: 1px solid #333 !important;
    border-radius: 8px !important;
    padding: 30px !important;
    margin-bottom: 25px !important;
}
.entry-title a,
.entry-title,
.page .entry-title {
    color: #fff !important;
    font-weight: 700 !important;
}
.entry-title a:hover {
    color: #c0392b !important;
}
.entry-content,
.entry-summary {
    color: #ccc !important;
    line-height: 1.8 !important;
}
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    color: #fff !important;
    margin-top: 1.5em !important;
}
.entry-content a {
    color: #e74c3c !important;
    border-bottom: 1px solid transparent !important;
}
.entry-content a:hover {
    color: #ff6b6b !important;
    border-bottom-color: #ff6b6b !important;
}
.site-footer,
.site-info {
    background-color: #111 !important;
    color: #777 !important;
    border-top: 3px solid #c0392b !important;
}
button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.wp-block-button__link,
.button {
    background-color: #c0392b !important;
    color: #fff !important;
    border-radius: 5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 12px 28px !important;
    border: none !important;
    cursor: pointer !important;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.wp-block-button__link:hover {
    background-color: #e74c3c !important;
}
.widget {
    background-color: #222 !important;
    border: 1px solid #333 !important;
    border-radius: 8px !important;
    padding: 20px !important;
}
.widget-title {
    color: #fff !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #c0392b !important;
    padding-bottom: 10px !important;
}
ul, ol { color: #ccc !important; }
blockquote {
    border-left: 4px solid #c0392b !important;
    background-color: #2a2a2a !important;
    color: #bbb !important;
    padding: 15px 20px !important;
    border-radius: 0 5px 5px 0 !important;
}
code {
    background-color: #333 !important;
    color: #e74c3c !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
}
table td, table th {
    border: 1px solid #444 !important;
    padding: 10px !important;
    color: #ccc !important;
}
table th {
    background-color: #c0392b !important;
    color: #fff !important;
}
::selection {
    background-color: #c0392b !important;
    color: #fff !important;
}
/* Fix white backgrounds from theme defaults */
.inside-header,
.header-widget,
.page-header {
    background-color: transparent !important;
}
body:not(.blog):not(.single) .site-main > article:first-of-type {
    margin-top: 0 !important;
}
CSS
);
    wp_enqueue_style('ra-theme');
}, 100);

// Hide page title on homepage only
add_action('wp_head', function() {
    if (is_page(159)) {
        echo '<style>.page-id-159 .entry-title { display: none !important; }</style>';
    }
});
