* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* LTR (Left-to-Right) default styles */
body.ltr {
    direction: ltr;
    text-align: left;
}

body.ltr .PhiH-general-header,
body.ltr .PhiH-lesson1-content-section,
body.ltr .PhiH-lesson1-definition-box,
body.ltr .PhiH-lesson1-table th,
body.ltr .PhiH-lesson1-table td {
    text-align: left;
}

body.ltr .PhiH-general-logo {
    margin-right: 10px;
    margin-left: 0;
}

body.ltr .PhiH-lesson1-resource-list li {
    padding-left: 1.5rem;
    padding-right: 0;
}

body.ltr .PhiH-lesson1-resource-list li:before {
    left: 0;
    right: auto;
}

/* RTL (Right-to-Left) styles */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .PhiH-general-header,
body.rtl .PhiH-lesson1-content-section,
body.rtl .PhiH-lesson1-definition-box,
body.rtl .PhiH-lesson1-table th,
body.rtl .PhiH-lesson1-table td {
    text-align: right;
}

body.rtl .PhiH-general-logo {
    margin-right: 0;
    margin-left: 10px;
}

body.rtl .PhiH-lesson1-resource-list li {
    padding-left: 0;
    padding-right: 1.5rem;
}

body.rtl .PhiH-lesson1-resource-list li:before {
    left: auto;
    right: 0;
}

body.rtl .PhiH-lesson1-close-btn {
    right: auto;
    left: 30px;
}

body.rtl .PhiH-lesson1-definition-box {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

/* 3-column header layout */
.PhiH-general-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 0;
    box-shadow: var(--box-shadow);
    border-bottom: 4px solid var(--accent-color);
    position: relative;
    overflow: hidden;
}

.PhiH-general-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.PhiH-general-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.PhiH-general-logo-container {
    display: flex;
    align-items: center;
}

.PhiH-general-logo {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
    cursor: pointer;
}

.PhiH-general-logo:hover {
    transform: scale(1.05);
}

.PhiH-general-title-container {
    text-align: center;
}

.PhiH-general-title-container h1 {
    font-size: 2.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin: 0;
    background: linear-gradient(45deg, #ffffff, #e0f7fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.PhiH-general-header-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: flex-end;
}

/* RTL adjustments for 3-column layout */
body.rtl .PhiH-general-header-controls {
    justify-content: flex-start;
}

.PhiH-general-language-selector {
    position: relative;
}

.PhiH-general-language-dropdown {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    min-width: 120px;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background-color: rgba(0, 0, 0, 0.7) !important;
    color: white !important;
}

.PhiH-general-language-dropdown option {
    background-color: var(--primary-color);
    color: white;
}

.PhiH-general-language-dropdown:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.PhiH-general-theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.PhiH-theme-toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.PhiH-theme-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.PhiH-theme-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.PhiH-theme-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: .4s;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.PhiH-theme-toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .PhiH-theme-toggle-slider {
    background-color: var(--accent-color);
}

input:checked + .PhiH-theme-toggle-slider:before {
    transform: translateX(26px);
}

.PhiH-lesson1-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.PhiH-lesson1-header {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--definition-bg) 100%);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    border-left: 5px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.PhiH-lesson1-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.PhiH-lesson1-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--heading-color);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.PhiH-lesson1-level {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    background: var(--light-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.PhiH-lesson1-content-section {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--light-color) 100%);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.PhiH-lesson1-content-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.PhiH-lesson1-content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.PhiH-lesson1-section-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid var(--secondary-color);
    font-size: 1.8rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
}

.PhiH-lesson1-section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

.PhiH-lesson1-definition-box {
    background: linear-gradient(135deg, var(--definition-bg) 0%, var(--light-color) 100%);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    box-shadow: var(--box-shadow);
    border-top: 3px solid var(--secondary-color);
    position: relative;
}

body.ltr .PhiH-lesson1-definition-box {
    border-left: 5px solid var(--primary-color);
}

body.rtl .PhiH-lesson1-definition-box {
    border-right: 5px solid var(--primary-color);
}

.PhiH-lesson1-definition-box::before {
    content: '💡';
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.PhiH-lesson1-definition-title {
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.PhiH-general-footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    color: white;
    margin-top: 3rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.PhiH-general-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

.PhiH-general-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.PhiH-general-footer-column h4 {
    color: var(--accent-color);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.PhiH-general-footer-column p {
    margin: 0.3rem 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.PhiH-general-footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.PhiH-general-footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s ease;
    padding: 0.15rem 0;
    font-size: 0.9rem;
}

.PhiH-general-footer-links a:hover {
    opacity: 1;
    color: var(--accent-color);
    transform: translateX(5px);
}

.PhiH-general-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem 2rem;
    text-align: center;
    background: rgba(0,0,0,0.1);
}

.PhiH-general-footer-bottom p {
    margin: 0;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* RTL Support for Footer */
body.rtl .PhiH-general-footer-links a:hover {
    transform: translateX(-5px);
}

/* Mobile responsiveness for 3-column header layout */
@media (max-width: 768px) {
    .PhiH-general-header-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
	}
    
    .PhiH-general-header-controls {
        justify-content: center;
	}
    
    .PhiH-general-title-container h1 {
        font-size: 2rem;
	}
    
    .PhiH-lesson1-container {
        padding: 1rem;
	}
    
    .PhiH-lesson1-content-section {
        padding: 1.8rem;
	}
    
    .PhiH-lesson1-header {
        padding: 2rem 1.5rem;
	}
    
    .PhiH-lesson1-title {
        font-size: 2rem;
	}
    
    .PhiH-general-header {
        padding: 2rem 0;
	}
    
    .PhiH-general-logo {
        width: 65px;
        height: 65px;
	}
    
    .PhiH-general-title-container h1 {
        font-size: 2.2rem;
	}
    
    .PhiH-general-footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1.5rem 1rem 1rem;
        gap: 1.5rem;
	}
    
    .PhiH-general-footer-links {
        align-items: center;
	}
    
    .PhiH-lesson1-section-title {
        font-size: 1.5rem;
	}
}

@media (max-width: 480px) {
    .PhiH-general-title-container h1 {
        font-size: 2rem;
	}
    
    .PhiH-general-logo {
        width: 55px;
        height: 55px;
	}
    
    .PhiH-general-header-controls {
        flex-direction: column;
        gap: 1rem;
	}
}

/* Enhanced text emphasis styles */
strong {
    font-weight: 700;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--light-color) 0%, transparent 100%);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

em {
    font-style: italic;
    color: var(--secondary-color);
    background: rgba(253, 203, 110, 0.1);
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
}

/* DARK MODE FIXES - Better contrast for emphasized text */
[data-theme="dark"] strong {
    color: var(--accent-color);
    background: rgba(162, 155, 254, 0.15);
    border-left: 3px solid var(--accent-color);
}

[data-theme="dark"] em {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

[data-theme="dark"] .PhiH-lesson1-definition-box strong {
    color: #ffffff;
    background: none;
}

[data-theme="dark"] .PhiH-lesson1-definition-box em {
    color: #ffd700;
    background: none;
}

/* Ensure good contrast in tables and content sections in dark mode */
[data-theme="dark"] .PhiH-lesson1-content-section strong {
    color: var(--accent-color);
}

[data-theme="dark"] .PhiH-lesson1-content-section em {
    color: #ffd700;
}

/* Fix for any other text elements that might have low contrast */
[data-theme="dark"] .PhiH-lesson1-definition-box,
[data-theme="dark"] .PhiH-lesson1-content-section {
    color: #e2e8f0;
}
/* Enhanced Styling for Related Quotes and Texts */
.PhiH-quotes-container {
	margin-top: 2rem;
}

.PhiH-quotes-section-title {
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--primary-color);
	margin-bottom: 1.5rem;
	text-align: center;
	position: relative;
	padding-bottom: 0.8rem;
}

.PhiH-quotes-section-title::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 80px;
	height: 3px;
	background: var(--gradient-primary);
	border-radius: 2px;
}

.PhiH-quotes-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 1.5rem;
	margin-top: 1rem;
}

.PhiH-quote-card {
	background-color: var(--card-bg);
	border-radius: var(--border-radius);
	box-shadow: var(--box-shadow);
	padding: 1.8rem;
	transition: all 0.3s ease;
	border: 1px solid var(--border-color);
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.PhiH-quote-card::before {
	content: '"';
	position: absolute;
	top: 10px;
	left: 15px;
	font-size: 4rem;
	color: var(--primary-color);
	opacity: 0.15;
	font-family: Georgia, serif;
	line-height: 1;
}

.PhiH-quote-card:hover {
	transform: translateY(-7px);
	box-shadow: 0 15px 30px rgba(60, 179, 113, 0.25);
}

.PhiH-quote-text {
	font-style: italic;
	line-height: 1.7;
	margin-bottom: 1.2rem;
	position: relative;
	z-index: 1;
	flex-grow: 1;
	font-size: 1.05rem;
}

.PhiH-quote-author {
	font-weight: 600;
	color: var(--accent-color);
	text-align: right;
	margin-top: auto;
	padding-top: 1rem;
	border-top: 1px dashed var(--border-color);
	font-size: 0.95rem;
}

.PhiH-quote-author::before {
	content: "— ";
}

.PhiH-quote-source {
	font-size: 0.85rem;
	color: var(--secondary-color);
	font-style: italic;
	margin-top: 0.3rem;
	text-align: right;
}

/* Different color variants for quote cards */
.PhiH-quote-card:nth-child(3n+1) {
	border-top: 4px solid var(--primary-color);
}

.PhiH-quote-card:nth-child(3n+2) {
	border-top: 4px solid var(--accent-color);
}

.PhiH-quote-card:nth-child(3n+3) {
	border-top: 4px solid var(--secondary-color);
}

/* RTL support for quotes */
body.rtl .PhiH-quote-card::before {
	left: auto;
	right: 15px;
}

body.rtl .PhiH-quote-author {
	text-align: left;
}

body.rtl .PhiH-quote-source {
	text-align: left;
}

@media (max-width: 768px) {
	.PhiH-quotes-grid {
		grid-template-columns: 1fr;
	}
	
	.PhiH-quote-card {
		padding: 1.5rem;
	}
	
	.PhiH-quotes-section-title {
		font-size: 1.3rem;
	}
}

@media (max-width: 480px) {
	.PhiH-quote-card {
		padding: 1.2rem;
	}
	
	.PhiH-quote-text {
		font-size: 1rem;
	}
}
/* Texts Section Styling */
.PhiH-texts-container {
	margin-top: 1rem;
}

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

.PhiH-text-item {
	margin-bottom: 0.8rem;
	border-left: 3px solid var(--primary-color);
	transition: all 0.3s ease;
}

.PhiH-text-item:hover {
	border-left-color: var(--accent-color);
	transform: translateX(5px);
}

.PhiH-text-link {
	display: block;
	padding: 1rem 1.5rem;
	background-color: var(--card-bg);
	border-radius: 0 var(--border-radius) var(--border-radius) 0;
	text-decoration: none;
	color: var(--text-color);
	transition: all 0.3s ease;
	border: 1px solid var(--border-color);
	border-left: none;
}

.PhiH-text-link:hover {
	background-color: var(--definition-bg);
	color: var(--primary-color);
	box-shadow: var(--box-shadow);
}

/* RTL support for texts */
body.rtl .PhiH-text-item {
	border-left: none;
	border-right: 3px solid var(--primary-color);
}

body.rtl .PhiH-text-item:hover {
	border-right-color: var(--accent-color);
	transform: translateX(-5px);
}

body.rtl .PhiH-text-link {
	border-radius: var(--border-radius) 0 0 var(--border-radius);
	border: 1px solid var(--border-color);
	border-right: none;
}

@media (max-width: 768px) {
	.PhiH-text-link {
		padding: 0.8rem 1rem;
	}
}
/* Authors Button Styles */
.PhiH-general-authors-link {
    margin-right: 1rem;
}

.PhiH-general-authors-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.PhiH-general-authors-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
    color: white;
}

.PhiH-general-authors-icon {
    font-size: 1.1rem;
}

/* Responsive adjustments for header */
@media (max-width: 768px) {
    .PhiH-general-header-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
	}
    
    .PhiH-general-authors-link {
        margin-right: 0;
        order: 1;
        width: 100%;
        margin-bottom: 0.5rem;
	}
    
    .PhiH-general-authors-btn {
        justify-content: center;
        width: 100%;
	}
}

/* New Windows Bar Styles */
.PhiH-windows-bar {
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	padding: 0.5rem 2rem;
	display: flex;
	align-items: center;
	gap: 1rem;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .PhiH-windows-bar {
	background: rgba(45, 52, 54, 0.9);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.PhiH-window-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	color: var(--text-color);
	font-weight: 500;
}

.PhiH-window-item:hover {
	background: rgba(108, 92, 231, 0.1);
	color: var(--primary-color);
}

.PhiH-window-item.active {
	background: var(--primary-color);
	color: white;
}

.PhiH-window-icon {
	font-size: 1.1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.PhiH-homepage-title {
		font-size: 2.5rem;
	}
	
	.PhiH-homepage-subtitle {
		font-size: 1.2rem;
	}
	
	.PhiH-homepage-cards {
		flex-direction: column;
		align-items: center;
	}
	
	.PhiH-homepage-card {
		width: 100%;
		max-width: 350px;
	}
	
	.PhiH-homepage-modal-content {
		width: 90%;
		margin: 10% auto;
	}
	
	.PhiH-windows-bar {
		padding: 0.5rem 1rem;
		gap: 0.5rem;
		flex-wrap: wrap;
		justify-content: center;
	}
	
	.PhiH-window-item {
		padding: 0.4rem 0.8rem;
		font-size: 0.9rem;
	}
}