/*
MCT Cyber Ocean Child Theme Styles
*/

/*--------------------------------------------------------------
# Variables
--------------------------------------------------------------*/
:root {
	--mct-deep-blue: #0a192f;
	--mct-sea-green: #64ffda;
	--mct-graphite: #1e2a3a;
	--mct-light-gray: #ccd6f6;
	--mct-white: #ffffff;
	--mct-black: #000000;

	--mct-font-primary: "Inter", sans-serif;
	--mct-font-mono: "JetBrains Mono", monospace;

	--mct-border-radius: 4px;
	--mct-transition: all 0.3s ease-in-out;
}

/*--------------------------------------------------------------
# Base Styles & Dark Mode Defaults
--------------------------------------------------------------*/
body {
	background-color: var(--mct-graphite);
	color: var(--mct-light-gray);
	font-family: var(--mct-font-primary);
	line-height: 1.7;
	transition: var(--mct-transition);
	font-size: 16px; /* Base font size */
}

/* Light mode override (when .light-mode is added) */
body:not(.dark-mode) {
	background-color: var(--mct-white);
	color: var(--mct-deep-blue);
}
body:not(.dark-mode) a {
    color: var(--mct-deep-blue); /* Adjust link color for light mode */
}
body:not(.dark-mode) a:hover {
    color: var(--mct-sea-green);
}
body:not(.dark-mode) .site-header,
body:not(.dark-mode) .site-footer {
    background-color: var(--mct-light-gray); /* Light header/footer */
    color: var(--mct-deep-blue);
}
body:not(.dark-mode) .site-title a,
body:not(.dark-mode) .site-description {
    color: var(--mct-deep-blue);
}
body:not(.dark-mode) .main-navigation .main-nav ul li a {
    color: var(--mct-deep-blue);
}
body:not(.dark-mode) .main-navigation .main-nav ul li a:hover,
body:not(.dark-mode) .main-navigation .main-nav ul li.current-menu-item > a {
    color: var(--mct-sea-green);
}
body:not(.dark-mode) .widget {
    background-color: #f0f0f0; /* Lighter widget background */
    border-color: #ddd;
}
body:not(.dark-mode) .widget-title {
    color: var(--mct-deep-blue);
}
body:not(.dark-mode) .tide-toggle {
    color: var(--mct-deep-blue);
    border-color: var(--mct-deep-blue);
}
body:not(.dark-mode) .tide-toggle:hover {
    background-color: var(--mct-deep-blue);
    color: var(--mct-white);
}
body:not(.dark-mode) .wp-block-button__link {
    background-color: var(--mct-deep-blue);
    color: var(--mct-white);
}
body:not(.dark-mode) .wp-block-button__link:hover {
    background-color: var(--mct-sea-green);
    color: var(--mct-deep-blue);
}
/* Theme color overrides for light mode */
body:not(.dark-mode) .has-sea-green-color { color: var(--mct-deep-blue); }
body:not(.dark-mode) .has-light-gray-color { color: var(--mct-graphite); }
body:not(.dark-mode) .has-graphite-background-color { background-color: #f0f0f0; }
body:not(.dark-mode) .has-deep-blue-background-color { background-color: #e0e0e0; }


/*--------------------------------------------------------------
# Links
--------------------------------------------------------------*/
a {
	color: var(--mct-sea-green);
	text-decoration: none;
	transition: var(--mct-transition);
}

a:hover,
a:focus {
	color: var(--mct-light-gray);
	text-decoration: underline;
}

/*--------------------------------------------------------------
# Typography
--------------------------------------------------------------*/
h1, h2, h3, h4, h5, h6 {
	color: var(--mct-light-gray);
	font-family: var(--mct-font-primary);
	font-weight: 700;
	margin-bottom: 0.5em;
}

code, pre {
	font-family: var(--mct-font-mono);
	background-color: var(--mct-deep-blue);
	padding: 0.2em 0.4em;
	border-radius: var(--mct-border-radius);
	font-size: 0.9em;
}
pre {
	padding: 1em;
	overflow-x: auto;
}

/*--------------------------------------------------------------
# Layout & Structure
--------------------------------------------------------------*/
.site {
	max-width: 1600px;
	margin: 0 auto;
	overflow-x: hidden;
}

/* Social Share Component */
.mct-social-share {
	margin: 2rem 0;
	padding: 1.5rem;
	border-radius: 8px;
	background-color: var(--mct-deep-blue);
	border: 1px solid var(--mct-graphite);
}

.social-share-title {
	margin-top: 0;
	color: var(--mct-sea-green);
	font-size: 1.1rem;
}

.social-share-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	padding: 0;
	margin: 1rem 0 0 0;
	list-style: none;
}

.social-share-item a {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: var(--mct-graphite);
	transition: all 0.2s ease;
}

.social-share-item a .dashicons {
	color: var(--mct-light-gray);
	font-size: 1.2rem;
	transition: color 0.2s ease;
}

.social-twitter a:hover {
	background-color: #1DA1F2;
}

.social-facebook a:hover {
	background-color: #4267B2;
}

.social-linkedin a:hover {
	background-color: #0077B5;
}

.social-email a:hover {
	background-color: var(--mct-sea-green);
}

.social-share-item a:hover .dashicons {
	color: #fff;
	transform: scale(1.1);
}

/* Add additional styling as needed */

.site-content {
	padding-top: 2rem;
	padding-bottom: 2rem;
}

/* Floating card effect for content areas */
.entry-content,
.comment-content,
.widget,
article,
.comments-area {
	background-color: var(--mct-deep-blue); /* Slightly lighter than graphite */
	padding: 1.5rem;
	border-radius: var(--mct-border-radius);
	margin-bottom: 1.5rem;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--mct-graphite); /* Subtle border */
}
body:not(.dark-mode) .entry-content,
body:not(.dark-mode) .comment-content,
body:not(.dark-mode) .widget,
body:not(.dark-mode) article,
body:not(.dark-mode) .comments-area {
    background-color: var(--mct-white);
    border-color: #e0e0e0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}


/*--------------------------------------------------------------
# Header & Navigation
--------------------------------------------------------------*/
.site-header {
	background-color: var(--mct-deep-blue);
	padding: 1rem 0;
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: var(--mct-transition);
}

.site-header .inside-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Add container width from GeneratePress if needed */
    max-width: 1200px; /* Example */
    margin: 0 auto;
    padding: 0 1rem;
}

.site-title a {
	color: var(--mct-sea-green);
	font-weight: 700;
	font-size: 1.5rem;
}
.site-title a:hover {
    color: var(--mct-light-gray);
    text-decoration: none;
}

.site-description {
	color: var(--mct-light-gray);
	font-size: 0.9rem;
	margin-left: 1rem; /* Adjust spacing */
}

/* Style GeneratePress Navigation */
.main-navigation .main-nav ul li a {
	color: var(--mct-light-gray);
	padding: 0.5em 1em;
	transition: var(--mct-transition);
}

.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li.current-menu-item > a {
	color: var(--mct-sea-green);
	background-color: var(--mct-graphite);
	border-radius: var(--mct-border-radius);
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.site-footer {
	background-color: var(--mct-deep-blue);
	color: var(--mct-light-gray);
	padding: 2rem 0;
	text-align: center;
	font-size: 0.9rem;
    transition: var(--mct-transition);
}

.site-footer .inside-footer {
    max-width: 1200px; /* Example */
    margin: 0 auto;
    padding: 0 1rem;
}

.site-footer a {
	color: var(--mct-sea-green);
}
.site-footer a:hover {
	color: var(--mct-white);
}

/*--------------------------------------------------------------
# Sidebar
--------------------------------------------------------------*/
.sidebar .widget {
	background-color: var(--mct-deep-blue);
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	border-radius: var(--mct-border-radius);
    border: 1px solid var(--mct-graphite);
    transition: var(--mct-transition);
}

.widget-title {
	color: var(--mct-sea-green);
	margin-bottom: 1rem;
	font-size: 1.2rem;
	border-bottom: 1px solid var(--mct-graphite);
	padding-bottom: 0.5rem;
}

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

.widget ul li {
	margin-bottom: 0.5rem;
}

.widget ul li a {
	color: var(--mct-light-gray);
}
.widget ul li a:hover {
	color: var(--mct-sea-green);
}

/*--------------------------------------------------------------
# Tide Mode Toggle Button
--------------------------------------------------------------*/
.tide-toggle {
	background-color: transparent;
	color: var(--mct-sea-green);
	border: 1px solid var(--mct-sea-green);
	padding: 0.5rem 0.8rem;
	border-radius: var(--mct-border-radius);
	cursor: pointer;
	transition: var(--mct-transition);
	font-size: 1rem;
    line-height: 1;
    margin-left: 1rem; /* Space it from navigation */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.tide-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: var(--mct-sea-green);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.4s ease-out, height 0.4s ease-out, opacity 0.4s ease-out;
    z-index: -1;
}

.tide-toggle:hover {
	color: var(--mct-deep-blue);
}

.tide-toggle:hover::before {
    width: 150%;
    height: 150%;
    opacity: 1;
}

.tide-toggle .dashicons {
    vertical-align: middle;
    transition: transform 0.3s ease;
}

/* Dark mode has wave icon, light mode has moon icon */
body.dark-mode .tide-toggle .dashicons-admin-customizer {
    display: inline-block;
}

body.dark-mode .tide-toggle .dashicons-moon {
    display: none;
}

body:not(.dark-mode) .tide-toggle .dashicons-admin-customizer {
    display: none;
}

body:not(.dark-mode) .tide-toggle .dashicons-moon {
    display: inline-block;
}

/* Style adjustments for light mode */
body:not(.dark-mode) .tide-toggle {
    color: var(--mct-deep-blue);
    border-color: var(--mct-deep-blue);
}

body:not(.dark-mode) .tide-toggle::before {
    background-color: var(--mct-deep-blue);
}

body:not(.dark-mode) .tide-toggle:hover {
    color: var(--mct-white);
}

/*--------------------------------------------------------------
# Block Patterns & Custom Classes
--------------------------------------------------------------*/

/* General Button Style */
.wp-block-button__link.wave-button {
	transition: var(--mct-transition);
    border-radius: var(--mct-border-radius);
    font-weight: bold;
}
.wp-block-button__link.wave-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(100, 255, 218, 0.3); /* Sea green glow */
}

/* Hero Banner */
.hero-wave {
	/* Specific styles if needed beyond cover block settings */
    position: relative; /* For potential pseudo-elements */
}
.hero-wave .wp-block-cover__inner-container {
    z-index: 1; /* Ensure content is above overlay */
}

/* Call to Action Banner */
.cta-banner {
	/* Styles for the group block */
    border-radius: var(--mct-border-radius);
}
.cta-banner h2 {
    margin-bottom: 0.5em;
}

/* Podcast Embed Container */
.podcast-container {
	border: 1px solid var(--mct-graphite);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}
.podcast-container .wp-block-audio audio {
    width: 100%; /* Make audio player responsive */
}
.podcast-container figcaption {
    font-size: 0.85em;
    color: var(--mct-light-gray);
    opacity: 0.8;
    text-align: center;
    margin-top: 0.5rem;
}

/*--------------------------------------------------------------
# Editor Styles (Consistency)
--------------------------------------------------------------*/
/* Apply base dark theme to editor */
.editor-styles-wrapper {
	background-color: var(--mct-graphite);
	color: var(--mct-light-gray);
	font-family: var(--mct-font-primary);
    line-height: 1.7;
}

.editor-styles-wrapper a {
	color: var(--mct-sea-green);
}
.editor-styles-wrapper a:hover {
	color: var(--mct-light-gray);
}

.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6 {
	color: var(--mct-light-gray);
    font-weight: 700;
}

/* Match block styles */
/* Use higher specificity selectors instead of !important */
.editor-styles-wrapper .wp-block-group.has-graphite-background-color {
    background-color: var(--mct-graphite);
}

.editor-styles-wrapper .wp-block-group.podcast-container {
    border: 1px solid var(--mct-graphite);
    border-radius: var(--mct-border-radius);
    padding: 1.5rem; /* Match frontend */
}

/* Color classes with better specificity */
body .editor-styles-wrapper .has-sea-green-color { color: var(--mct-sea-green); }
body .editor-styles-wrapper .has-light-gray-color { color: var(--mct-light-gray); }
body .editor-styles-wrapper .has-deep-blue-color { color: var(--mct-deep-blue); }

body .editor-styles-wrapper .wp-block-button__link.wave-button {
    background-color: var(--mct-sea-green);
    color: var(--mct-deep-blue);
    border-radius: var(--mct-border-radius);
    font-weight: bold;
}

/* Ensure editor background matches body */
.is-root-container > .wp-block-post-content,
.block-editor-writing-flow {
    background-color: var(--mct-graphite);
    color: var(--mct-light-gray);
}

/* Style the default block appender */
.block-editor-inserter__toggle.has-icon {
    color: var(--mct-sea-green);
    background: var(--mct-deep-blue);
    border: 1px solid var(--mct-sea-green);
}
.block-editor-inserter__toggle.has-icon:hover {
    background: var(--mct-sea-green);
    color: var(--mct-deep-blue);
}

/*--------------------------------------------------------------
# Responsive Adjustments
--------------------------------------------------------------*/
/* Tablet Styles */
@media (max-width: 1024px) {
    /* Ocean Shell Layout */
    .ocean-shell-columns {
        flex-wrap: wrap;
    }

    .ocean-shell-columns .left-channel,
    .ocean-shell-columns .right-channel {
        flex-basis: 30% !important;
    }

    .ocean-shell-columns .center-channel {
        flex-basis: 40% !important;
    }

    /* Tech Support CTA */
    .tech-support-cta {
        padding: 1.5rem !important;
    }

    /* Social Share Component */
    .mct-social-share {
        padding: 1.25rem;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
	body {
		font-size: 15px;
	}

    /* Header & Navigation */
    .site-header .inside-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .site-branding {
        margin-bottom: 1rem;
    }
    .main-navigation {
        width: 100%; /* Ensure nav takes full width */
    }
    .tide-toggle {
        position: absolute;
        top: 1rem;
        right: 1rem;
        margin-left: 0;
    }

    /* General Layout */
	.site-content {
		padding-top: 1rem;
		padding-bottom: 1rem;
	}
    .entry-content,
    .comment-content,
    .widget,
    article,
    .comments-area {
        padding: 1rem;
    }

    /* Ocean Shell Layout - Mobile stack */
    .ocean-shell-columns {
        flex-direction: column;
    }
    .ocean-shell-columns .left-channel,
    .ocean-shell-columns .center-channel,
    .ocean-shell-columns .right-channel {
        flex-basis: 100% !important;
        width: 100% !important;
        margin-bottom: 1.5rem;
    }
    
    /* Left channel becomes optional on mobile */
    .ocean-shell-columns .left-channel {
        display: none; /* Hide on mobile by default */
    }
    body.show-left-channel .ocean-shell-columns .left-channel {
        display: block; /* Can be toggled via JS if needed */
    }

    /* Block Patterns */
    .cta-banner .wp-block-columns {
        flex-direction: column;
    }
    .cta-banner .wp-block-column {
        width: 100% !important; /* Stack columns */
        flex-basis: auto !important;
        text-align: center;
    }
    .cta-banner .wp-block-buttons {
        justify-content: center !important;
        margin-top: 1rem;
    }

    /* Tech Support CTA */
    .tech-support-cta {
        padding: 1rem !important;
    }
    .tech-support-cta .wp-block-columns {
        gap: 0;
    }
    .tech-support-options {
        padding-left: 1rem;
    }

    /* Social Share Component */
    .mct-social-share {
        margin: 1.5rem 0;
        padding: 1rem;
    }
    .social-share-list {
        justify-content: center;
    }
    .social-share-title {
        text-align: center;
    }

    /* Featured Images */
    .hero-image {
        height: 30vh;
        min-height: 200px;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    /* Tide Toggle Button */
    .tide-toggle {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }
    
    /* Block Pattern Adjustments */
    .wp-block-button__link {
        padding: 0.6em 1em;
        font-size: 0.9em;
    }
    
    /* Social Share - better spacing for small screens */
    .social-share-item a {
        width: 36px;
        height: 36px;
    }
    
    /* Make sure text content has adequate spacing */
    h1, .h1 {
        font-size: 1.8rem;
    }
    h2, .h2 {
        font-size: 1.5rem;
    }
    .wp-block-post-content {
        padding: 0.5rem;
    }
}
