/* ============================================================
   EuroNet — common.css
   Reset, CSS Variables, Base Elements, Utilities
   ============================================================ */

/* === CSS VARIABLES === */
:root {
    /* Core palette — LIGHT ISP theme with teal accent */
    --bg:             #f5f7fa;
    --bg-card:        #ffffff;
    --bg-elevated:    #f0f2f5;
    --bg-hover:       #e8ecf1;
    --bg-light:       #f0f4f8;

    --tt:             #1a2332;
    --tt-secondary:   #4a5568;
    --tt-fade:        #94a3b8;

    --accent:         #00897B;
    --accent-hover:   #00BFA6;
    --accent-soft:    rgba(0, 137, 123, 0.08);
    --accent-glow:    0 0 20px rgba(0, 137, 123, 0.25);

    --secondary:      #3b82f6;
    --danger:         #ef4444;
    --warning:        #f59e0b;
    --success:        #22c55e;

    --bdc:            #e2e8f0;
    --bdc-light:      #edf2f7;
    --bsh:            0 4px 20px rgba(0, 0, 0, 0.06);

    /* Glassmorphism */
    --glass-bg:       rgba(255, 255, 255, 0.85);
    --glass-border:   rgba(0, 0, 0, 0.06);
    --glass-blur:     16px;

    /* Buttons */
    --bg-btn:         #00897B;
    --tt-btn:         #ffffff;
    --bg-btn-hover:   #00BFA6;

    /* System variables for engine.css */
    --ui-bg:          #ffffff;
    --ui-bg-darker:   #f5f7fa;
    --ui-bg-darkest:  #e8ecf1;
    --ui-accent:      #00897B;
    --ui-bdc:         #e2e8f0;
    --ui-tt-fade:     #94a3b8;
    --ui-fw-bolder:   600;
    --ui-fw-fa:       300;
    --ui-bsh:         0 12px 40px rgba(0, 0, 0, 0.12);
    --ui-bsh-inset:   inset 1px 2px 5px rgba(0, 0, 0, 0.06);
    --ui-bg-black:    #1a2332;
    --ui-green:       #22c55e;
    --ui-red:         #ef4444;
    --ui-bg-attention:#FFF8E1;
    --ui-bd-attention:#FF9800;

    /* Layout */
    --container:      1280px;
    --gap:            20px;
    --radius:         8px;
    --radius-lg:      16px;
    --radius-xl:      24px;

    /* Typography */
    --font-display:   'Poppins', sans-serif;
    --font-body:      'Inter', sans-serif;

    /* Transitions */
    --ease:           cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --speed:          0.25s;
    --speed-slow:     0.5s;
}


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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--tt);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.modal-is-opened {
    overflow: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--speed) var(--ease); }
a:hover { color: var(--accent-hover); }

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.25;
    color: var(--tt);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }


/* === BASE ELEMENTS === */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--tt-btn);
    background: var(--bg-btn);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--speed) var(--ease);
    white-space: nowrap;
    text-decoration: none;
}
.btn:hover {
    background: var(--bg-btn-hover);
    color: var(--tt-btn);
    transform: translateY(-1px);
    box-shadow: var(--accent-glow);
}

.btn--outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}
.btn--outline:hover {
    background: var(--accent);
    color: var(--tt-btn);
}

.btn--lg {
    padding: 16px 36px;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

.btn--sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

.btn--white {
    background: #fff;
    color: var(--bg);
}
.btn--white:hover {
    background: #e2e8f0;
    color: var(--bg);
    box-shadow: 0 4px 15px rgba(255,255,255,0.2);
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--tt);
    background: var(--bg-elevated);
    border: 1px solid var(--bdc);
    border-radius: var(--radius);
    transition: border-color var(--speed), box-shadow var(--speed);
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--tt-secondary);
}

/* Checkbox / Radio */
.has-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.has-checkbox input[type="checkbox"],
.has-checkbox input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--bdc);
}
th {
    font-weight: 600;
    color: var(--tt-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


/* === UTILITIES === */
.d-flex { display: flex; flex-wrap: wrap; }
.ai-center { align-items: center; }
.jc-space-between { justify-content: space-between; }
.jc-center { justify-content: center; }
.flex-grow-1 { flex: 1 1 0; max-width: 100%; min-width: 50px; }
.ws-nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.clearfix::after { content: ""; display: table; clear: both; }
.img-responsive { position: relative; padding-top: 60%; }
.img-responsive > img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.img-fixed-size img { width: 100%; height: 100%; object-fit: cover; }
.img-mask::before {
    content: '';
    position: absolute;
    z-index: 1;
    left: 0; right: 0; bottom: 0;
    height: 70%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
}
.hidden, .d-none { display: none; }
.order-first { order: -1; }
.btn-without-bg { background: none; padding: 0; border: none; cursor: pointer; color: var(--accent); }
.text-center { text-align: center; }
.text-muted { color: var(--tt-fade); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* Container */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gap);
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bdc); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--tt-fade); }

/* Selection */
::selection {
    background: var(--accent);
    color: var(--bg);
}

/* Animations base */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}
[data-animate="fade-in"] { transform: none; }
[data-animate="slide-left"] { transform: translateX(-30px); }
[data-animate="slide-left"].is-visible { transform: translateX(0); }
[data-animate="slide-right"] { transform: translateX(30px); }
[data-animate="slide-right"].is-visible { transform: translateX(0); }
[data-animate="scale"] { transform: scale(0.95); }
[data-animate="scale"].is-visible { transform: scale(1); }

/* Full-text (article body) */
.full-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--tt);
}
.full-text p { margin-bottom: 1.2em; }
.full-text h2 { margin: 2em 0 0.8em; font-size: 1.5rem; }
.full-text h3 { margin: 1.5em 0 0.6em; font-size: 1.25rem; }
.full-text img { border-radius: var(--radius); margin: 1.5em 0; }
.full-text a { color: var(--accent); text-decoration: underline; }
.full-text a:hover { color: var(--accent-hover); }
.full-text ul, .full-text ol { margin: 1em 0; padding-left: 1.5em; }
.full-text ul { list-style: disc; }
.full-text ol { list-style: decimal; }
.full-text li { margin-bottom: 0.4em; }
.full-text blockquote {
    margin: 1.5em 0;
    padding: 16px 20px;
    border-left: 4px solid var(--accent);
    background: var(--bg-elevated);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--tt-secondary);
    font-style: italic;
}
.full-text pre {
    margin: 1.5em 0;
    padding: 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 0.9rem;
}
.full-text code {
    padding: 2px 6px;
    background: var(--bg-elevated);
    border-radius: 4px;
    font-size: 0.9em;
}
.full-text table {
    margin: 1.5em 0;
}
.full-text iframe,
.full-text video {
    max-width: 100%;
    border-radius: var(--radius);
}

/* Light theme — base text color overrides */
.serv, .serv a, .serv__links a { color: var(--tt); }
.serv__links a { color: var(--accent); }
.serv__links a:hover { color: var(--accent-hover); }
