/* ==========================================
   Modern Design for Trenazher Pravilo
   Built with Bootstrap 5 + Custom Styles
   ========================================== */

/* Root Variables */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #7ed321;
    --success-color: #50e3c2;
    --warning-color: #f5a623;
    --danger-color: #d0021b;
    --dark-color: #2c3e50;
    --light-gray: #f8f9fa;
    --bg-light: #eef2f5;
    --border-radius: 1rem;
    --transition: all 0.3s ease-in-out;
}

/* Override Bootstrap bg-light for more contrast */
.bg-light {
    background-color: var(--bg-light) !important;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: #333;
    overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

a {
    transition: var(--transition);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

/* Prevent horizontal scroll from AOS animations */
[data-aos] {
    overflow-anchor: none;
}

main, section, .container {
    overflow-x: clip;
}

/* Navigation Styles */
.navbar {
    padding: 0.75rem 0;
    transition: var(--transition);
    background: #fff;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.brand-sub {
    font-size: 0.65rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem !important;
    color: #444 !important;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.btn-nav-phone {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #5cb318 100%);
    color: #fff !important;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-nav-phone:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(126, 211, 33, 0.4);
    color: #fff !important;
}

.btn-nav-vk {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background: #5181b8;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
    border: none;
}

.btn-nav-vk:hover {
    background: #3b5998;
    transform: translateY(-2px);
    color: #fff !important;
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: #fff;
        margin-top: 1rem;
        padding: 1.5rem;
        border-radius: 1rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .nav-link {
        padding: 0.75rem 0 !important;
        font-size: 1rem;
        font-weight: 500;
        color: #333 !important;
        border-bottom: 1px solid #eee;
    }
    
    .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    
    .nav-link:hover {
        color: var(--primary-color) !important;
    }
    
    .nav-link::after {
        display: none;
    }
    
    .nav-buttons {
        justify-content: center;
        padding-top: 1rem;
        border-top: 1px solid #eee;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    .btn-nav-phone span {
        display: inline !important;
    }
}

@media (max-width: 575px) {
    .brand-text {
        font-size: 1.2rem;
    }
    
    .brand-sub {
        font-size: 0.55rem;
    }
}

/* Hero Section */
.hero-section {
    background-image: url('../img/masthead.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    letter-spacing: 3px;
    text-shadow: 2px 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto 2rem;
    text-shadow: 1px 2px 10px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.btn-hero-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #357abd 100%);
    color: #fff !important;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.4);
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(74, 144, 226, 0.5);
    color: #fff !important;
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #fff !important;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    transition: var(--transition);
}

.btn-hero-secondary:hover {
    background: #fff;
    color: var(--primary-color) !important;
    border-color: #fff;
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 25px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-indicator span {
    width: 6px;
    height: 10px;
    background: #fff;
    border-radius: 3px;
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

@media (max-width: 767px) {
    .hero-section {
        background-attachment: scroll;
    }
    
    .hero-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
        width: 100%;
        max-width: 200px;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .scroll-indicator {
        display: none;
    }
}


.video-section .ratio {
    background-color: #000;
    width: 90%;
    margin: 2rem auto;
    height: 350px; /* Explicit height required since we remove aspect-ratio padding */
}

.video-section .ratio::before {
    padding-top: 0 !important;
    display: none !important;
}

/* Title Underline */
.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Benefit Cards */
.benefit-card {
    background: white;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 2px solid transparent;
}

.benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.benefit-icon {
    font-size: 3rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.benefit-card:hover .benefit-icon {
    transform: scale(1.1);
    color: var(--secondary-color);
}

.benefit-number {
    font-size: 4rem;
    font-weight: 800;
    color: #c4c4c4;
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* Icon Box */
.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Program Section */
#program img {
    max-width: 100%;
    height: auto;
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    aspect-ratio: 4 / 3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

@media (max-width: 991px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

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

.ratio {
    background: transparent;
}

.ratio::before {
    background: transparent !important;
}

/* YouTube Video Container */
.youtube {
    background-color: #000;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    overflow: hidden;
    z-index: 1;
}

.youtube iframe {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border: none;
    pointer-events: auto;
    z-index: 10;
}

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

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

.youtube .play-button {
    width: 90px;
    height: 60px;
    background-color: rgba(255, 0, 0, 0.9);
    box-shadow: 0 8px 30px rgba(255, 0, 0, 0.4);
    z-index: 2;
    opacity: 1;
    border-radius: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: var(--transition);
}

.youtube:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 12px 40px rgba(255, 0, 0, 0.6);
}

.youtube .play-button::before {
    content: "";
    border-style: solid;
    border-width: 15px 0 15px 26px;
    border-color: transparent transparent transparent #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
}

.youtube iframe {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Gradient Background Utilities */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Cards Enhancement */
.card {
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

/* Buttons Enhancement */
.btn {
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #357abd 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #357abd 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(74, 144, 226, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

/* Alert Styles */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1.25rem;
}

/* Shadow Utilities */
.shadow-sm {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12) !important;
}

.shadow-lg {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Image Enhancements */
img {
    max-width: 100%;
    height: auto;
}

.rounded-4 {
    border-radius: 1.5rem !important;
}

/* Collapse Enhancement for Science Section */
.collapse {
    transition: height 0.35s ease;
}

/* Scroll to Top Button */
#scrollTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    z-index: 1000;
    padding: 0;
    transition: var(--transition);
}

#scrollTop:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(74, 144, 226, 0.4);
}

/* Contacts Section */
.contacts-section {
    background: linear-gradient(180deg, var(--bg-light) 0%, #fff 100%);
    padding-bottom: 0;
}

.contact-card {
    background: #fff;
    padding: 2.5rem 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.contact-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #357abd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3);
}

.contact-icon-phone {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #5cb318 100%);
    box-shadow: 0 10px 30px rgba(126, 211, 33, 0.3);
}

.contact-icon-social {
    background: linear-gradient(135deg, #5181b8 0%, #3b5998 100%);
    box-shadow: 0 10px 30px rgba(81, 129, 184, 0.3);
}

.contact-phone {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-phone:hover {
    color: var(--secondary-color);
}

.cta-block {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem;
    border-radius: 1.5rem;
    color: #fff;
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.3);
}

.cta-block .btn-success {
    background: #fff;
    color: var(--secondary-color);
    border: none;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cta-block .btn-success:hover {
    background: var(--secondary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.map-container {
    width: 100%;
    height: 400px;
    margin-top: 3rem;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 767px) {
    .contact-card {
        padding: 2rem 1rem;
    }
    
    .contact-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .contact-phone {
        font-size: 1.25rem;
    }
    
    .cta-block {
        padding: 2rem 1.5rem;
    }
    
    .map-container {
        height: 300px;
    }
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

footer a:hover {
    opacity: 0.8;
}

/* Loading Animation for Images */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-aos] {
    pointer-events: auto;
}

/* Responsive Design */
@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: var(--border-radius);
        margin-top: 1rem;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav-link::after {
        display: none;
    }
    
    .display-2 {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    #scrollTop {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 767px) {
    .hero-section {
        background-attachment: scroll;
    }
    
    .display-2 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .benefit-number {
        font-size: 3rem;
    }
    
    .benefit-icon {
        font-size: 2.5rem;
    }
}

@media (max-width: 575px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .display-2 {
        font-size: 1.75rem;
    }
    
    .display-4 {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    #scrollTop,
    footer {
        display: none;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* Masters Section */
.master-photo-wrapper {
    position: relative;
    display: inline-block;
}

.master-photo {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.master-photo-wrapper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 1.5rem;
    z-index: -1;
    opacity: 0.3;
}

.master-info {
    padding: 1rem 0;
}

.master-list li {
    font-size: 1.05rem;
    line-height: 1.6;
}

.master-list li i {
    font-size: 1.1rem;
    min-width: 20px;
}

@media (max-width: 991px) {
    .master-photo-wrapper::before {
        top: 15px;
        left: 15px;
        right: -15px;
        bottom: -15px;
    }
    
    .master-info {
        text-align: center;
        padding-top: 2rem;
    }
    
    .master-list li {
        text-align: left;
    }
}

@media (max-width: 575px) {
    .master-photo-wrapper::before {
        display: none;
    }
    
    .master-info {
        text-align: center;
    }
    
    .master-info .display-6 {
        font-size: 1.75rem;
    }
    
    .master-info .lead {
        font-size: 1rem;
    }
    
    .master-list {
        text-align: left;
        padding: 0 0.5rem;
    }
    
    .master-list li {
        font-size: 0.9rem;
        margin-bottom: 0.75rem !important;
        align-items: flex-start !important;
    }
    
    .master-list li i {
        font-size: 0.9rem;
        margin-right: 0.5rem !important;
        margin-top: 0.25rem !important;
    }
    
    .master-list li span {
        flex: 1;
    }
}

/* Science Section Images */
.science-img {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.science-img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
button,
a,
input,
textarea,
select {
    transition: var(--transition);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

/* Selection Color */
::selection {
    background: var(--primary-color);
    color: white;
}

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



