/*
Theme Name: Svētās Ģimenes Māja
Description: Svētās Ģimenes Mājas Elementor apakštēma.
Author: Svētās Ģimenes Māja
Template: hello-elementor
Version: 1.0.0
Text Domain: sgm-elementor-child
*/

@font-face {
    font-family: "Open Sans";
    src: url("assets/fonts/OpenSans-Variable.ttf") format("truetype");
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
}

@font-face {
    font-family: "Open Sans";
    src: url("assets/fonts/OpenSans-Italic-Variable.ttf") format("truetype");
    font-style: italic;
    font-weight: 300 800;
    font-display: swap;
}

:root {
    --sgm-primary: #a61530;
    --sgm-dark: #2c3041;
    --sgm-text: #333333;
    --sgm-muted: #6a5f5f;
    --sgm-white: #ffffff;
    --sgm-light: #f5f5f5;
    --sgm-warm: #efe5d4;
    --sgm-border: #e8e8e8;
    --sgm-secondary: #0e9cd1;
    --sgm-content-width: 1180px;
    --sgm-reading-width: 820px;
    --sgm-radius: 4px;
    --sgm-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
}

body,
button,
input,
select,
textarea {
    font-family: "Open Sans", Arial, sans-serif;
}

body {
    margin: 0;
    color: var(--sgm-text);
    background-color: var(--sgm-white);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6,
.elementor-heading-title {
    margin-top: 0;
    color: var(--sgm-dark);
    font-family: "Open Sans", Arial, sans-serif;
    font-weight: 700;
    line-height: 1.25;
}

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
}

h3 {
    font-size: clamp(1.35rem, 2.3vw, 1.75rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

a {
    color: var(--sgm-primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--sgm-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(166, 21, 48, 0.3);
    outline-offset: 3px;
}

button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.elementor-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 22px;
    border: 1px solid var(--sgm-primary);
    border-radius: var(--sgm-radius);
    color: var(--sgm-white);
    background-color: var(--sgm-primary);
    font-family: "Open Sans", Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}

button:hover,
button:focus,
input[type="button"]:hover,
input[type="button"]:focus,
input[type="submit"]:hover,
input[type="submit"]:focus,
input[type="reset"]:hover,
input[type="reset"]:focus,
.elementor-button:hover,
.elementor-button:focus {
    border-color: var(--sgm-dark);
    color: var(--sgm-white);
    background-color: var(--sgm-dark);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--sgm-border);
    border-radius: var(--sgm-radius);
    color: var(--sgm-text);
    background-color: var(--sgm-white);
    font-size: 16px;
}

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

blockquote {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--sgm-primary);
    color: var(--sgm-dark);
    background-color: var(--sgm-light);
}

table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    background-color: var(--sgm-white);
}

th,
td {
    padding: 12px 14px;
    border: 1px solid var(--sgm-border);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--sgm-dark);
    background-color: var(--sgm-warm);
    font-weight: 700;
}

body:not(.elementor-page) .site-main {
    width: calc(100% - 48px);
    max-width: var(--sgm-reading-width);
    margin-right: auto;
    margin-left: auto;
    padding-top: 56px;
    padding-bottom: 72px;
}

body:not(.elementor-page) .page-header {
    margin-bottom: 32px;
}

body:not(.elementor-page) .page-header .entry-title {
    margin-bottom: 0;
}

.sgm-container {
    width: calc(100% - 48px);
    max-width: var(--sgm-content-width);
    margin-right: auto;
    margin-left: auto;
}

.sgm-section {
    padding-top: clamp(48px, 6vw, 88px);
    padding-bottom: clamp(48px, 6vw, 88px);
}

.sgm-section--white {
    background-color: var(--sgm-white);
}

.sgm-section--light {
    background-color: var(--sgm-light);
}

.sgm-section--warm {
    background-color: var(--sgm-warm);
}

.sgm-card {
    height: 100%;
    padding: 28px;
    border: 1px solid var(--sgm-border);
    border-radius: var(--sgm-radius);
    background-color: var(--sgm-white);
    box-shadow: var(--sgm-shadow);
}

.sgm-accent-title {
    position: relative;
    padding-bottom: 14px;
}

.sgm-accent-title::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 56px;
    height: 3px;
    background-color: var(--sgm-primary);
    content: "";
}

::selection {
    color: var(--sgm-white);
    background-color: var(--sgm-primary);
}

@media (max-width: 767px) {
    body {
        font-size: 15px;
    }

    body:not(.elementor-page) .site-main {
        width: calc(100% - 32px);
        padding-top: 40px;
        padding-bottom: 56px;
    }

    .sgm-container {
        width: calc(100% - 32px);
    }

    .sgm-card {
        padding: 22px;
    }
}

/* SGM BOARD COMPONENT START */

body.page-id-17:not(.elementor-page) .site-main {
    max-width: 980px;
}

body.page-id-17 .page-header {
    margin-bottom: 0;
}

body.page-id-17 .page-header .entry-title {
    max-width: 900px;
    font-size: clamp(2rem, 3vw, 2.5rem);
    line-height: 1.2;
}

.sgm-board-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    width: 100%;
    max-width: 760px;
    margin: 40px auto 0;
}

.sgm-board-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

.sgm-board-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    margin: 0 auto 16px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--sgm-border);
    border-radius: 4px;
    background-color: var(--sgm-light);
}

.sgm-board-photo .sgm-board-image {
    display: block;
    width: 160px;
    height: 160px;
    margin: 0;
    object-fit: cover;
    object-position: center top;
}

.sgm-board-details {
    width: 100%;
    padding: 0;
    text-align: center;
}

.sgm-board-name {
    margin: 0 0 4px;
    color: var(--sgm-dark);
    font-size: 1.05rem;
    line-height: 1.3;
}

.sgm-board-role {
    margin: 0;
    color: var(--sgm-muted);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .sgm-board-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 280px;
        margin-top: 30px;
    }
}

/* SGM BOARD COMPONENT END */
