/* CSS Variables & Reset */
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;500;600;700&display=swap');

:root {
    /* Brand Colors extracted from socrate.grades-education.eu */
    --bg-center: #0B4C5A;
    --bg-mid: #063B46;
    --bg-outer: #021C24;

    --text-heading: #FDF3DB;
    /* Cream */
    --text-body: #FDF8F2;
    /* Off-white */

    --primary: #5D001E;
    /* Burgundy */
    --primary-hover: #7A0028;

    --surface: rgba(255, 255, 255, 0.05);
    /* Glassy feel for cards */
    --border: rgba(253, 243, 219, 0.1);

    --gradient-main: radial-gradient(circle at top center, var(--bg-center), var(--bg-mid), var(--bg-outer));
    --gradient-text: linear-gradient(to right, #FDF3DB, #F0E68C);
    /* Cream to Gold */

    --radius: 50px;
    /* Pill shape for buttons */
    --radius-card: 16px;

    --font-main: 'Comfortaa', handwriting, system-ui, sans-serif;

    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: var(--font-main);
    color: var(--text-body);
    background: var(--bg-outer);
    background-image: var(--gradient-main);
    background-attachment: fixed;
    /* Keep gradient fixed while scrolling */
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    transition: background 0.2s, transform 0.2s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--text-heading);
    padding: 0.8rem 2rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    border: 2px solid var(--text-heading);
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(253, 243, 219, 0.1);
    transform: translateY(-2px);
}

.full-width {
    width: 100%;
}

/* Navigation */
.navbar {
    padding: 1.5rem 0;
    width: 100%;
    /* No solid background, let the page gradient show through, maybe slight glass */
    position: relative;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-heading);
}

.highlight {
    color: var(--text-heading);
    /* Or maybe a lighter teal? Keeping uniform for now */
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.lang-switch {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-switch a {
    text-decoration: none;
    font-size: 1.2rem;
    filter: grayscale(100%);
    transition: filter 0.2s, transform 0.2s;
    opacity: 0.6;
}

.lang-switch a:hover,
.lang-switch a.active-lang {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.nav-links a:not(.btn-primary) {
    color: var(--text-heading);
    font-weight: 600;
    opacity: 0.8;
}

.nav-links a:not(.btn-primary):hover {
    opacity: 1;
    color: white;
}

.nav-links .active {
    opacity: 1;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-toggle::after {
    content: "▼";
    font-size: 0.7em;
    opacity: 0.7;
    margin-top: 2px;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-mid);
    min-width: 250px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    z-index: 100;
    border-radius: var(--radius-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    overflow: hidden;
    padding: 0.5rem 0;
}

.dropdown-content a {
    color: var(--text-heading) !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-weight: 500 !important;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Mobile Dropdown styles */
@media (max-width: 768px) {
    .dropdown {
        flex-direction: column;
        align-items: stretch;
    }

    .dropdown-content {
        position: static;
        display: none;
        background: rgba(0, 0, 0, 0.2);
        box-shadow: none;
        margin-top: 0.5rem;
        width: 100%;
        border: none;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    .dropdown-toggle::after {
        transform: rotate(0deg);
        transition: transform 0.2s;
    }

    .dropdown.active .dropdown-toggle::after {
        transform: rotate(180deg);
    }
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.bar {
    width: 30px;
    height: 3px;
    background-color: var(--text-heading);
    border-radius: 3px;
}

/* Hero Section */
.hero {
    padding: 5rem 0 1rem;
    text-align: center;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.hero p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* Sections */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Cards (Tools) */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
}

.card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--radius-card);
    border: 1px solid var(--border);
    transition: transform 0.3s, background 0.3s;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
}

.tool-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    border: 4px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    /* Ensure background is not transparent if image has transparency */
    background-color: rgba(255, 255, 255, 0.05);
}

/* Detail Page Header Layout */
.tool-header-layout {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 3rem;
    /* Space between image and text */
    text-align: left;
    margin-bottom: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    margin-top: -90px;
    /* Move up by approximately one radius */
}

.tool-header-image {
    flex-shrink: 0;
}

.tool-header-image img {
    /* Reduce format as requested */
    width: 180px;
    height: 180px;
    object-fit: contain;
    border-radius: 50%;
    border: 3px solid var(--border);
    background-color: rgba(255, 255, 255, 0.05);
}

.tool-header-text {
    display: flex;
    flex-direction: column;
}

.tool-header-text .tool-title {
    margin-bottom: 0.5rem;
    /* Reuse existing tool-title styles but override centering alignment issues if any */
}

.tool-header-text .tool-tagline {
    margin-bottom: 0;
    text-align: left;
}

@media (max-width: 768px) {
    .tool-header-layout {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .tool-header-text .tool-tagline {
        text-align: center;
    }
}

.icon-box {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    color: var(--text-heading);
}

/* About Section */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 4rem 0;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
    padding: 2rem 0;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .philosophy-grid {
        grid-template-columns: 1fr;
    }
}

.placeholder-img {
    width: 100%;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-card);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    font-weight: 600;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    padding: 4rem 0;
}

.contact-details {
    list-style: none;
    margin-top: 2rem;
}

.contact-details li {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-heading);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    color: white;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-heading);
    background: rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    margin-top: auto;
    /* Push to bottom if content is short */
    background: rgba(0, 0, 0, 0.2);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-weight: 700;
    font-size: 1.25rem;
}

.copyright {
    opacity: 0.6;
    font-size: 0.9rem;
}

.social-links a {
    margin-left: 1.5rem;
    opacity: 0.8;
}

.social-links a:hover {
    opacity: 1;
}

/* Page wrapper for sticky footer */
body {
    display: flex;
    flex-direction: column;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-mid);
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        backdrop-filter: blur(10px);
    }

    .nav-links.active a {
        margin-left: 0;
        margin-bottom: 1rem;
        text-align: center;
    }

    .nav-links.active .lang-switch {
        justify-content: center;
        margin-top: 0.5rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

/* Tool Card Links */
.card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease;
}

.card-link:hover {
    transform: translateY(-5px);
}

.card-link .card {
    height: 100%;
    flex: 1;
    width: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-link:hover .card {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}