/* THEME: Future Education / Lab Style
   FONT: Rajdhani (Headers) + Open Sans (Body)
   PALETTE: Lab White, Science Blue, Vivid Purple
*/

:root {
    --primary: #0ea5e9;
    /* Science Blue */
    --primary-dark: #0284c7;
    --secondary: #8b5cf6;
    /* Vivid Purple */
    --accent: #f43f5e;
    /* Rose for errors/badges */

    --bg-body: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-alt: #F1F5F9;

    --text-main: #0F172A;
    --text-muted: #64748B;
    --border: #E2E8F0;

    --radius-sm: 0.5rem;
    --radius-xl: 1.5rem;
    /* 2xl radius requirement */

    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    --container: 1200px;
    --transition: 0.3s ease;
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* Utilities */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-family: var(--font-heading);
    text-transform: uppercase;
    transition: var(--transition);
    white-space: nowrap;
    text-align: center;
}

@media (max-width: 768px) {
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn--primary:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.btn--outline {
    border: 2px solid var(--text-main);
    background: transparent;
    color: var(--text-main);
    margin-left: 1rem;
}

@media (max-width: 768px) {
    .btn--outline {
        margin-left: 0;
        margin-top: 1rem;
    }
}

.btn--outline:hover {
    background: var(--text-main);
    color: white;
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn--full {
    width: 100%;
    margin-left: 0;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.logo:hover .logo__icon {
    transform: scale(1.05);
}

.logo__accent {
    color: var(--primary);
}

.logo__domain {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav__list {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav__link {
    font-weight: 600;
    color: var(--text-main);
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.nav__link:hover:not(.btn) {
    color: var(--primary);
}

/* Burger */
.burger {
    display: none;
    background: none;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
}

.burger__line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-main);
    position: absolute;
    transition: var(--transition);
}

.burger__line:nth-child(1) {
    top: 0;
}

.burger__line:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.burger__line:nth-child(3) {
    bottom: 0;
}

@media (max-width: 1024px) {
    .burger {
        display: block;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-surface);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    }

    .nav.active {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .burger[aria-expanded="true"] .burger__line:nth-child(1) {
        top: 50%;
        transform: rotate(45deg);
    }

    .burger[aria-expanded="true"] .burger__line:nth-child(2) {
        opacity: 0;
    }

    .burger[aria-expanded="true"] .burger__line:nth-child(3) {
        bottom: auto;
        top: 50%;
        transform: rotate(-45deg);
    }
}

/* Hero Section (Diagonal) */
.hero {
    padding-top: 8rem;
    padding-bottom: 4rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero__bg-shape {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05), rgba(139, 92, 246, 0.05));
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
    z-index: -1;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 992px) {
    .hero__container {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--bg-alt);
    color: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero__subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 768px) {
    .hero__actions {
        flex-direction: column;
        width: 100%;
    }

    .hero__actions .btn {
        width: 100%;
        margin-left: 0 !important;
        margin-top: 0;
    }

    .hero__actions .btn:first-child {
        margin-top: 0;
    }
}

.hero__visual {
    position: relative;
    width: 100%;
}

.hero__visual img {
    width: 100%;
    height: auto;
    display: block;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: #CBD5E1;
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.image-placeholder::after {
    content: 'Image Placeholder';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    opacity: 0.5;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.hero__card-floating {
    position: absolute;
    bottom: 20px;
    left: -20px;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 2;
    border-left: 4px solid var(--primary);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section__desc {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Grid Tiles (Services) */
.grid-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tile {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tile:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .tile--large {
        grid-column: span 2;
        grid-row: span 2;
        background: var(--bg-alt);
    }

    .tile--wide {
        grid-column: 1 / -1;
        text-align: center;
        background: linear-gradient(to right, var(--bg-surface), var(--bg-alt));
    }
}

.tile-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.link-arrow {
    color: var(--primary);
    font-weight: 700;
    display: inline-block;
    margin-top: 1rem;
}

/* About */
.about__wrapper {
    display: grid;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 992px) {
    .about__wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

.about-ph {
    aspect-ratio: 1/1;
    background: #94A3B8;
}

.about__img {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.about__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1/1;
}

.feature-list {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Reviews */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.review-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
}

.review-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.review-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    font-family: var(--font-heading);
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Contact Form */
.contact__container {
    display: grid;
    gap: 3rem;
}

@media (min-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr 1.5fr;
    }
}

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

.contact-details li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-icon {
    flex-shrink: 0;
    color: var(--text-main);
}

.contact__form-box {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.error-msg {
    color: var(--accent);
    font-size: 0.8rem;
    position: absolute;
    bottom: -1.2rem;
    left: 0;
}

.link-btn {
    background: none;
    color: var(--primary);
    padding: 0;
    text-decoration: underline;
    font-size: inherit;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-wrapper input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

.checkbox-wrapper label {
    display: inline;
    margin-bottom: 0;
    font-weight: 400;
    cursor: pointer;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-link,
.footer__menu a {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
    text-align: left;
}

.footer-link:hover,
.footer__menu a:hover {
    color: var(--primary);
}

.footer__logo {
    margin-bottom: 1rem;
}

.footer__logo .logo__icon {
    width: 36px;
    height: 36px;
}

.footer__logo span {
    font-size: 1.5rem;
}

.footer__contacts {
    list-style: none;
    margin-top: 0.5rem;
}

.footer__contacts li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
}

.footer__contacts .contact-icon {
    color: var(--text-muted);
}

/* Popups & Modals */
.cookie-popup {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--secondary);
    z-index: 2000;
    animation: fadeUp 0.5s ease;
    width: 300px;
    max-width: calc(100% - 4rem);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .cookie-popup {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        width: auto;
        max-width: none;
        padding: 1.25rem;
    }

    .cookie-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cookie-actions .btn {
        width: 100%;
        margin: 0;
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 700px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal--center {
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    background: none;
    color: var(--text-muted);
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-alt);
    color: var(--text-main);
}

.modal-title {
    margin-bottom: 1.5rem;
    padding-right: 3rem;
}

.modal-body {
    line-height: 1.8;
    color: var(--text-main);
}

.modal-body h3 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
    text-transform: none;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 1rem;
}

.modal-body ul,
.modal-body ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
    list-style-type: disc;
}

.modal-body ol li {
    list-style-type: decimal;
}

.modal-body strong {
    color: var(--text-main);
    font-weight: 600;
}

.modal-body em {
    color: var(--text-muted);
    font-style: italic;
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid white;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}