/*
 Theme Name:   ColorMag Child
 Theme URI:    https://inimino.org
 Description:  Child theme for ColorMag - Inimino news site
 Author:       Inimino
 Author URI:   https://inimino.org
 Template:     colormag
 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:  colormag-child
*/

/* ==========================================================================
   Custom styles for Inimino.org
   ========================================================================== */

/* Primary brand color - Calm sage green */
:root {
    --inimino-primary: #5D8A66;
    --inimino-secondary: #4A7052;
}

/* Links color */
a {
    color: var(--inimino-primary);
}

a:hover {
    color: var(--inimino-secondary);
}

/* Category labels */
.cat-links a,
.category-slide a {
    background-color: var(--inimino-primary);
}

/* Buttons */
button,
input[type="submit"],
.btn {
    background-color: var(--inimino-primary);
}

button:hover,
input[type="submit"]:hover,
.btn:hover {
    background-color: var(--inimino-secondary);
}

/* Logo size - Desktop */
.custom-logo {
    max-height: 50px;
    width: auto;
}

.custom-logo-link img {
    max-height: 50px;
    width: auto;
}

/* Logo size - Mobile */
@media (max-width: 768px) {
    .custom-logo,
    .custom-logo-link img {
        max-height: 40px;
        width: auto;
    }
}

/* ==========================================================================
   Contact Page & WPForms Styles
   ========================================================================== */

/* Contact page form wrapper shadow */
.contact-form-wrapper {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.contact-form-wrapper:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

/* WPForms field styling */
.wpforms-container .wpforms-field input[type="text"],
.wpforms-container .wpforms-field input[type="email"],
.wpforms-container .wpforms-field textarea {
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 15px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fafafa;
}

.wpforms-container .wpforms-field input[type="text"]:focus,
.wpforms-container .wpforms-field input[type="email"]:focus,
.wpforms-container .wpforms-field textarea:focus {
    border-color: var(--inimino-primary);
    box-shadow: 0 0 0 3px rgba(93, 138, 102, 0.15);
    background-color: #ffffff;
    outline: none;
}

/* WPForms labels */
.wpforms-container .wpforms-field-label {
    font-weight: 600;
    color: #2d2d2d;
    margin-bottom: 8px;
    font-size: 14px;
}

/* WPForms submit button */
.wpforms-container .wpforms-submit-container button[type="submit"],
.wpforms-container button.wpforms-submit {
    background-color: var(--inimino-primary) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 14px 32px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    width: 100%;
    text-transform: none !important;
}

.wpforms-container .wpforms-submit-container button[type="submit"]:hover,
.wpforms-container button.wpforms-submit:hover {
    background-color: var(--inimino-secondary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 138, 102, 0.3);
}

/* WPForms textarea */
.wpforms-container .wpforms-field textarea {
    min-height: 150px;
    resize: vertical;
}

/* WPForms required indicator */
.wpforms-container .wpforms-required-label {
    color: #e74c3c;
}

/* WPForms success message */
.wpforms-confirmation-container-full {
    background-color: rgba(93, 138, 102, 0.1);
    border-left: 4px solid var(--inimino-primary);
    padding: 20px;
    border-radius: 8px;
}

/* Contact info cards hover effect */
.wp-block-group[style*="border-left-color:#5D8A66"] {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wp-block-group[style*="border-left-color:#5D8A66"]:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Social links styling for contact page */
.wp-block-social-links.has-icon-background-color .wp-social-link {
    transition: transform 0.3s ease;
}

.wp-block-social-links.has-icon-background-color .wp-social-link:hover {
    transform: scale(1.1);
}

/* Contact page responsive adjustments */
@media (max-width: 782px) {
    .contact-form-wrapper {
        padding: 25px !important;
    }

    .wp-block-columns {
        gap: 30px;
    }
}

/* ==========================================================================
   Privacy Policy Page Styles
   ========================================================================== */

/* Privacy page tables */
.wp-block-table.is-style-stripes {
    border-collapse: collapse;
    width: 100%;
    margin: 25px 0;
}

.wp-block-table.is-style-stripes table {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.wp-block-table.is-style-stripes thead {
    background-color: #5D8A66;
}

.wp-block-table.is-style-stripes thead th {
    color: #ffffff;
    font-weight: 600;
    padding: 14px 18px;
    text-align: left;
    border: none;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
    background-color: #f8f9fa;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(even) {
    background-color: #ffffff;
}

.wp-block-table.is-style-stripes tbody td {
    padding: 12px 18px;
    border: none;
    border-bottom: 1px solid #e5e5e5;
}

.wp-block-table.is-style-stripes tbody tr:last-child td {
    border-bottom: none;
}

/* Privacy highlight box */
.privacy-highlight {
    transition: transform 0.3s ease;
}

.privacy-highlight:hover {
    transform: translateX(5px);
}

/* Privacy page lists */
.page-template-page-builder ul li {
    margin-bottom: 10px;
}

/* Privacy page section spacing */
.page-template-page-builder h2 {
    scroll-margin-top: 100px;
}

/* Privacy page responsive */
@media (max-width: 782px) {
    .wp-block-table.is-style-stripes thead th,
    .wp-block-table.is-style-stripes tbody td {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* ==========================================================================
   Custom Footer Bar Styles
   ========================================================================== */

.inimino-footer-bar {
    background-color: #2d2d2d;
    padding: 20px 0;
    margin-top: 0;
}

.inimino-footer-bar .footer-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.inimino-footer-bar .footer-copyright {
    color: #a0a0a0;
    font-size: 14px;
}

.inimino-footer-bar .footer-copyright a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

.inimino-footer-bar .footer-copyright a:hover {
    color: var(--inimino-primary);
}

/* Footer Menu Links */
.inimino-footer-bar .footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inimino-footer-bar .footer-links li {
    margin: 0;
    padding: 0;
}

.inimino-footer-bar .footer-links li:not(:last-child)::after {
    content: "•";
    color: #555;
    margin-left: 8px;
}

.inimino-footer-bar .footer-links a {
    color: #a0a0a0;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.inimino-footer-bar .footer-links a:hover {
    color: var(--inimino-primary);
}

/* ==========================================================================
   Tool Pages — Full-Width Layout & Sizing
   Note: ColorMag sets html { font-size: 10px }, so we use px not rem
   ========================================================================== */

/* Remove sidebar, make primary full-width */
.page-template-page-tool .cm-primary {
    width: 100% !important;
    float: none !important;
}

.page-template-page-tool .cm-secondary {
    display: none !important;
}

/* Center the content row */
.page-template-page-tool .cm-row {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Tool page content area */
.page-template-page-tool .cm-posts {
    max-width: 100%;
}

/* Tool page headings */
.page-template-page-tool .cm-posts h1 {
    font-size: 36px;
    line-height: 1.25;
    margin-bottom: 12px;
}

.page-template-page-tool .cm-posts > h2:first-child,
.page-template-page-tool .cm-posts h2 {
    font-size: 28px;
    line-height: 1.3;
    margin-top: 40px;
    margin-bottom: 16px;
    color: #1f2937;
}

.page-template-page-tool .cm-posts > h2:first-child {
    font-size: 34px;
    margin-top: 0;
}

.page-template-page-tool .cm-posts h3 {
    font-size: 22px;
    margin-top: 32px;
    margin-bottom: 12px;
    color: #374151;
}

/* Larger body text on tool pages */
.page-template-page-tool .cm-posts p {
    font-size: 17px;
    line-height: 1.75;
    color: #4b5563;
    margin-bottom: 20px;
}

.page-template-page-tool .cm-posts ul,
.page-template-page-tool .cm-posts ol {
    font-size: 17px;
    line-height: 1.75;
    margin-bottom: 20px;
    padding-left: 24px;
}

.page-template-page-tool .cm-posts li {
    margin-bottom: 8px;
}

.page-template-page-tool .cm-posts code {
    font-size: 15px;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
}

.page-template-page-tool .cm-posts pre {
    font-size: 15px;
    background: #1f2937;
    color: #e5e7eb;
    padding: 20px 24px;
    border-radius: 8px;
    overflow-x: auto;
    line-height: 1.6;
    margin: 20px 0;
}

.page-template-page-tool .cm-posts a {
    font-weight: 500;
}

/* Tables on tool pages */
.page-template-page-tool .cm-posts table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
}

.page-template-page-tool .cm-posts table th {
    background: var(--inimino-primary);
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}

.page-template-page-tool .cm-posts table td {
    padding: 10px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.page-template-page-tool .cm-posts table tr:hover td {
    background: #f9fafb;
}

/* Separator between content and tool */
.page-template-page-tool #tool-container {
    border-top: 2px solid #e5e7eb;
    padding-top: 32px;
    margin-top: 32px;
}

/* Below-tool content area */
.page-template-page-tool .tool-below-content {
    max-width: 1100px;
    margin: 48px auto 0;
    padding-top: 40px;
    border-top: 2px solid #e5e7eb;
}

/* Hide ColorMag default footer bottom row (we use custom footer bar instead) */
.cm-footer-builder .cm-footer-bottom-row {
    display: none;
}

/* Footer Bar Responsive */
@media (max-width: 768px) {
    .inimino-footer-bar .footer-bar-inner {
        flex-direction: column;
        text-align: center;
    }

    .inimino-footer-bar .footer-links {
        justify-content: center;
    }
}
