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

/* Variables */
:root {
    --primary-bg: #005f73;
    --secondary-bg: #0a9396;
    --accent-terracotta: #f76c5e;
    --accent-mandarin: #fcbf49;
    --text-ivory: #f1faee;
    --button-charcoal: #001219;
    --gradient-primary: linear-gradient(135deg, #005f73 0%, #0a9396 50%, #f76c5e 100%);
    --gradient-secondary: linear-gradient(45deg, #fcbf49 0%, #f76c5e 100%);
    --shadow-light: 0 4px 20px rgba(0, 95, 115, 0.1);
    --shadow-medium: 0 8px 32px rgba(0, 95, 115, 0.2);
    --shadow-heavy: 0 16px 64px rgba(0, 95, 115, 0.3);
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --border-radius: 12px;
}

/* Base Typography */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-ivory);
    background: var(--primary-bg);
    font-size: 16px;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-ivory);
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h3 {
    font-size: 1.8rem;
    line-height: 1.3;
}

h4 {
    font-size: 1.4rem;
    line-height: 1.4;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--button-charcoal);
    color: var(--text-ivory);
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
    background: #002a36;
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: var(--button-charcoal);
    box-shadow: var(--shadow-medium);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
    filter: brightness(1.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-scale {
    animation: fadeInScale 0.6s ease-out;
}

.animate-slide-left {
    animation: slideInLeft 0.7s ease-out;
}

/* Staggered animations for cards */
.card.animate-fade-scale:nth-child(1) {
    animation-delay: 0.1s;
}

.card.animate-fade-scale:nth-child(2) {
    animation-delay: 0.2s;
}

.card.animate-fade-scale:nth-child(3) {
    animation-delay: 0.3s;
}

.card.animate-fade-scale:nth-child(4) {
    animation-delay: 0.4s;
}

.process-step.animate-slide-left:nth-child(1) {
    animation-delay: 0.1s;
}

.process-step.animate-slide-left:nth-child(2) {
    animation-delay: 0.2s;
}

.process-step.animate-slide-left:nth-child(3) {
    animation-delay: 0.3s;
}

.process-step.animate-slide-left:nth-child(4) {
    animation-delay: 0.4s;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 95, 115, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999;
    padding: 1rem 0;
    transition: all var(--transition-fast);
}

/* Header scrolled state removed - now always has same appearance */

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-ivory);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    fill: var(--accent-mandarin);
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav a {
    color: var(--text-ivory);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-mandarin);
    transition: width var(--transition-fast);
}

.nav a:hover::after {
    width: 100%;
}

.nav a:hover {
    color: var(--accent-mandarin);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    padding-top: 100px; /* Компенсация для фиксированной шапки */
    padding-bottom: 2rem; /* Отступ снизу для лучшего отображения */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23f1faee" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text {
    animation: fadeInUp 1s ease-out;
}

.hero-visual {
    text-align: center;
    animation: fadeInScale 1s ease-out 0.3s both;
}

.hero-logo {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    fill: var(--accent-mandarin);
    filter: drop-shadow(0 10px 30px rgba(0, 95, 115, 0.3));
}

/* Sections */
.section {
    padding: 80px 0;
    position: relative;
}

.section:nth-child(odd) {
    background: var(--secondary-bg);
}

.section:nth-child(even) {
    background: var(--primary-bg);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 3rem;
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-image {
    position: relative;
}

.about-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    transition: transform var(--transition-fast);
}

.about-img:hover {
    transform: scale(1.02);
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: rgba(241, 250, 238, 0.1);
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
    border: 1px solid rgba(241, 250, 238, 0.2);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
    transform: translateX(-100%);
    transition: transform var(--transition-fast);
}

.card:hover::before {
    transform: translateX(0);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
    background: rgba(241, 250, 238, 0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-fast);
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-content {
    padding: 2rem;
}

.card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    fill: var(--accent-mandarin);
}

.card h3 {
    color: var(--text-ivory);
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-ivory);
    opacity: 0.8;
}

/* Cards without images (for other sections) */
.card.simple-card {
    padding: 2rem;
}

/* Process Steps */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.process-step {
    text-align: center;
    padding: 2rem;
    position: relative;
}

.process-step::after {
    content: '';
    position: absolute;
    top: 30px;
    left: 100%;
    width: 120px;
    height: 3px;
    background: var(--accent-mandarin);
    z-index: 1;
}

.process-step:last-child::after {
    display: none;
}

.process-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    color: var(--button-charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    position: relative;
    z-index: 2;
}

/* Form */
.form {
    background: rgba(241, 250, 238, 0.1);
    border-radius: var(--border-radius);
    padding: 3rem;
    margin: 3rem auto 0;
    border: 1px solid rgba(241, 250, 238, 0.2);
    max-width: 800px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

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

.form-input, .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(241, 250, 238, 0.2);
    border-radius: 8px;
    background: rgba(241, 250, 238, 0.1);
    color: var(--text-ivory);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent-mandarin);
    box-shadow: 0 0 0 3px rgba(252, 191, 73, 0.1);
}

.form-input::placeholder {
    color: rgba(241, 250, 238, 0.5);
}

.form-select {
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23f1faee" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    appearance: none;
    cursor: pointer;
}

.form-select option {
    background: var(--button-charcoal);
    color: var(--text-ivory);
    padding: 8px 12px;
}

.form-error {
    background: rgba(247, 108, 94, 0.1);
    border-color: var(--accent-terracotta);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: var(--accent-mandarin);
}

.checkbox-group label {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-group a {
    color: var(--accent-mandarin);
    text-decoration: underline;
}

/* Footer */
#footer {
    background: var(--button-charcoal);
    padding: 4rem 0 2rem;
    margin-top: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3, .footer-section h4 {
    color: var(--text-ivory);
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(241, 250, 238, 0.8);
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(241, 250, 238, 0.8);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--accent-mandarin);
}

.contact-info i {
    color: var(--accent-mandarin);
    margin-right: 10px;
    width: 16px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(241, 250, 238, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--accent-mandarin);
    color: var(--button-charcoal);
}

.footer-divider {
    height: 1px;
    background: rgba(241, 250, 238, 0.2);
    margin: 2rem 0;
}

.footer-bottom {
    text-align: center;
    color: rgba(241, 250, 238, 0.6);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero {
        padding-top: 130px; /* Больше padding для мобильных */
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-logo {
        width: 150px;
        height: 150px;
    }
    
    .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .about-img {
        height: 250px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .card-image {
        height: 180px;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .process-step::after {
        display: none;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form {
        padding: 2rem 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .section {
        padding: 60px 0;
    }
}

/* Medium mobile screens */
@media (max-width: 600px) {
    .hero {
        padding-top: 140px; /* Дополнительный padding для средних мобильных */
    }
    
    .nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero {
        padding-top: 150px; /* Еще больше padding для малых экранов */
    }
    
    .hero-logo {
        width: 120px;
        height: 120px;
    }
    
    .about-img {
        height: 200px;
    }
    
    .card-image {
        height: 150px;
    }
    
    .card-content {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .card.simple-card {
        padding: 1.5rem;
    }
    
    .section {
        padding: 40px 0;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .hero {
        padding-top: 160px; /* Максимальный padding для очень маленьких экранов */
    }
    
    .nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .header {
        padding: 0.5rem 0;
    }
    
    .hero-logo {
        width: 100px;
        height: 100px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding-top: 120px;
        min-height: 100vh;
    }
    
    .hero-content {
        align-items: flex-start;
        padding-top: 2rem;
    }
    
    .hero-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 50px 0;
    }
}

/* Very short screens (height-based) */
@media (max-height: 500px) {
    .hero {
        padding-top: 80px;
        min-height: 90vh;
    }
    
    .hero-content {
        gap: 1rem;
    }
    
    .hero-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 0.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* iOS Safe Area Support */
@supports (padding-top: env(safe-area-inset-top)) {
    .hero {
        padding-top: calc(100px + env(safe-area-inset-top));
    }
    
    @media (max-width: 768px) {
        .hero {
            padding-top: calc(130px + env(safe-area-inset-top));
        }
    }
    
    @media (max-width: 480px) {
        .hero {
            padding-top: calc(150px + env(safe-area-inset-top));
        }
    }
    
    @media (max-width: 360px) {
        .hero {
            padding-top: calc(160px + env(safe-area-inset-top));
        }
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
*:focus {
    outline: 2px solid var(--accent-mandarin);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-bg: #000;
        --secondary-bg: #111;
        --text-ivory: #fff;
        --accent-mandarin: #ffff00;
    }
} 