/* CSS Fundamentals Website Styles */

/* Base Styles and Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: #3498db;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}
/* SFRCeyNoIWRkM25fIW5fYyQkfQo= */
h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 4px;
    background-color: #3498db;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.primary-btn {
    background-color: #3498db;
    font-weight: 600;
    padding: 12px 24px;
}

/* Header and Navigation */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3498db;
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: #333;
    font-weight: 500;
    position: relative;
}

.nav-links a:hover {
    color: #3498db;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.nav-links a:hover:after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s forwards;
}

.highlight {
    color: #f1c40f;
    position: relative;
    z-index: 1;
}

.highlight:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -5px;
    right: -5px;
    height: 10px;
    background-color: rgba(241, 196, 15, 0.3);
    z-index: -1;
    transform: rotate(-2deg);
}

/* Section Styling */
.section {
    padding: 80px 0;
}

.section.alternate {
    background-color: white;
}

.content-box {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 30px;
}

.text-content {
    flex: 1;
    min-width: 300px;
}

.image-content {
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.css-demo-box {
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.css-example {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    font-family: monospace;
}

.result-preview {
    background-color: white;
    padding: 20px;
    text-align: center;
}

/* Property Cards */
.property-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.property-card {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.property-card h3 {
    margin-bottom: 10px;
    color: #3498db;
}

.property-example {
    margin-top: 15px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    font-family: monospace;
}

.property-example code {
    display: block;
    margin-bottom: 5px;
    color: #e74c3c;
}

/* Color Card Specific */
#color-card {
    border-top: 4px solid #3498db;
}

/* Layout Card Specific */
#layout-card {
    border-top: 4px solid #2ecc71;
}

/* Typography Card Specific */
#typography-card {
    border-top: 4px solid #9b59b6;
}

/* Effects Card Specific */
#effects-card {
    border-top: 4px solid #e74c3c;
}

/* Examples Section */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.example-item h3 {
    margin-bottom: 15px;
    text-align: center;
}

.example-preview {
    padding: 30px;
    border-radius: 8px;
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.no-css {
    background-color: white;
    border: 1px solid #ddd;
    font-family: Times New Roman, serif;
}

.no-css h4 {
    font-weight: normal;
    margin-bottom: 10px;
}

.no-css button {
    margin-top: 15px;
    padding: 5px 10px;
    background-color: #ddd;
    border: 1px solid #999;
}

.with-css {
    background-color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.with-css h4 {
    color: #3498db;
    font-size: 1.4rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #f1c40f;
    padding-bottom: 5px;
    display: inline-block;
}

.with-css p {
    line-height: 1.7;
    color: #555;
}

.with-css button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
}

.with-css button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.4);
}

/* Interactive Demo Section */
.interactive-demo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.code-editor, .preview-area {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.code-editor h3, .preview-area h3 {
    margin-bottom: 15px;
    color: #3498db;
}

#css-input {
    width: 100%;
    height: 200px;
    padding: 15px;
    font-family: monospace;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
    margin-bottom: 15px;
    background-color: #f8f9fa;
}

.demo-element {
    background-color: #3498db;
    color: white;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    font-size: 18px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.hint {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.hint code {
    background-color: #eee;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
    color: #e74c3c;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 40px 0;
    text-align: center;
}

footer a {
    color: #3498db;
}

footer a:hover {
    color: #f1c40f;
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .content-box, .property-cards, .examples-grid, .interactive-demo {
        gap: 20px;
    }
    
    .property-card, .example-item, .code-editor, .preview-area {
        padding: 20px;
    }
}